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


Java PresentationData.setIcon方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ModuleToDoNode.java

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

示例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);
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:9,代码来源:StudyDirectoryNode.java

示例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());
    }
}
 
开发者ID:PioBeat,项目名称:GravSupport,代码行数:10,代码来源:LanguageNestingNode.java

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

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

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

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

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

示例11: setPresentation

import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
protected void setPresentation(PresentationData data, String name, Icon icon) {
  data.setPresentableText(name);
  data.setIcon(icon);
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:5,代码来源:StudyDirectoryNode.java

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

示例13: update

import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void update(PresentationData presentation) {
  super.update(presentation);
  presentation.setIcon(getUiAware().getProjectIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ProjectNode.java

示例14: update

import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
public void update(PresentationData presentation) {
  presentation.setIcon(PlatformIcons.PROJECT_ICON);
  presentation.setPresentableText(getProject().getName());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AbstractProjectNode.java

示例15: updateImpl

import com.intellij.ide.projectView.PresentationData; //导入方法依赖的package包/类
@Override
protected void updateImpl(final PresentationData data) {
  super.updateImpl(data);

  data.setIcon(myIcon);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:TestMethodNode.java


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