本文整理汇总了Java中com.intellij.ide.projectView.PresentationData.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationData.setIcon方法的具体用法?Java PresentationData.setIcon怎么用?Java PresentationData.setIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.projectView.PresentationData
的用法示例。
在下文中一共展示了PresentationData.setIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
public void update(PresentationData presentation) {
String newName = getValue().getName();
int nameEndOffset = newName.length();
int todoItemCount = getTodoItemCount(getValue());
int fileCount = getFileCount(getValue());
newName = IdeBundle.message("node.todo.group", newName, todoItemCount, fileCount);
myHighlightedRegions.clear();
TextAttributes textAttributes = new TextAttributes();
if (CopyPasteManager.getInstance().isCutElement(getValue())) {
textAttributes.setForegroundColor(CopyPasteManager.CUT_COLOR);
}
myHighlightedRegions.add(new HighlightedRegion(0, nameEndOffset, textAttributes));
EditorColorsScheme colorsScheme = UsageTreeColorsScheme.getInstance().getScheme();
myHighlightedRegions.add(
new HighlightedRegion(nameEndOffset, newName.length(), colorsScheme.getAttributes(UsageTreeColors.NUMBER_OF_USAGES)));
presentation.setIcon(ModuleType.get(getValue()).getIcon());
presentation.setPresentableText(newName);
}
示例2: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
super.update(presentation);
presentation.setIcon(ProgramRunnerUtil.getConfigurationIcon(mySettings, false));
final ExternalSystemRunConfiguration runConfiguration = (ExternalSystemRunConfiguration)mySettings.getConfiguration();
final ExternalSystemTaskExecutionSettings taskExecutionSettings = runConfiguration.getSettings();
final String shortcutHint = StringUtil.nullize(getShortcutsManager().getDescription(
taskExecutionSettings.getExternalProjectPath(), mySettings.getName()));
final String activatorHint = StringUtil.nullize(getTaskActivator().getDescription(
taskExecutionSettings.getExternalSystemId(), taskExecutionSettings.getExternalProjectPath(),
getRunConfigurationActivationTaskName(mySettings)));
String hint;
if (shortcutHint == null) {
hint = activatorHint;
}
else if (activatorHint == null) {
hint = shortcutHint;
}
else {
hint = shortcutHint + ", " + activatorHint;
}
setNameAndTooltip(getName(), StringUtil.join(taskExecutionSettings.getTaskNames(), " "), hint);
}
示例3: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
public void update(final PresentationData presentation) {
presentation.setIcon(AllIcons.Modules.ExcludedGeneratedRoot);
presentation.addText(new ColoredFragment(
HybrisI18NBundleUtils.message("hybris.project.view.junk.directory.name"),
SimpleTextAttributes.EXCLUDED_ATTRIBUTES
));
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:9,代码来源:JunkProjectViewNode.java
示例4: updatePresentation
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
protected static void updatePresentation(PresentationData data, String name, JBColor color, Icon icon, @Nullable String additionalInfo) {
data.clearText();
data.addText(name, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, color));
if (additionalInfo != null) {
data.addText(" (" + additionalInfo + ")", SimpleTextAttributes.GRAYED_ATTRIBUTES);
}
data.setIcon(icon);
}
示例5: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
public void update(PresentationData presentation) {
super.update(presentation);
if (getValue() == null) {
setValue(null);
} else {
presentation.setPresentableText("localization");
presentation.setIcon(StdFileTypes.PROPERTIES.getIcon());
}
}
示例6: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
presentation.addText(MANIFESTS_NODE, SimpleTextAttributes.REGULAR_ATTRIBUTES);
Icon icon = AndroidSourceType.MANIFEST.getIcon();
if (icon != null) {
presentation.setIcon(icon);
}
presentation.setPresentableText(MANIFESTS_NODE);
}
示例7: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
super.update(presentation);
presentation.setIcon(getUiAware().getProjectIcon());
String hint = null;
if (myIsRoot) {
hint = "root";
}
final String tooltip = myData.toString() + (myData.getDescription() != null ? "<br>" + myData.getDescription() : "");
setNameAndTooltip(getName(), tooltip, hint);
}
示例8: 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();
}
}, ""));
}
示例9: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
super.update(presentation);
presentation.setIcon(getUiAware().getProjectIcon());
final ModuleDependencyData data = getData();
if (data != null) {
setNameAndTooltip(getName(), null, data.getScope().getDisplayName());
}
}
示例10: render
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
public void render(@NotNull PresentationData presentationData, SimpleTextAttributes mainAttributes, SimpleTextAttributes commentAttributes) {
presentationData.setIcon(AllIcons.Nodes.CopyOfFolder);
if (myFile == null || !myFile.isDirectory()) {
mainAttributes = SimpleTextAttributes.ERROR_ATTRIBUTES;
final VirtualFile parentFile = LocalFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(mySourcePath));
if (parentFile == null) {
commentAttributes = SimpleTextAttributes.ERROR_ATTRIBUTES;
}
}
presentationData.addText(CompilerBundle.message("node.text.0.directory.content", mySourceFileName), mainAttributes);
presentationData.addText(" (" + mySourcePath + ")", commentAttributes);
}
示例11: setPresentation
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
protected void setPresentation(PresentationData data, String name, Icon icon) {
data.setPresentableText(name);
data.setIcon(icon);
}
示例12: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
presentation.addText(mySourceType.presentableName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
presentation.setPresentableText(mySourceType.presentableName);
presentation.setIcon(mySourceType.icon);
}
示例13: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
super.update(presentation);
presentation.setIcon(getUiAware().getProjectIcon());
}
示例14: update
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
public void update(PresentationData presentation) {
presentation.setIcon(PlatformIcons.PROJECT_ICON);
presentation.setPresentableText(getProject().getName());
}
示例15: updateImpl
import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void updateImpl(final PresentationData data) {
super.updateImpl(data);
data.setIcon(myIcon);
}