本文整理汇总了Java中com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass类的典型用法代码示例。如果您正苦于以下问题:Java GeneralHighlightingPass类的具体用法?Java GeneralHighlightingPass怎么用?Java GeneralHighlightingPass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeneralHighlightingPass类属于com.intellij.codeInsight.daemon.impl包,在下文中一共展示了GeneralHighlightingPass类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDomHighlighter
import com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass; //导入依赖的package包/类
@Override
public BackgroundEditorHighlighter createDomHighlighter(final Project project, final PerspectiveFileEditor editor, final DomElement element) {
return new BackgroundEditorHighlighter() {
@Override
@NotNull
public HighlightingPass[] createPassesForEditor() {
if (!element.isValid()) return HighlightingPass.EMPTY_ARRAY;
final XmlFile psiFile = DomUtil.getFile(element);
final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
final Document document = psiDocumentManager.getDocument(psiFile);
if (document == null) return HighlightingPass.EMPTY_ARRAY;
editor.commit();
psiDocumentManager.commitAllDocuments();
GeneralHighlightingPass ghp = new GeneralHighlightingPass(project, psiFile, document, 0, document.getTextLength(),
true, new ProperTextRange(0, document.getTextLength()), null, new DefaultHighlightInfoProcessor());
LocalInspectionsPass lip = new LocalInspectionsPass(psiFile, document, 0,
document.getTextLength(), LocalInspectionsPass.EMPTY_PRIORITY_RANGE, true,
new DefaultHighlightInfoProcessor());
return new HighlightingPass[]{ghp, lip};
}
@Override
@NotNull
public HighlightingPass[] createPassesForVisibleArea() {
return createPassesForEditor();
}
};
}
示例2: createDomHighlighter
import com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass; //导入依赖的package包/类
public BackgroundEditorHighlighter createDomHighlighter(final Project project, final PerspectiveFileEditor editor, final DomElement element) {
return new BackgroundEditorHighlighter() {
@NotNull
public HighlightingPass[] createPassesForEditor() {
if (!element.isValid()) return HighlightingPass.EMPTY_ARRAY;
final XmlFile psiFile = DomUtil.getFile(element);
final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
final Document document = psiDocumentManager.getDocument(psiFile);
if (document == null) return HighlightingPass.EMPTY_ARRAY;
editor.commit();
psiDocumentManager.commitAllDocuments();
GeneralHighlightingPass ghp = new GeneralHighlightingPass(project, psiFile, document, 0, document.getTextLength(), true);
LocalInspectionsPass lip = new LocalInspectionsPass(psiFile, document, 0,
document.getTextLength(), LocalInspectionsPass.EMPTY_PRIORITY_RANGE, true);
return new HighlightingPass[]{ghp, lip};
}
@NotNull
public HighlightingPass[] createPassesForVisibleArea() {
return createPassesForEditor();
}
};
}
示例3: createDomHighlighter
import com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass; //导入依赖的package包/类
public BackgroundEditorHighlighter createDomHighlighter(final Project project, final PerspectiveFileEditor editor, final DomElement element) {
return new BackgroundEditorHighlighter() {
@NotNull
public HighlightingPass[] createPassesForEditor() {
if (!element.isValid()) return HighlightingPass.EMPTY_ARRAY;
final XmlFile psiFile = DomUtil.getFile(element);
final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
final Document document = psiDocumentManager.getDocument(psiFile);
if (document == null) return HighlightingPass.EMPTY_ARRAY;
editor.commit();
psiDocumentManager.commitAllDocuments();
GeneralHighlightingPass ghp = new GeneralHighlightingPass(project, psiFile, document, 0, document.getTextLength(),
true, new ProperTextRange(0, document.getTextLength()), null, new DefaultHighlightInfoProcessor());
LocalInspectionsPass lip = new LocalInspectionsPass(psiFile, document, 0,
document.getTextLength(), LocalInspectionsPass.EMPTY_PRIORITY_RANGE, true,
HighlightInfoProcessor.getEmpty());
return new HighlightingPass[]{ghp, lip};
}
@NotNull
public HighlightingPass[] createPassesForVisibleArea() {
return createPassesForEditor();
}
};
}