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


Java LineMarkerInfo.getLineMarkerTooltip方法代码示例

本文整理汇总了Java中com.intellij.codeInsight.daemon.LineMarkerInfo.getLineMarkerTooltip方法的典型用法代码示例。如果您正苦于以下问题:Java LineMarkerInfo.getLineMarkerTooltip方法的具体用法?Java LineMarkerInfo.getLineMarkerTooltip怎么用?Java LineMarkerInfo.getLineMarkerTooltip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.codeInsight.daemon.LineMarkerInfo的用法示例。


在下文中一共展示了LineMarkerInfo.getLineMarkerTooltip方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: match

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
@Override
public boolean match(@NotNull LineMarkerInfo markerInfo) {
    if(markerInfo.getLineMarkerTooltip() == null || !markerInfo.getLineMarkerTooltip().equals(toolTip)) {
        return false;
    }

    if(!(markerInfo instanceof RelatedItemLineMarkerInfo)) {
        return false;
    }

    for (Object o : ((RelatedItemLineMarkerInfo) markerInfo).createGotoRelatedItems()) {
        if(o instanceof GotoRelatedItem && this.pattern.accepts(((GotoRelatedItem) o).getElement())) {
            return true;
        }
    }

    return false;
}
 
开发者ID:adelf,项目名称:idea-php-dotenv-plugin,代码行数:19,代码来源:DotEnvLightCodeInsightFixtureTestCase.java

示例2: checkLineMarkers

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
public void checkLineMarkers(@NotNull Collection<LineMarkerInfo> markerInfos, @NotNull String text) {
  String fileName = myFile == null ? "" : myFile.getName() + ": ";
  String failMessage = "";

  for (LineMarkerInfo info : markerInfos) {
    if (!containsLineMarker(info, lineMarkerInfos.values())) {
      if (!failMessage.isEmpty()) failMessage += '\n';
      failMessage += fileName + "Extra line marker highlighted " +
                        rangeString(text, info.startOffset, info.endOffset)
                        + ": '"+info.getLineMarkerTooltip()+"'"
                        ;
    }
  }

  for (LineMarkerInfo expectedLineMarker : lineMarkerInfos.values()) {
    if (!markerInfos.isEmpty() && !containsLineMarker(expectedLineMarker, markerInfos)) {
      if (!failMessage.isEmpty()) failMessage += '\n';
      failMessage += fileName + "Line marker was not highlighted " +
                     rangeString(text, expectedLineMarker.startOffset, expectedLineMarker.endOffset)
                     + ": '"+expectedLineMarker.getLineMarkerTooltip()+"'"
        ;
    }
  }

  if (!failMessage.isEmpty()) Assert.fail(failMessage);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ExpectedHighlightingData.java

示例3: containsLineMarker

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
private static boolean containsLineMarker(LineMarkerInfo info, Collection<LineMarkerInfo> where) {
  final String infoTooltip = info.getLineMarkerTooltip();

  for (LineMarkerInfo markerInfo : where) {
    String markerInfoTooltip;
    if (markerInfo.startOffset == info.startOffset &&
        markerInfo.endOffset == info.endOffset &&
        ( Comparing.equal(infoTooltip, markerInfoTooltip = markerInfo.getLineMarkerTooltip())  ||
          ANY_TEXT.equals(markerInfoTooltip) ||
          ANY_TEXT.equals(infoTooltip)
        )
      ) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ExpectedHighlightingData.java

示例4: containsLineMarker

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
private static boolean containsLineMarker(LineMarkerInfo info, Collection<LineMarkerInfo> where) {
  final String infoTooltip = info.getLineMarkerTooltip();

  for (LineMarkerInfo markerInfo : where) {
    String markerInfoTooltip;
    if (markerInfo.startOffset == info.startOffset &&
        markerInfo.endOffset == info.endOffset &&
        ( Comparing.equal(infoTooltip, markerInfoTooltip = markerInfo.getLineMarkerTooltip())  ||
          ANY_TEXT.equals(markerInfoTooltip) ||
          ANY_TEXT.equals(infoTooltip)
        )
            ) {
      return true;
    }
  }
  return false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:ExpectedHighlightingData.java

示例5: refreshLineMarkers

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
private void refreshLineMarkers() {
  for (Map.Entry<RangeMarker, LineMarkerInfo> entry : lineMarkerInfos.entrySet()) {
    RangeMarker rangeMarker = entry.getKey();
    int startOffset = rangeMarker.getStartOffset();
    int endOffset = rangeMarker.getEndOffset();
    final LineMarkerInfo value = entry.getValue();
    LineMarkerInfo markerInfo = new LineMarkerInfo<PsiElement>(value.getElement(), new TextRange(startOffset,endOffset), null, value.updatePass, new Function<PsiElement,String>() {
      @Override
      public String fun(PsiElement psiElement) {
        return value.getLineMarkerTooltip();
      }
    }, null, GutterIconRenderer.Alignment.RIGHT);
    entry.setValue(markerInfo);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ExpectedHighlightingData.java

示例6: match

import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
@Override
public boolean match(@NotNull LineMarkerInfo markerInfo) {
    return markerInfo.getLineMarkerTooltip() != null && markerInfo.getLineMarkerTooltip().equals(toolTip);
}
 
开发者ID:Haehnchen,项目名称:idea-php-behat-plugin,代码行数:5,代码来源:BehatLightCodeInsightFixtureTestCase.java


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