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


Java LineMarkerProvider.collectSlowLineMarkers方法代码示例

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

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

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

示例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


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