Package com.intellij.codeInsight.highlighting

Examples of com.intellij.codeInsight.highlighting.HighlightManagerImpl.hideHighlights()


    CaretListener caretListener = editor.getUserData(GRAMMAR_UPDATE_RUNNING);
    if (caretListener != null) {
      editor.putUserData(GRAMMAR_UPDATE_RUNNING, null);
      editor.getCaretModel().removeCaretListener(caretListener);
      HighlightManagerImpl highlightManager = (HighlightManagerImpl)HighlightManager.getInstance(project);
      highlightManager.hideHighlights(grammarEditor, HighlightManager.HIDE_BY_ESCAPE | HighlightManager.HIDE_BY_ANY_KEY);
    }
    else {
      updateGrammarHighlighters(project, editor, livePreviewLanguage, grammarEditor);

      caretListener = new CaretAdapter() {
View Full Code Here


    EditorColorsManager manager = EditorColorsManager.getInstance();
    TextAttributes trueAttrs = manager.getGlobalScheme().getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES);
    TextAttributes falseAttrs = manager.getGlobalScheme().getAttributes(EditorColors.WRITE_SEARCH_RESULT_ATTRIBUTES);

    HighlightManagerImpl highlightManager = (HighlightManagerImpl)HighlightManager.getInstance(project);
    highlightManager.hideHighlights(grammarEditor, HighlightManager.HIDE_BY_ESCAPE | HighlightManager.HIDE_BY_ANY_KEY);
    for (TextRange range : trueRanges) {
      highlightManager.addRangeHighlight(grammarEditor, range.getStartOffset(), range.getEndOffset(), trueAttrs, true, null);
    }
    for (TextRange range : falseRanges) {
      highlightManager.addRangeHighlight(grammarEditor, range.getStartOffset(), range.getEndOffset(), falseAttrs, true, null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.