Search in sources :

Example 1 with LayeredHighlighterIterator

use of com.intellij.openapi.editor.ex.util.LayeredHighlighterIterator in project intellij-community by JetBrains.

the class SyntaxHighlighterOverEditorHighlighter method resetPosition.

public void resetPosition(int startOffset) {
    if (lexer instanceof LexerEditorHighlighterLexer) {
        ((LexerEditorHighlighterLexer) lexer).resetPosition(startOffset);
        HighlighterIterator iterator = ((LexerEditorHighlighterLexer) lexer).getHighlighterIterator();
        if (iterator instanceof LayeredHighlighterIterator) {
            layeredHighlighterIterator = (LayeredHighlighterIterator) iterator;
        } else {
            layeredHighlighterIterator = null;
        }
    } else {
        CharSequence text = lexer.getBufferSequence();
        lexer.start(text, startOffset, text.length());
    }
}
Also used : LayeredHighlighterIterator(com.intellij.openapi.editor.ex.util.LayeredHighlighterIterator) LexerEditorHighlighterLexer(com.intellij.psi.impl.search.LexerEditorHighlighterLexer) HighlighterIterator(com.intellij.openapi.editor.highlighter.HighlighterIterator) LayeredHighlighterIterator(com.intellij.openapi.editor.ex.util.LayeredHighlighterIterator)

Aggregations

LayeredHighlighterIterator (com.intellij.openapi.editor.ex.util.LayeredHighlighterIterator)1 HighlighterIterator (com.intellij.openapi.editor.highlighter.HighlighterIterator)1 LexerEditorHighlighterLexer (com.intellij.psi.impl.search.LexerEditorHighlighterLexer)1