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


Java LineMarkerProviders类代码示例

本文整理汇总了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()));
    }
 
开发者ID:adelf,项目名称:idea-php-dotenv-plugin,代码行数:22,代码来源:DotEnvLightCodeInsightFixtureTestCase.java

示例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()));
            }
        }
    }
 
开发者ID:adelf,项目名称:idea-php-dotenv-plugin,代码行数:14,代码来源:DotEnvLightCodeInsightFixtureTestCase.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:HtmlLineMarkerProvider.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:LineMarkersPass.java

示例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));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:LineMarkersPass.java


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