本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例6: match
import com.intellij.codeInsight.daemon.LineMarkerInfo; //导入方法依赖的package包/类
@Override
public boolean match(@NotNull LineMarkerInfo markerInfo) {
return markerInfo.getLineMarkerTooltip() != null && markerInfo.getLineMarkerTooltip().equals(toolTip);
}