public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { reconcile(subRegion); }
@Override public void setDocument(IDocument document) { super.setDocument(document); updateProblemRequester(); }
@Override public void setDocument(IDocument document) { fDocument= document; fSpellingProblemCollector= createSpellingProblemCollector(); }
/** * Creates a new spelling problem collector. * * @return the collector or <code>null</code> if none is available */ protected ISpellingProblemCollector createSpellingProblemCollector() { IAnnotationModel model= getAnnotationModel(); if (model == null) return null; return new SpellingProblemCollector(model); }
/** * Creates a new comment reconcile strategy. * * @param viewer the source viewer * @param spellingService the spelling service to use */ public SpellingReconcileStrategy(ISourceViewer viewer, SpellingService spellingService) { Assert.isNotNull(viewer); Assert.isNotNull(spellingService); fViewer= viewer; fSpellingService= spellingService; fSpellingContext= new SpellingContext(); fSpellingContext.setContentType(getContentType()); }
/** * Returns the reconciler ready to be used with the given source viewer. * <p> * This implementation currently returns a {@link MonoReconciler} which * is responsible for spell checking. In the future a different reconciler * taking over more responsibilities might be returned.</p> * * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer) * @since 3.3 */ public IReconciler getReconciler(ISourceViewer sourceViewer) { if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; SpellingService spellingService= EditorsUI.getSpellingService(); if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) return null; IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, spellingService); MonoReconciler reconciler= new MonoReconciler(strategy, false); reconciler.setIsIncrementalReconciler(false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }
public void reconcile(IRegion region) { if (getAnnotationModel() == null || fSpellingProblemCollector == null) return; fSpellingService.check(fDocument, fSpellingContext, fSpellingProblemCollector, fProgressMonitor); }
/** * Creates a new comment reconcile strategy. * * @param viewer the source viewer * @param spellingService the spelling service to use */ public SpellingReconcileStrategy(ISourceViewer viewer, SpellingService spellingService) { Assert.isNotNull(viewer); Assert.isNotNull(spellingService); fViewer= viewer; fSpellingService= spellingService; fSpellingContext= new SpellingContext(); fSpellingContext.setContentType(getContentType()); }
/** * Returns the reconciler ready to be used with the given source viewer. * <p> * This implementation currently returns a {@link MonoReconciler} which * is responsible for spell checking. In the future a different reconciler * taking over more responsibilities might be returned.</p> * * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer) * @since 3.3 */ @Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; SpellingService spellingService= EditorsUI.getSpellingService(); if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) return null; IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, spellingService); MonoReconciler reconciler= new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
@Override public void reconcile(IRegion region) { deleteAllAnnotations(region); super.reconcile(region); }
@Override public void setDocument(IDocument document) { super.setDocument(document); spellingProblemCollector = createSpellingProblemCollector(); }
@Override public void reconcile(IRegion region) { if (getAnnotationModel() == null || fSpellingProblemCollector == null) return; fRegions[0]= region; fSpellingService.check(fDocument, fRegions, fSpellingContext, fSpellingProblemCollector, fProgressMonitor); }
@Override public void setDocument(IDocument document) { fDocument= document; fSpellingProblemCollector= createSpellingProblemCollector(); }
/** * Creates a new comment reconcile strategy. * * @param viewer the source viewer * @param spellingService the spelling service to use */ public SpellingReconcileStrategy(ISourceViewer viewer, SpellingService spellingService) { Assert.isNotNull(viewer); Assert.isNotNull(spellingService); fViewer= viewer; fSpellingService= spellingService; fSpellingContext= new SpellingContext(); fSpellingContext.setContentType(getContentType()); }
@Override public void reconcile(IRegion region) { if (fRequestor != null && isSpellingEnabled()) super.reconcile(region); }
@Override public void setDocument(IDocument document) { super.setDocument(document); updateProblemRequester(); }
/** * Creates a new spelling problem collector. * * @return the collector or <code>null</code> if none is available */ protected ISpellingProblemCollector createSpellingProblemCollector() { IAnnotationModel model= getAnnotationModel(); if (model == null) return null; return new SpellingProblemCollector(model); }
public void setDocument(IDocument document) { fDocument= document; fSpellingProblemCollector= createSpellingProblemCollector(); }
@Override public void reconcile(IRegion region) { if (fRequestor != null && isSpellingEnabled()) super.reconcile(region); }
public void setDocument(IDocument document) { super.setDocument(document); updateProblemRequester(); }