org.eclipse.jface.text.reconciler.MonoReconciler Java Examples

The following examples show how to use org.eclipse.jface.text.reconciler.MonoReconciler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TexSourceViewerConfiguration.java    From texlipse with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * @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;
}
 
Example #2
Source File: PropertiesFileSourceViewerConfiguration.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@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;
}
 
Example #3
Source File: EditorConfigSourceViewerConfiguration.java    From editorconfig-eclipse with Apache License 2.0 6 votes vote down vote up
@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;
}
 
Example #4
Source File: PyEditConfigurationWithoutEditor.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
@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;
}
 
Example #5
Source File: TLASourceViewerConfiguration.java    From tlaplus with MIT License 5 votes vote down vote up
/**
    * 
    */
   @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);
   }
 
Example #6
Source File: JsonSourceViewerConfiguration.java    From KaiZen-OpenAPI-Editor with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
    JsonReconcilingStrategy strategy = new JsonReconcilingStrategy();
    strategy.setEditor(editor);
    MonoReconciler reconciler = new MonoReconciler(strategy, false);
    return reconciler;
}
 
Example #7
Source File: CommitCommentArea.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public IReconciler getReconciler(ISourceViewer sourceViewer) {
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setIsIncrementalReconciler(false);
	reconciler.setProgressMonitor(new NullProgressMonitor());
	reconciler.setDelay(200);
	return reconciler;
}
 
Example #8
Source File: ScriptSourceViewerConfiguration.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
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 );
}