本文整理汇总了Java中com.intellij.codeInsight.daemon.LineMarkerProviders类的典型用法代码示例。如果您正苦于以下问题:Java LineMarkerProviders类的具体用法?Java LineMarkerProviders怎么用?Java LineMarkerProviders使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LineMarkerProviders类属于com.intellij.codeInsight.daemon包,在下文中一共展示了LineMarkerProviders类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assertLineMarker
import com.intellij.codeInsight.daemon.LineMarkerProviders; //导入依赖的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.LineMarkerProviders; //导入依赖的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.LineMarkerProviders; //导入依赖的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: getLineMarkerProviderFromLanguage
import com.intellij.codeInsight.daemon.LineMarkerProviders; //导入依赖的package包/类
private static LineMarkerProvider getLineMarkerProviderFromLanguage(final Language language,
final Map<Language, LineMarkerProvider> embeddedLanguagesLineMarkerProviders) {
final LineMarkerProvider markerProvider;
if (!embeddedLanguagesLineMarkerProviders.containsKey(language)) {
embeddedLanguagesLineMarkerProviders.put(language, markerProvider = LineMarkerProviders.INSTANCE.forLanguage(language));
} else {
markerProvider = embeddedLanguagesLineMarkerProviders.get(language);
}
return markerProvider;
}
示例5: assertLineMarkerIsEmpty
import com.intellij.codeInsight.daemon.LineMarkerProviders; //导入依赖的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
示例6: getMarkerProviders
import com.intellij.codeInsight.daemon.LineMarkerProviders; //导入依赖的package包/类
public static List<LineMarkerProvider> getMarkerProviders(@NotNull Language language, @NotNull Project project) {
return DumbService.getInstance(project).filterByDumbAwareness(LineMarkerProviders.INSTANCE.allForLanguageOrAny(language));
}
示例7: getMarkerProviders
import com.intellij.codeInsight.daemon.LineMarkerProviders; //导入依赖的package包/类
public static List<LineMarkerProvider> getMarkerProviders(@NotNull Language language, @NotNull Project project) {
return DumbService.getInstance(project).filterByDumbAwareness(LineMarkerProviders.INSTANCE.allForLanguage(language));
}