本文整理汇总了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);
}
}
}
示例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();
}
示例3: clearDiffPresentation
import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
private void clearDiffPresentation() {
myPanel.resetNotifications();
for (RangeHighlighter highlighter : myHighlighters) {
highlighter.dispose();
}
myHighlighters.clear();
}
示例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();
}
示例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);
}
示例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();
}
}
}
示例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;
}
}
示例8: destroyHighlighter
import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public void destroyHighlighter() {
for (RangeHighlighter highlighter : myHighlighters) {
highlighter.dispose();
}
myHighlighters.clear();
}
示例9: dropHighlight
import com.intellij.openapi.editor.markup.RangeHighlighter; //导入方法依赖的package包/类
public void dropHighlight() {
for (RangeHighlighter h : myActiveHighliters) {
h.dispose();
}
myActiveHighliters.clear();
}
示例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));
}