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

项目:ec4e    文件:CompositeReconcilingStrategy.java   
@Override
public void install(ITextViewer textViewer) {
    if (fStrategies == null)
        return;

    for (int i = 0; i < fStrategies.length; i++) {
        if (fStrategies[i] instanceof IReconciler) {
            IReconciler extension = (IReconciler) fStrategies[i];
            try {
                extension.install(textViewer);
            } catch (Exception e) {

            }

        }
    }
}
项目:ec4e    文件:CompositeReconcilingStrategy.java   
@Override
public void uninstall() {
    if (fStrategies == null)
        return;

    for (int i = 0; i < fStrategies.length; i++) {
        if (fStrategies[i] instanceof IReconciler) {
            IReconciler extension = (IReconciler) fStrategies[i];
            try {
                extension.uninstall();
            } catch (Exception e) {

            }

        }
    }
}
项目: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    文件:FluentMkEditor.java   
@Override
protected void doSetInput(IEditorInput input) throws CoreException {
    if (getDocument() != null) getDocument().removeDocumentListener(docListener);
    setPreferenceStore(getPrefsStore());
    super.doSetInput(input);
    IDocument doc = getDocumentProvider().getDocument(input);

    // check and correct line endings
    String tmp = doc.get();
    int hash = tmp.hashCode();
    tmp = Strings.normalize(tmp);
    if (hash != tmp.hashCode()) doc.set(tmp);

    connectPartitioningToElement(input, doc);

    FluentMkSourceViewer sourceViewer = (FluentMkSourceViewer) getSourceViewer();
    if (sourceViewer != null && sourceViewer.getReconciler() == null) {
        IReconciler reconciler = getSourceViewerConfiguration().getReconciler(sourceViewer);
        if (reconciler != null) {
            reconciler.install(sourceViewer);
            sourceViewer.setReconciler(reconciler);
        }
    }

    // Attach listener to new doc
    getDocument().addDocumentListener(docListener);
    installSemanticHighlighting();

    // Initialize code folding
    if (projectionProvider != null) {
        projectionProvider.initialize();
    }
}
项目: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;
}
项目:typescript.java    文件:JavaScriptLightWeightEditor.java   
private void internalDoSetInput(IEditorInput input) throws CoreException {
    ISourceViewer sourceViewer = getSourceViewer();
    TypeScriptSourceViewer TypeScriptSourceViewer = null;
    if (sourceViewer instanceof TypeScriptSourceViewer)
        TypeScriptSourceViewer = (TypeScriptSourceViewer) sourceViewer;

    IPreferenceStore store = getPreferenceStore();
    // if (TypeScriptSourceViewer != null && isFoldingEnabled() &&(store ==
    // null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
    // TypeScriptSourceViewer.prepareDelayedProjection();

    super.doSetInput(input);

    if (TypeScriptSourceViewer != null && TypeScriptSourceViewer.getReconciler() == null) {
        IReconciler reconciler = getSourceViewerConfiguration().getReconciler(TypeScriptSourceViewer);
        if (reconciler != null) {
            reconciler.install(TypeScriptSourceViewer);
            TypeScriptSourceViewer.setReconciler(reconciler);
        }
    }

    // if (fEncodingSupport != null)
    // fEncodingSupport.reset();

    // setOutlinePageInput(fOutlinePage, input);
    //
    // if (isShowingOverrideIndicators())
    // installOverrideIndicator(false);
}
项目:bts    文件:XtextSourceViewer.java   
/**
 * @since 2.3
 */
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
    if (IReconciler.class.isAssignableFrom(adapter)) {
        return fReconciler;
    }
    return Platform.getAdapterManager().getAdapter(this, adapter);
}
项目:gwt-eclipse-plugin    文件:UiBinderStructuredRegionProcessor.java   
public static void setAsReconciler(
    StructuredTextViewerConfiguration configuration) throws Exception {
  try {
    IReconciler reconciler = createReconciler();

    // Reflectively set the spelling service to our own
    Field reconcilerField = StructuredTextViewerConfiguration.class.getDeclaredField("fReconciler");
    reconcilerField.setAccessible(true);
    reconcilerField.set(configuration, reconciler);
  } catch (Throwable t) {
    throw new Exception(t);
  }
}
项目:gwt-eclipse-plugin    文件:UiBinderStructuredRegionProcessor.java   
/**
 * Creates and initializes the UI Binder-specific reconciler.
 */
private static IReconciler createReconciler() {
  // Initialization mirrors StructuredTextViewerConfiguration.getReconciler.
  // Difference: We do not have an ISourceViewer, but the
  // ISourceViewer.getConfiguredDocumentPartitioning for structured text
  // always returns the DEFAULT_STRUCTURED_PARTITIONING (the method is final
  // and it is just a simple return of this value.)
  UiBinderStructuredRegionProcessor reconciler = new UiBinderStructuredRegionProcessor();
  reconciler.setDocumentPartitioning(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
  return reconciler;
}
项目:gwt-eclipse-plugin    文件:GWTSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
  JavaReconciler reconciler = (JavaReconciler) super.getReconciler(sourceViewer);
  if (reconciler != null) {
    try {
      JavaCompositeReconcilingStrategy strategy = (JavaCompositeReconcilingStrategy) reconciler.getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
      IReconcilingStrategy[] strategies = strategy.getReconcilingStrategies();
      IReconcilingStrategy[] newStrategies = new IReconcilingStrategy[strategies.length];
      for (int i = 0; i < strategies.length; i++) {
        if (strategies[i] instanceof JavaSpellingReconcileStrategy) {
          // Replace the default Java reconcile strategy with our own, which
          // will suppress spell checking within JSNI blocks
          newStrategies[i] = new GWTJavaSpellingReconcileStrategy(
              sourceViewer, getEditor());
        } else {
          newStrategies[i] = strategies[i];
        }
      }
      strategy.setReconcilingStrategies(newStrategies);
    } catch (Exception e) {
      // We're being defensive to ensure that we always return a reconciler
      GWTPluginLog.logError(e);
    }
    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;
}
项目:CooperateModelingEnvironment    文件:CooperateCDOXtextEditor.java   
private void waitForReconcileToStartAndFinish() {
    Optional<XtextReconciler> foundReconciler = Optional.ofNullable(getInternalSourceViewer())
            .filter(IAdaptable.class::isInstance).map(IAdaptable.class::cast)
            .map(a -> a.getAdapter(IReconciler.class)).filter(XtextReconciler.class::isInstance)
            .map(XtextReconciler.class::cast);
    if (!foundReconciler.isPresent()) {
        return;
    }

    JobStartListener listener = new JobStartListener();
    XtextReconciler reconciler = foundReconciler.get();
    try {
        reconciler.join();
        reconciler.addJobChangeListener(listener);
        reconciler.forceReconcile();
        synchronized (listener) {
            while (!listener.isStarted()) {
                listener.wait();
            }
        }
        reconciler.join();
    } catch (InterruptedException e) {
        return;
    } finally {
        reconciler.removeJobChangeListener(listener);
    }
}
项目: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;
}
项目:APICloud-Studio    文件:CommonSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer)
{
    if (fTextEditor != null && fTextEditor.isEditable())
    {
        IReconcilingStrategy reconcilingStrategy = new CommonReconcilingStrategy(fTextEditor);
        if (EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
        {
            SpellingService spellingService = EditorsUI.getSpellingService();
            Collection<String> spellingContentTypes = getSpellingContentTypes(sourceViewer);
            if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) != null
                    && !spellingContentTypes.isEmpty())
            {
                reconcilingStrategy = new CompositeReconcilingStrategy(reconcilingStrategy,
                        new MultiRegionSpellingReconcileStrategy(sourceViewer, spellingService,
                                getConfiguredDocumentPartitioning(sourceViewer), spellingContentTypes));
            }
        }
        CommonReconciler reconciler = new CommonReconciler(reconcilingStrategy);
        reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
        reconciler.setIsIncrementalReconciler(false);
        reconciler.setIsAllowedToModifyDocument(false);
        reconciler.setProgressMonitor(new NullProgressMonitor());
        reconciler.setDelay(500);
        return fReconciler = reconciler;
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {

    final ITextEditor editor= getEditor();
    if (editor != null && editor.isEditable()) {

        JavaCompositeReconcilingStrategy strategy= new JavaCompositeReconcilingStrategy(sourceViewer, editor, getConfiguredDocumentPartitioning(sourceViewer));
        JavaReconciler reconciler= new JavaReconciler(editor, strategy, false);
        reconciler.setIsAllowedToModifyDocument(false);
        reconciler.setDelay(500);

        return reconciler;
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaEditor.java   
private void internalDoSetInput(IEditorInput input) throws CoreException {
    ISourceViewer sourceViewer= getSourceViewer();
    JavaSourceViewer javaSourceViewer= null;
    if (sourceViewer instanceof JavaSourceViewer)
        javaSourceViewer= (JavaSourceViewer)sourceViewer;

    IPreferenceStore store= getPreferenceStore();
    if (javaSourceViewer != null && isFoldingEnabled() &&(store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
        javaSourceViewer.prepareDelayedProjection();

    super.doSetInput(input);

    if (javaSourceViewer != null && javaSourceViewer.getReconciler() == null) {
        IReconciler reconciler= getSourceViewerConfiguration().getReconciler(javaSourceViewer);
        if (reconciler != null) {
            reconciler.install(javaSourceViewer);
            javaSourceViewer.setReconciler(reconciler);
        }
    }

    if (fEncodingSupport != null)
        fEncodingSupport.reset();

    setOutlinePageInput(fOutlinePage, input);

    if (isShowingOverrideIndicators())
        installOverrideIndicator(false);
}
项目:idecore    文件:ApexSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    if (fTextEditor != null && fTextEditor.isEditable()) {
        ApexReconcilingStrategy strategy = new ApexReconcilingStrategy((ApexCodeEditor) fTextEditor);
        ApexReconciler reconciler = new ApexReconciler(fTextEditor, strategy, false);
        reconciler.setIsAllowedToModifyDocument(false);
        reconciler.setDelay(500);

        return reconciler;
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaSourceViewerConfiguration.java   
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {

    final ITextEditor editor= getEditor();
    if (editor != null && editor.isEditable()) {

        JavaCompositeReconcilingStrategy strategy= new JavaCompositeReconcilingStrategy(sourceViewer, editor, getConfiguredDocumentPartitioning(sourceViewer));
        JavaReconciler reconciler= new JavaReconciler(editor, strategy, false);
        reconciler.setIsAllowedToModifyDocument(false);
        reconciler.setDelay(500);

        return reconciler;
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaEditor.java   
private void internalDoSetInput(IEditorInput input) throws CoreException {
    ISourceViewer sourceViewer= getSourceViewer();
    JavaSourceViewer javaSourceViewer= null;
    if (sourceViewer instanceof JavaSourceViewer)
        javaSourceViewer= (JavaSourceViewer)sourceViewer;

    IPreferenceStore store= getPreferenceStore();
    if (javaSourceViewer != null && isFoldingEnabled() &&(store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
        javaSourceViewer.prepareDelayedProjection();

    super.doSetInput(input);

    if (javaSourceViewer != null && javaSourceViewer.getReconciler() == null) {
        IReconciler reconciler= getSourceViewerConfiguration().getReconciler(javaSourceViewer);
        if (reconciler != null) {
            reconciler.install(javaSourceViewer);
            javaSourceViewer.setReconciler(reconciler);
        }
    }

    if (fEncodingSupport != null)
        fEncodingSupport.reset();

    setOutlinePageInput(fOutlinePage, input);

    if (isShowingOverrideIndicators())
        installOverrideIndicator(false);
}
项目: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;
}
项目:eclipse-batch-editor    文件:BatchSourceViewerConfiguration.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    /* currently we avoid the default reconciler mechanism parts (spell checking etc.)*/
    return null;
}
项目:eclipse-bash-editor    文件:BashSourceViewerConfiguration.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    /* currently we avoid the default reconciler mechanism parts (spell checking etc.)*/
    return null;
}
项目:ec4e    文件:EditorConfigReconciler.java   
@Override
public void install(ITextViewer textViewer) {
    super.install(textViewer);
    ((IReconciler) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE)).install(textViewer);
}
项目:ec4e    文件:EditorConfigReconciler.java   
@Override
public void uninstall() {
    super.uninstall();
    ((IReconciler) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE)).uninstall();
}
项目:egradle    文件:AbstractGroovySourceViewerConfiguration.java   
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    /* currently we avoid the default reconciler mechanism parts (spell checking etc.)*/
    return null;
}
项目: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;
}