Java 类org.eclipse.jface.text.reconciler.MonoReconciler 实例源码

项目:texlipse    文件:TexSourceViewerConfiguration.java   
/**
 * @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;
}
项目:Eclipse-Postfix-Code-Completion    文件:PropertiesFileSourceViewerConfiguration.java   
@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;
}
项目:editorconfig-eclipse    文件:EditorConfigSourceViewerConfiguration.java   
@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;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PropertiesFileSourceViewerConfiguration.java   
@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;
}
项目:Pydev    文件:PyEditConfigurationWithoutEditor.java   
@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;
}
项目:dLabPro-Plugin    文件:ITPSourceViewerConfig.java   
/**
   * @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;
  }
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    MonoReconciler reconciler = new MonoReconciler(new EiffelReconcilingStrategy(), true);
    reconciler.install(sourceViewer);

    return reconciler;
}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    MonoReconciler reconciler = new MonoReconciler(new EiffelReconcilingStrategy(), true);
    reconciler.install(sourceViewer);

    return reconciler;
}
项目:subclipse    文件:CommitCommentArea.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    reconciler.setIsIncrementalReconciler(false);
    reconciler.setProgressMonitor(new NullProgressMonitor());
    reconciler.setDelay(200);
    return reconciler;
}
项目:tlaplus    文件:TLASourceViewerConfiguration.java   
/**
 * 
 */
public IReconciler getReconciler(ISourceViewer sourceViewer)
{
    TLAReconcilingStrategy strategy = new TLAReconcilingStrategy();
    strategy.setEditor(editor);
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    return reconciler;
}
项目:ncl30-eclipse    文件:NCLConfiguration.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    NCLReconcilingStrategy strategy = new NCLReconcilingStrategy();
    strategy.setEditor(editor);

    MonoReconciler reconciler = new MonoReconciler(strategy, false);

    return reconciler;
}
项目:fluentmark    文件:FluentMkSourceViewerConfiguration.java   
@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;
}
项目:KaiZen-OpenAPI-Editor    文件:JsonSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    JsonReconcilingStrategy strategy = new JsonReconcilingStrategy();
    strategy.setEditor(editor);
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    return reconciler;
}
项目:APICloud-Studio    文件:CommitCommentArea.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    reconciler.setIsIncrementalReconciler(false);
    reconciler.setProgressMonitor(new NullProgressMonitor());
    reconciler.setDelay(200);
    return reconciler;
}
项目:birt    文件:ScriptSourceViewerConfiguration.java   
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 );
}
项目:wt-studio    文件:JsonSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    JsonReconcilingStrategy strategy = new JsonReconcilingStrategy();
    strategy.setTextEditor(textEditor);
       MonoReconciler reconciler = new MonoReconciler(strategy,false);
       return reconciler;
}
项目:dLabPro-Plugin    文件:DEFSourceViewerConfig.java   
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;
}
项目:codelens-eclipse    文件:DefaultCodeLensController.java   
public DefaultCodeLensController(ITextEditor textEditor) {
    super(textEditor);
    reconciler = new MonoReconciler(super.getStrategy(), false);
    reconciler.setDelay(500);
}
项目:DarwinSPL    文件:DwprofileSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyexpressionSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyvalidityformulaSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HydatavalueSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HymappingSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyconstraintsSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HymanifestSourceViewerConfiguration.java   
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;
}
项目:velocity-edit    文件:VelocityConfiguration.java   
public IReconciler getReconciler(ISourceViewer aSourceViewer)
{
    return new MonoReconciler(fEditor.getReconcilingStrategy(), false);
}