Search in sources :

Example 1 with LightHighlighterClient

use of com.intellij.openapi.editor.highlighter.LightHighlighterClient in project intellij-community by JetBrains.

the class EditorWindowImpl method getHighlighter.

@NotNull
@Override
public EditorHighlighter getHighlighter() {
    EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
    SyntaxHighlighter syntaxHighlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(myInjectedFile.getLanguage(), getProject(), myInjectedFile.getVirtualFile());
    EditorHighlighter highlighter = HighlighterFactory.createHighlighter(syntaxHighlighter, scheme);
    highlighter.setText(getDocument().getText());
    highlighter.setEditor(new LightHighlighterClient(getDocument(), getProject()));
    return highlighter;
}
Also used : LightHighlighterClient(com.intellij.openapi.editor.highlighter.LightHighlighterClient) EditorColorsScheme(com.intellij.openapi.editor.colors.EditorColorsScheme) SyntaxHighlighter(com.intellij.openapi.fileTypes.SyntaxHighlighter) EditorHighlighter(com.intellij.openapi.editor.highlighter.EditorHighlighter) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

EditorColorsScheme (com.intellij.openapi.editor.colors.EditorColorsScheme)1 EditorHighlighter (com.intellij.openapi.editor.highlighter.EditorHighlighter)1 LightHighlighterClient (com.intellij.openapi.editor.highlighter.LightHighlighterClient)1 SyntaxHighlighter (com.intellij.openapi.fileTypes.SyntaxHighlighter)1 NotNull (org.jetbrains.annotations.NotNull)1