/** * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer) */ @Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; if (!TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.ECLIPSE_BUILDIN_SPELLCHECKER)) return null; //Set TeXlipse spelling Engine as default PreferenceStore store = new PreferenceStore(); store.setValue(SpellingService.PREFERENCE_SPELLING_ENGINE, "org.eclipse.texlipse.LaTeXSpellEngine"); store.setValue(SpellingService.PREFERENCE_SPELLING_ENABLED, true); SpellingService spellingService = new SpellingService(store); if (spellingService.getActiveSpellingEngineDescriptor(store) == null) return null; IReconcilingStrategy strategy= new TeXSpellingReconcileStrategy(sourceViewer, spellingService); MonoReconciler reconciler= new MonoReconciler(strategy, true); reconciler.setDelay(500); reconciler.setProgressMonitor(new NullProgressMonitor()); return reconciler; }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) { @Override protected IContentType getContentType() { return PROPERTIES_CONTENT_TYPE; } }; MonoReconciler reconciler= new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) { @Override protected IContentType getContentType() { return EditorConfigTextTools.EDITORCONFIG_CONTENT_TYPE; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
@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; } //Overridden (just) to return a PyReconciler! IReconcilingStrategy strategy = new PyReconciler(sourceViewer, spellingService); MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setIsIncrementalReconciler(false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }
/** * @param store * @param coreStore */ // public ITPSourceViewerConfig(IPreferenceStore store, Preferences coreStore) // { // super(store, coreStore/* // * , CommonSourceViewerConfiguration.CODESCANNER_TYPE_ITP // */); // } public IReconciler getReconciler(ISourceViewer sourceViewer) { CommonReconcilingStrategy strategy = new ItpReconcilingStrategy(fEditor); MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { MonoReconciler reconciler = new MonoReconciler(new EiffelReconcilingStrategy(), true); reconciler.install(sourceViewer); return reconciler; }
public IReconciler getReconciler(ISourceViewer sourceViewer) { MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setIsIncrementalReconciler(false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(200); return reconciler; }
/** * */ public IReconciler getReconciler(ISourceViewer sourceViewer) { TLAReconcilingStrategy strategy = new TLAReconcilingStrategy(); strategy.setEditor(editor); MonoReconciler reconciler = new MonoReconciler(strategy, false); return reconciler; }
public IReconciler getReconciler(ISourceViewer sourceViewer) { NCLReconcilingStrategy strategy = new NCLReconcilingStrategy(); strategy.setEditor(editor); MonoReconciler reconciler = new MonoReconciler(strategy, false); return reconciler; }
@Override public IReconciler getReconciler(ISourceViewer viewer) { if (editor != null && editor.isEditable()) { MkReconcilingStrategy strategy = new MkReconcilingStrategy(viewer, editor, getConfiguredDocumentPartitioning(viewer)); MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setProgressMonitor(new ProgressMonitorAndCanceler()); reconciler.setDelay(500); return reconciler; } return null; }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { JsonReconcilingStrategy strategy = new JsonReconcilingStrategy(); strategy.setEditor(editor); MonoReconciler reconciler = new MonoReconciler(strategy, false); return reconciler; }
public IReconciler getReconciler( ISourceViewer sourceViewer ) { // Creates an instance of MonoReconciler with the specified strategy, // and is not incremental. return new MonoReconciler( new ScriptReconcilingStrategy( sourceViewer ), false ); }
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { JsonReconcilingStrategy strategy = new JsonReconcilingStrategy(); strategy.setTextEditor(textEditor); MonoReconciler reconciler = new MonoReconciler(strategy,false); return reconciler; }
public IReconciler getReconciler(ISourceViewer sourceViewer) { DefReconcilingStrategy strategy = new DefReconcilingStrategy(fEditor); MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setProgressMonitor(new NullProgressMonitor()); reconciler.setDelay(500); return reconciler; }
public DefaultCodeLensController(ITextEditor textEditor) { super(textEditor); reconciler = new MonoReconciler(super.getStrategy(), false); reconciler.setDelay(500); }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(final 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) { @Override protected ISpellingProblemCollector createSpellingProblemCollector() { final ISpellingProblemCollector collector = super.createSpellingProblemCollector(); return new ISpellingProblemCollector() { public void accept(SpellingProblem problem) { int offset = problem.getOffset(); int length = problem.getLength(); if (sourceViewer == null) { return; } IDocument document = sourceViewer.getDocument(); if (document == null) { return; } String text; try { text = document.get(offset, length); } catch (BadLocationException e) { return; } if (new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestIgnoredWordsFilter().ignoreWord(text)) { return; } collector.accept(problem); } public void beginCollecting() { collector.beginCollecting(); } public void endCollecting() { collector.endCollecting(); } }; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
public IReconciler getReconciler(ISourceViewer aSourceViewer) { return new MonoReconciler(fEditor.getReconcilingStrategy(), false); }