Class SpellingReconcileStrategy
java.lang.Object
org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy
- All Implemented Interfaces:
IReconcilingStrategy
,IReconcilingStrategyExtension
public class SpellingReconcileStrategy
extends Object
implements IReconcilingStrategy, IReconcilingStrategyExtension
Reconcile strategy used for spell checking.
- Since:
- 3.3
-
Constructor Summary
ConstructorDescriptionSpellingReconcileStrategy
(ISourceViewer viewer, SpellingService spellingService) Creates a new comment reconcile strategy. -
Method Summary
Modifier and TypeMethodDescriptionprotected ISpellingProblemCollector
Creates a new spelling problem collector.protected IAnnotationModel
Returns the annotation model to be used by this reconcile strategy.protected IContentType
Returns the content type of the underlying editor input.protected final IDocument
Returns the document which is spell checked.void
Called only once in the life time of this reconciling strategy.void
Activates non-incremental reconciling.void
reconcile
(DirtyRegion dirtyRegion, IRegion subRegion) Activates incremental reconciling of the specified dirty region.void
setDocument
(IDocument document) Tells this reconciling strategy on which document it will work.final void
setProgressMonitor
(IProgressMonitor monitor) Tells this reconciling strategy with which progress monitor it will work.
-
Constructor Details
-
SpellingReconcileStrategy
Creates a new comment reconcile strategy.- Parameters:
viewer
- the source viewerspellingService
- the spelling service to use
-
-
Method Details
-
initialReconcile
public void initialReconcile()Description copied from interface:IReconcilingStrategyExtension
Called only once in the life time of this reconciling strategy.- Specified by:
initialReconcile
in interfaceIReconcilingStrategyExtension
-
reconcile
Description copied from interface:IReconcilingStrategy
Activates incremental reconciling of the specified dirty region. As a dirty region might span multiple content types, the segment of the dirty region which should be investigated is also provided to this reconciling strategy. The given regions refer to the document passed into the most recent call ofIReconcilingStrategy.setDocument(IDocument)
.- Specified by:
reconcile
in interfaceIReconcilingStrategy
- Parameters:
dirtyRegion
- the document region which has been changedsubRegion
- the sub region in the dirty region which should be reconciled
-
reconcile
Description copied from interface:IReconcilingStrategy
Activates non-incremental reconciling. The reconciling strategy is just told that there are changes and that it should reconcile the given partition of the document most recently passed intoIReconcilingStrategy.setDocument(IDocument)
.- Specified by:
reconcile
in interfaceIReconcilingStrategy
- Parameters:
region
- the document partition to be reconciled
-
getContentType
Returns the content type of the underlying editor input.- Returns:
- the content type of the underlying editor input or
null
if none could be determined
-
getDocument
Returns the document which is spell checked.- Returns:
- the document
-
setDocument
Description copied from interface:IReconcilingStrategy
Tells this reconciling strategy on which document it will work. This method will be called before any other method and can be called multiple times. The regions passed to the other methods always refer to the most recent document passed into this method.- Specified by:
setDocument
in interfaceIReconcilingStrategy
- Parameters:
document
- the document on which this strategy will work
-
createSpellingProblemCollector
Creates a new spelling problem collector.- Returns:
- the collector or
null
if none is available
-
setProgressMonitor
Description copied from interface:IReconcilingStrategyExtension
Tells this reconciling strategy with which progress monitor it will work. This method will be called before any other method and can be called multiple times.- Specified by:
setProgressMonitor
in interfaceIReconcilingStrategyExtension
- Parameters:
monitor
- the progress monitor with which this strategy will work
-
getAnnotationModel
Returns the annotation model to be used by this reconcile strategy.- Returns:
- the annotation model of the underlying editor input or
null
if none could be determined
-