Search in sources :

Example 1 with EditorHighlightingProvidingColorSettingsPage

use of com.intellij.openapi.options.colors.EditorHighlightingProvidingColorSettingsPage in project intellij-community by JetBrains.

the class SimpleEditorPreview method updateView.

@Override
public void updateView() {
    EditorColorsScheme scheme = myOptions.getSelectedScheme();
    myEditor.setColorsScheme(scheme);
    EditorHighlighter highlighter = null;
    if (myPage instanceof EditorHighlightingProvidingColorSettingsPage) {
        highlighter = ((EditorHighlightingProvidingColorSettingsPage) myPage).createEditorHighlighter(scheme);
    }
    if (highlighter == null) {
        final SyntaxHighlighter pageHighlighter = myPage.getHighlighter();
        highlighter = HighlighterFactory.createHighlighter(pageHighlighter, scheme);
    }
    myEditor.setHighlighter(highlighter);
    updateHighlighters();
    myEditor.reinitSettings();
}
Also used : EditorColorsScheme(com.intellij.openapi.editor.colors.EditorColorsScheme) EditorHighlightingProvidingColorSettingsPage(com.intellij.openapi.options.colors.EditorHighlightingProvidingColorSettingsPage) SyntaxHighlighter(com.intellij.openapi.fileTypes.SyntaxHighlighter) EditorHighlighter(com.intellij.openapi.editor.highlighter.EditorHighlighter)

Aggregations

EditorColorsScheme (com.intellij.openapi.editor.colors.EditorColorsScheme)1 EditorHighlighter (com.intellij.openapi.editor.highlighter.EditorHighlighter)1 SyntaxHighlighter (com.intellij.openapi.fileTypes.SyntaxHighlighter)1 EditorHighlightingProvidingColorSettingsPage (com.intellij.openapi.options.colors.EditorHighlightingProvidingColorSettingsPage)1