本文整理匯總了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);
}
});
}
};
}
示例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);
}
示例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()]);
}
示例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;
}
示例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;
}
示例6: AddLibraryDependencyAction
public AddLibraryDependencyAction(ClasspathPanel classpathPanel, final int index, final String title,
final StructureConfigurableContext context) {
super(classpathPanel, index, title, PlatformIcons.LIBRARY_ICON);
myContext = context;
}
示例7: getCreateElementIcon
@Override
public Icon getCreateElementIcon() {
return PlatformIcons.LIBRARY_ICON;
}
示例8: getIcon
@Override
public Icon getIcon(boolean isOpen) {
return PlatformIcons.LIBRARY_ICON;
}