Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html /
  
  package org.eclipse.xtext.ui.editor.syntaxcoloring;
  
 import  org.eclipse.jface.preference.IPreferenceStore;
 import  org.eclipse.jface.util.IPropertyChangeListener;
 import  org.eclipse.jface.util.PropertyChangeEvent;
 
Highlighting helper. Initially copied from org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager

Author(s):
Sebastian Zarnekow
 
 public class HighlightingHelper implements IHighlightingHelper, IPropertyChangeListener {
 
 	
 	
 	
Highlighting presenter
 
Highlighting reconciler
 
The editor
 
 	private XtextEditor fEditor;
The source viewer
 
The source viewer configuration
 
The presentation reconciler
 
 
 	private IPreferenceStore preferenceStore;
 
 	public void install(XtextEditor editorXtextSourceViewer sourceViewer) {
 		editor;
 		if ( != null) {
 			install(editor.getXtextSourceViewerConfiguration(), sourceViewer) ;
 		}
 	}

Since:
2.3
 
 	public void install(XtextSourceViewerConfiguration configurationXtextSourceViewer sourceViewer) {
 		sourceViewer;
 		configuration;
 		if(sourceViewer != null && configuration != null){
 		} else {
 			 = null;
 		}
 		.addPropertyChangeListener(this);
 		enable();
 	}

Enable advanced highlighting.
 
 	private void enable() {
 
 		if (.getDocument() != null) {
 		}
 	}
 
 	public void uninstall() {
 		disable();
 		if ( != null) {
			.removePropertyChangeListener(this);
		}
		null;
	}

Disable advanced highlighting.
	private void disable() {
		if ( != null) {
		}
		if ( != null) {
			null;
		}
	}

Returns this hightlighter's reconciler.

Returns:
the highlighter reconciler or null if none
		return ;
	}
	public void setReconcilerProvider(Provider<HighlightingReconcilerreconcilerProvider) {
		this. = reconcilerProvider;
	}
	}
	public void setPresenterProvider(Provider<HighlightingPresenterpresenterProvider) {
		this. = presenterProvider;
	}
	}
	public void setPreferenceStoreAccessor(IPreferenceStoreAccess preferenceStoreAccessor) {
		this. = preferenceStoreAccessor;
	}
	}
	public void propertyChange(PropertyChangeEvent event) {
		if ( != null &&  != null) {
			if (event.getProperty().startsWith(PreferenceStoreAccessor.tokenTypeTag(.getLanguageName()))) {
			}
		}
	}
New to GrepCode? Check out our FAQ X