当前位置: 首页>>代码示例>>Java>>正文


Java RangeHighlighter.dispose方法代码示例

本文整理汇总了Java中com.intellij.openapi.editor.markup.RangeHighlighter.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java RangeHighlighter.dispose方法的具体用法?Java RangeHighlighter.dispose怎么用?Java RangeHighlighter.dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.editor.markup.RangeHighlighter的用法示例。


在下文中一共展示了RangeHighlighter.dispose方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: focusCurrentHighlighter

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
private void focusCurrentHighlighter(boolean toSelect) {
  if (isFinished()) {
    return;
  }
  if (myCurrentVariableNumber >= myTabStopHighlighters.size()) {
    return;
  }
  RangeHighlighter segmentHighlighter = myTabStopHighlighters.get(myCurrentVariableNumber);
  if (segmentHighlighter != null) {
    final int segmentNumber = getCurrentSegmentNumber();
    RangeHighlighter newSegmentHighlighter = getSegmentHighlighter(segmentNumber, toSelect, false);
    if (newSegmentHighlighter != null) {
      segmentHighlighter.dispose();
      myTabStopHighlighters.set(myCurrentVariableNumber, newSegmentHighlighter);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:TemplateState.java

示例2: onDispose

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
@Override
@CalledInAwt
protected void onDispose() {
  for (RangeHighlighter highlighter : myHighlighters) {
    highlighter.dispose();
  }
  myHighlighters.clear();
  super.onDispose();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SimpleOnesideDiffViewer.java

示例3: clearDiffPresentation

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
private void clearDiffPresentation() {
  myPanel.resetNotifications();

  for (RangeHighlighter highlighter : myHighlighters) {
    highlighter.dispose();
  }
  myHighlighters.clear();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SimpleOnesideDiffViewer.java

示例4: removeAllHighlighters

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
@Override
public void removeAllHighlighters() {
  ApplicationManager.getApplication().assertIsDispatchThread();
  for (RangeHighlighter highlighter : getAllHighlighters()) {
    highlighter.dispose();
  }
  myCachedHighlighters = null;
  myHighlighterTree.clear();
  myHighlighterTreeForLines.clear();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:MarkupModelImpl.java

示例5: uninstall

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public void uninstall() {
  for (RangeHighlighter highlighter : myHighlighters) {
    highlighter.dispose();
  }

  Component internalComponent = myHighlighterView.getContentComponent();
  internalComponent.setCursor(myStoredCursor);
  internalComponent.removeKeyListener(myEditorKeyListener);
  myHighlighterView.getScrollingModel().removeVisibleAreaListener(myVisibleAreaListener);
  myFileEditorManager.removeFileEditorManagerListener(myFileEditorManagerListener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:CtrlMouseHandler.java

示例6: clearMyHighlights

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public static void clearMyHighlights(Document document, Project project) {
  MarkupModel markupModel = DocumentMarkupModel.forDocument(document, project, true);
  for (RangeHighlighter highlighter : markupModel.getAllHighlighters()) {
    Object tooltip = highlighter.getErrorStripeTooltip();
    if (!(tooltip instanceof HighlightInfo)) {
      continue;
    }
    HighlightInfo info = (HighlightInfo)tooltip;
    if (info.type == HighlightInfoType.ELEMENT_UNDER_CARET_READ || info.type == HighlightInfoType.ELEMENT_UNDER_CARET_WRITE) {
      highlighter.dispose();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:IdentifierHighlighterPass.java

示例7: releaseEditor

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
private void releaseEditor() {
  if (myEditor != null) {
    for (RangeHighlighter segmentHighlighter : myTabStopHighlighters) {
      segmentHighlighter.dispose();
    }
    myTabStopHighlighters.clear();
    myEditor = null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TemplateState.java

示例8: destroyHighlighter

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public void destroyHighlighter() {
  for (RangeHighlighter highlighter : myHighlighters) {
    highlighter.dispose();
  }
  myHighlighters.clear();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:SimpleThreesideDiffChange.java

示例9: dropHighlight

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public void dropHighlight() {
  for (RangeHighlighter h : myActiveHighliters) {
    h.dispose();
  }
  myActiveHighliters.clear();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ScopeHighlighter.java

示例10: execute

import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
private void execute(Editor editor) {
    final Project project = editor.getProject();
    final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
    if (psiFile == null) {
        return;
    }

    InputExpressionDialog.Context input;
    XmlElement contextNode = null;
    final Config cfg = myComponent.getConfig();
    do {
        RangeHighlighter contextHighlighter = null;
        if (cfg.isUseContextAtCursor()) {
            // find out current context node
            contextNode = MyPsiUtil.findContextNode(psiFile, editor);
            if (contextNode != null) {
                contextHighlighter = HighlighterUtil.highlightNode(editor, contextNode, cfg.getContextAttributes(), cfg);
            }
        }
        if (contextNode == null) {
            // in XPath data model, / is the document itself, including comments, PIs and the root element
            contextNode = ((XmlFile)psiFile).getDocument();
            if (contextNode == null) {
              FileViewProvider fileViewProvider = psiFile.getViewProvider();
              if (fileViewProvider instanceof TemplateLanguageFileViewProvider) {
                Language dataLanguage = ((TemplateLanguageFileViewProvider)fileViewProvider).getTemplateDataLanguage();
                PsiFile templateDataFile = fileViewProvider.getPsi(dataLanguage);
                if (templateDataFile instanceof XmlFile) contextNode = ((XmlFile)templateDataFile).getDocument();
              }
            }
        }

        input = inputXPathExpression(project, contextNode);
        if (contextHighlighter != null) {
            contextHighlighter.dispose();
        }
        if (input == null) {
            return;
        }

        HighlighterUtil.clearHighlighters(editor);
    } while (contextNode != null && evaluateExpression(input, contextNode, editor, cfg));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:44,代码来源:XPathEvalAction.java


注:本文中的com.intellij.openapi.editor.markup.RangeHighlighter.dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。