Using the reconciler programmatically [message #723681] |
Fri, 09 September 2011 06:59 |
Eclipse User |
|
|
|
Hello,
what is the best way to use the reconciler of the xtext edior programmatically?
I have an action which should just switch background color of particular text areas in the xtext editor. What I tried to do is to use a boolean value in the semantic highlighting configuration class for switching betweeen options and the reconciler's refresh method to initiate an update in the editor, but i get a NullPointerException at
org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.refresh(HighlightingReconciler.java:243)
the code in the Action:
public class SetColorForBackgroundAction implements IWorkbenchWindowPulldownDelegate {
@Inject
private HighlightingReconciler reconciler;
@Inject
private SemanticHighlightingConfiguration conf;
public void run(IAction action) {
conf.setColorForBackground(true);
reconciler.refresh();
}
}
What is the best way to implement such functionality?
thanks in advance
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02975 seconds