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

下面列出了怎么用org.eclipse.jface.text.reconciler.MonoReconciler的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: 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;
}
 
@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;
}
 
源代码4 项目: 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;
}
 
源代码5 项目: tlaplus   文件: TLASourceViewerConfiguration.java
/**
    * 
    */
   @Override
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
       final TLAReconcilingStrategy strategy = new TLAReconcilingStrategy();
       strategy.setEditor(editor);
       if (sourceViewer instanceof ProjectionViewer) {
       	strategy.setProjectionViewer((ProjectionViewer)sourceViewer);
       }
       return new MonoReconciler(strategy, false);
   }
 
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    JsonReconcilingStrategy strategy = new JsonReconcilingStrategy();
    strategy.setEditor(editor);
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    return reconciler;
}
 
源代码7 项目: 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;
}
 
源代码8 项目: 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 );
}
 
 类所在包
 同包方法