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


Java PlatformIcons.LIBRARY_ICON属性代码示例

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


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

示例1: createChooseTypeStep

public static BaseListPopupStep<LibraryType> createChooseTypeStep(final ClasspathPanel classpathPanel,
                                                                  final ParameterizedRunnable<LibraryType> action) {
  return new BaseListPopupStep<LibraryType>(IdeBundle.message("popup.title.select.library.type"), getSuitableTypes(classpathPanel)) {
        @NotNull
        @Override
        public String getTextFor(LibraryType value) {
          return value != null ? value.getCreateActionName() : IdeBundle.message("create.default.library.type.action.name");
        }

        @Override
        public Icon getIconFor(LibraryType aValue) {
          return aValue != null ? aValue.getIcon(null) : PlatformIcons.LIBRARY_ICON;
        }

        @Override
        public PopupStep onChosen(final LibraryType selectedValue, boolean finalChoice) {
          return doFinalStep(new Runnable() {
            @Override
            public void run() {
              action.run(selectedValue);
            }
          });
        }
      };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:LibraryEditingUtil.java

示例2: getCellAppearance

@NotNull
private static CellAppearanceEx getCellAppearance(@NotNull final ModuleDependenciesTableItem item) {
  BuildFileStatement entry = item.getEntry();
  String data = "";
  Icon icon = null;
  if (entry instanceof Dependency) {
    Dependency dependency = (Dependency)entry;
    data = dependency.getValueAsString();
    //noinspection EnumSwitchStatementWhichMissesCases
    switch (dependency.type) {
      case EXTERNAL:
        icon = AndroidIcons.MavenLogo;
        break;
      case FILES:
        icon = PlatformIcons.LIBRARY_ICON;
        break;
      case MODULE:
        icon = AllIcons.Nodes.Module;
        break;
    }
  } else if (entry != null) {
    data = entry.toString();
  }
  return SimpleTextCellAppearance.regular(data, icon);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:ModuleDependenciesPanel.java

示例3: createActionOrGroup

public static AnAction[] createActionOrGroup(@NotNull String text, @NotNull BaseLibrariesConfigurable librariesConfigurable, final @NotNull Project project) {
  final LibraryType<?>[] extensions = LibraryType.EP_NAME.getExtensions();
  List<LibraryType<?>> suitableTypes = new ArrayList<LibraryType<?>>();
  if (librariesConfigurable instanceof ProjectLibrariesConfigurable || !project.isDefault()) {
    final ModuleStructureConfigurable configurable = ModuleStructureConfigurable.getInstance(project);
    for (LibraryType<?> extension : extensions) {
      if (!LibraryEditingUtil.getSuitableModules(configurable, extension.getKind(), null).isEmpty()) {
        suitableTypes.add(extension);
      }
    }
  }
  else {
    Collections.addAll(suitableTypes, extensions);
  }

  if (suitableTypes.isEmpty()) {
    return new AnAction[]{new CreateNewLibraryAction(text, PlatformIcons.LIBRARY_ICON, null, librariesConfigurable, project)};
  }
  List<AnAction> actions = new ArrayList<AnAction>();
  actions.add(new CreateNewLibraryAction(IdeBundle.message("create.default.library.type.action.name"), PlatformIcons.LIBRARY_ICON, null, librariesConfigurable, project));
  for (LibraryType<?> type : suitableTypes) {
    final String actionName = type.getCreateActionName();
    if (actionName != null) {
      actions.add(new CreateNewLibraryAction(actionName, type.getIcon(null), type, librariesConfigurable, project));
    }
  }
  return actions.toArray(new AnAction[actions.size()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:CreateNewLibraryAction.java

示例4: getElementIcon

@Nullable
protected Icon getElementIcon(Object element) {
  if (element instanceof ModuleDescriptor) {
    return ((ModuleDescriptor)element).getModuleType().getIcon();
  }
  if (element instanceof LibraryDescriptor) {
    return PlatformIcons.LIBRARY_ICON;
  }
  if (element instanceof File) {
    final File file = (File)element;
    return file.isDirectory()? PlatformIcons.DIRECTORY_CLOSED_ICON : PlatformIcons.JAR_ICON;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ProjectLayoutPanel.java

示例5: getNamedLibraryIcon

@NotNull
@Override
public Icon getNamedLibraryIcon(@NotNull Library library, @Nullable StructureConfigurableContext context) {
  final Icon icon = getCustomIcon(library, context);
  return icon != null ? icon : PlatformIcons.LIBRARY_ICON;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:LibraryPresentationManagerImpl.java

示例6: AddLibraryDependencyAction

public AddLibraryDependencyAction(ClasspathPanel classpathPanel, final int index, final String title,
                                  final StructureConfigurableContext context) {
  super(classpathPanel, index, title, PlatformIcons.LIBRARY_ICON);
  myContext = context;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AddLibraryDependencyAction.java

示例7: getCreateElementIcon

@Override
public Icon getCreateElementIcon() {
  return PlatformIcons.LIBRARY_ICON;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:LibraryElementType.java

示例8: getIcon

@Override
public Icon getIcon(boolean isOpen) {
  return PlatformIcons.LIBRARY_ICON;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:UsageScopeGroupingRule.java


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