本文整理汇总了Java中com.intellij.ide.projectView.PresentationData.setTooltip方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationData.setTooltip方法的具体用法?Java PresentationData.setTooltip怎么用?Java PresentationData.setTooltip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.projectView.PresentationData
的用法示例。
在下文中一共展示了PresentationData.setTooltip方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
final Collection<ArtifactProblemDescription> problems = ((ArtifactEditorImpl)myContext.getThisArtifactEditor()).getValidationManager().getProblems(this);
if (problems == null || problems.isEmpty()) {
super.update(presentation);
return;
}
StringBuilder buffer = StringBuilderSpinAllocator.alloc();
final String tooltip;
boolean isError = false;
try {
for (ArtifactProblemDescription problem : problems) {
isError |= problem.getSeverity() == ProjectStructureProblemType.Severity.ERROR;
buffer.append(problem.getMessage(false)).append("<br>");
}
tooltip = XmlStringUtil.wrapInHtml(buffer);
}
finally {
StringBuilderSpinAllocator.dispose(buffer);
}
getElementPresentation().render(presentation, addErrorHighlighting(isError, SimpleTextAttributes.REGULAR_ATTRIBUTES),
addErrorHighlighting(isError, SimpleTextAttributes.GRAY_ATTRIBUTES));
presentation.setTooltip(tooltip);
}
示例2: updateImpl
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void updateImpl(PresentationData data) {
PsiFile value = getValue();
data.setPresentableText(value.getName());
data.setIcon(value.getIcon(Iconable.ICON_FLAG_READ_STATUS));
VirtualFile file = getVirtualFile();
if (file != null && file.is(VFileProperty.SYMLINK)) {
String target = file.getCanonicalPath();
if (target == null) {
data.setAttributesKey(CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES);
data.setTooltip(CommonBundle.message("vfs.broken.link"));
}
else {
data.setTooltip(FileUtil.toSystemDependentName(target));
}
}
}
示例3: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
public void update(PresentationData presentation) {
presentation.setPresentableText(getValue().getName());
final OrderEntry orderEntry = getValue().getOrderEntry();
Icon closedIcon = orderEntry instanceof JdkOrderEntry ? getJdkIcon((JdkOrderEntry)orderEntry) : AllIcons.Nodes.PpLibFolder;
presentation.setIcon(closedIcon);
if (orderEntry instanceof JdkOrderEntry) {
final JdkOrderEntry jdkOrderEntry = (JdkOrderEntry)orderEntry;
final Sdk projectJdk = jdkOrderEntry.getJdk();
if (projectJdk != null) { //jdk not specified
final String path = projectJdk.getHomePath();
if (path != null) {
presentation.setLocationString(FileUtil.toSystemDependentName(path));
}
}
presentation.setTooltip(null);
}
else {
presentation.setTooltip(StringUtil.capitalize(IdeBundle.message("node.projectview.library", ((LibraryOrderEntry)orderEntry).getLibraryLevel())));
}
}
示例4: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
RemoteServer<?> server = getServer();
ServerConnection connection = getConnection();
presentation.setPresentableText(server.getName());
presentation.setIcon(getServerNodeIcon(server.getType().getIcon(), connection != null ? getStatusIcon(connection.getStatus()) : null));
presentation.setTooltip(connection != null ? connection.getStatusText() : null);
}
示例5: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
presentation.setIcon(myUsagePresentation.getIcon());
presentation.setTooltip(myUsagePresentation.getTooltipText());
final TextChunk[] text = myUsagePresentation.getText();
updatePresentationWithTextChunks(presentation, text);
presentation.setPresentableText(StringUtil.join(text, new Function<TextChunk, String>() {
@Override
public String fun(TextChunk chunk) {
return chunk.getText();
}
}, ""));
}
示例6: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
myPresentation.render(presentation, SimpleTextAttributes.REGULAR_ATTRIBUTES, SimpleTextAttributes.GRAY_ATTRIBUTES);
presentation.setTooltip(myPresentation.getTooltipText());
}
示例7: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
presentation.setPresentableText(myName);
presentation.setIcon(getIcon());
presentation.setTooltip(myDescription);
}