本文整理汇总了Java中com.intellij.codeInsight.daemon.LineMarkerProvider.collectSlowLineMarkers方法的典型用法代码示例。如果您正苦于以下问题:Java LineMarkerProvider.collectSlowLineMarkers方法的具体用法?Java LineMarkerProvider.collectSlowLineMarkers怎么用?Java LineMarkerProvider.collectSlowLineMarkers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.daemon.LineMarkerProvider
的用法示例。
在下文中一共展示了LineMarkerProvider.collectSlowLineMarkers方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assertLineMarker
import com.intellij.codeInsight.daemon.LineMarkerProvider; //导入方法依赖的package包/类
public void assertLineMarker(@NotNull PsiElement psiElement, @NotNull LineMarker.Assert assertMatch) {
final List<PsiElement> elements = collectPsiElementsRecursive(psiElement);
for (LineMarkerProvider lineMarkerProvider : LineMarkerProviders.INSTANCE.allForLanguage(psiElement.getLanguage())) {
Collection<LineMarkerInfo> lineMarkerInfos = new ArrayList<LineMarkerInfo>();
lineMarkerProvider.collectSlowLineMarkers(elements, lineMarkerInfos);
if(lineMarkerInfos.size() == 0) {
continue;
}
for (LineMarkerInfo lineMarkerInfo : lineMarkerInfos) {
if(assertMatch.match(lineMarkerInfo)) {
return;
}
}
}
fail(String.format("Fail that '%s' matches on of '%s' PsiElements", assertMatch.getClass(), elements.size()));
}
示例2: assertLineMarker
import com.intellij.codeInsight.daemon.LineMarkerProvider; //导入方法依赖的package包/类
public void assertLineMarker(@NotNull PsiElement psiElement, @NotNull LineMarker.Assert assertMatch) {
final List<PsiElement> elements = collectPsiElementsRecursive(psiElement);
for (LineMarkerProvider lineMarkerProvider : LineMarkerProviders.INSTANCE.allForLanguage(psiElement.getLanguage())) {
Collection<LineMarkerInfo> lineMarkerInfos = new ArrayList<>();
lineMarkerProvider.collectSlowLineMarkers(elements, lineMarkerInfos);
if(lineMarkerInfos.size() == 0) {
continue;
}
for (LineMarkerInfo lineMarkerInfo : lineMarkerInfos) {
if(assertMatch.match(lineMarkerInfo)) {
return;
}
}
}
fail(String.format("Fail that '%s' matches on of '%s' PsiElements", assertMatch.getClass(), elements.size()));
}
开发者ID:Haehnchen,项目名称:idea-php-annotation-plugin,代码行数:22,代码来源:AnnotationLightCodeInsightFixtureTestCase.java
示例3: assertLineMarkerIsEmpty
import com.intellij.codeInsight.daemon.LineMarkerProvider; //导入方法依赖的package包/类
public void assertLineMarkerIsEmpty(@NotNull PsiElement psiElement) {
final List<PsiElement> elements = collectPsiElementsRecursive(psiElement);
for (LineMarkerProvider lineMarkerProvider : LineMarkerProviders.INSTANCE.allForLanguage(psiElement.getLanguage())) {
Collection<LineMarkerInfo> lineMarkerInfos = new ArrayList<LineMarkerInfo>();
lineMarkerProvider.collectSlowLineMarkers(elements, lineMarkerInfos);
if(lineMarkerInfos.size() > 0) {
fail(String.format("Fail that line marker is empty because it matches '%s'", lineMarkerProvider.getClass()));
}
}
}
示例4: addLineMarkers
import com.intellij.codeInsight.daemon.LineMarkerProvider; //导入方法依赖的package包/类
@Override
public void addLineMarkers(@NotNull List<PsiElement> elements,
@NotNull List<LineMarkerProvider> providers,
@NotNull List<LineMarkerInfo> result,
@NotNull ProgressIndicator progress) throws ProcessCanceledException {
for (LineMarkerProvider provider : providers) {
provider.collectSlowLineMarkers(elements, result);
}
}
示例5: assertLineMarkerIsEmpty
import com.intellij.codeInsight.daemon.LineMarkerProvider; //导入方法依赖的package包/类
public void assertLineMarkerIsEmpty(@NotNull PsiElement psiElement) {
final List<PsiElement> elements = collectPsiElementsRecursive(psiElement);
for (LineMarkerProvider lineMarkerProvider : LineMarkerProviders.INSTANCE.allForLanguage(psiElement.getLanguage())) {
Collection<LineMarkerInfo> lineMarkerInfos = new ArrayList<>();
lineMarkerProvider.collectSlowLineMarkers(elements, lineMarkerInfos);
if(lineMarkerInfos.size() > 0) {
fail(String.format("Fail that line marker is empty because it matches '%s'", lineMarkerProvider.getClass()));
}
}
}
开发者ID:Haehnchen,项目名称:idea-php-annotation-plugin,代码行数:14,代码来源:AnnotationLightCodeInsightFixtureTestCase.java