當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。