/** * {@inheritDoc} */ public IReconciler getReconciler( ISourceViewer sourceViewer ) { if ( this.reconciler == null ) { this.reconcilingStrategy = new LdifReconcilingStrategy( editor ); // Reconciler reconciler = new Reconciler(); // reconciler.setIsIncrementalReconciler(true); // reconciler.setReconcilingStrategy(strategy, // LdifPartitionScanner.LDIF_RECORD); // reconciler.setReconcilingStrategy(strategy, // IDocument.DEFAULT_CONTENT_TYPE); // reconciler.setProgressMonitor(new NullProgressMonitor()); // reconciler.setDelay(500); // return reconciler; this.reconciler = new MonoReconciler( this.reconcilingStrategy, true ); this.reconciler.setProgressMonitor( new NullProgressMonitor() ); this.reconciler.setDelay( 500 ); } return this.reconciler; }
public IReconciler getReconciler(ISourceViewer sourceViewer) { if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) { protected IContentType getContentType() { return PROPERTIES_CONTENT_TYPE; } }; MonoReconciler reconciler= new MonoReconciler(strategy, false); reconciler.setIsIncrementalReconciler(false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }
/** * 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; }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { IReconcilingStrategy strategy; { if (markupValidationReconcilingStrategy == null) { markupValidationReconcilingStrategy = new MarkupValidationReconcilingStrategy(sourceViewer); markupValidationReconcilingStrategy.setMarkupLanguage(markupLanguage); markupValidationReconcilingStrategy.setResource(file); } IReconciler reconciler = super.getReconciler(sourceViewer); if (reconciler != null) { MultiReconcilingStrategy multiStrategy = new MultiReconcilingStrategy(); for (String contentType : FastMarkupPartitioner.ALL_CONTENT_TYPES) { maybeAddReconcilingStrategyForContentType(multiStrategy, reconciler, contentType); } maybeAddReconcilingStrategyForContentType(multiStrategy, reconciler, IDocument.DEFAULT_CONTENT_TYPE); multiStrategy.add(markupValidationReconcilingStrategy); strategy = multiStrategy; } else { strategy = markupValidationReconcilingStrategy; } } MonoReconciler reconciler = new MarkupMonoReconciler(strategy, false); reconciler.setIsIncrementalReconciler(false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }