Search in sources :

Example 1 with N4JSEditor

use of org.eclipse.n4js.ui.N4JSEditor in project n4js by eclipse.

the class InvalidatingHighlightingHelper method propertyChange.

@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    XtextEditor editor = myEditor;
    XtextSourceViewer sourceViewer = mySourceViewer;
    if (editor instanceof N4JSEditor && sourceViewer != null && event.getProperty().contains(".syntaxColorer.tokenStyles")) {
        ((N4JSEditor) editor).initializeViewerColors(sourceViewer);
        sourceViewer.invalidateTextPresentation();
    }
}
Also used : XtextSourceViewer(org.eclipse.xtext.ui.editor.XtextSourceViewer) XtextEditor(org.eclipse.xtext.ui.editor.XtextEditor) N4JSEditor(org.eclipse.n4js.ui.N4JSEditor)

Aggregations

N4JSEditor (org.eclipse.n4js.ui.N4JSEditor)1 XtextEditor (org.eclipse.xtext.ui.editor.XtextEditor)1 XtextSourceViewer (org.eclipse.xtext.ui.editor.XtextSourceViewer)1