com.intellij.openapi.roots.libraries.LibraryKind Java Examples
The following examples show how to use
com.intellij.openapi.roots.libraries.LibraryKind.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LibraryUsageCollector.java From consulo with Apache License 2.0 | 6 votes |
@Nonnull @Override public Set<UsageDescriptor> getProjectUsages(@Nonnull Project project) { final Set<LibraryKind> usedKinds = new HashSet<LibraryKind>(); final Processor<Library> processor = new Processor<Library>() { @Override public boolean process(Library library) { usedKinds.addAll(LibraryPresentationManagerImpl.getLibraryKinds(library, null)); return true; } }; for (Module module : ModuleManager.getInstance(project).getModules()) { ModuleRootManager.getInstance(module).orderEntries().librariesOnly().forEachLibrary(processor); } final HashSet<UsageDescriptor> usageDescriptors = new HashSet<UsageDescriptor>(); for (LibraryKind kind : usedKinds) { usageDescriptors.add(new UsageDescriptor(kind.getKindId(), 1)); } return usageDescriptors; }
Example #2
Source File: LibraryRootsComponent.java From consulo with Apache License 2.0 | 5 votes |
public void updatePropertiesLabel() { StringBuilder text = new StringBuilder(); final LibraryType<?> type = getLibraryEditor().getType(); final Set<LibraryKind> excluded = type != null ? Collections.<LibraryKind>singleton(type.getKind()) : Collections.<LibraryKind>emptySet(); for (String description : LibraryPresentationManager.getInstance().getDescriptions(getLibraryEditor().getFiles(BinariesOrderRootType.getInstance()), excluded)) { if (text.length() > 0) { text.append("\n"); } text.append(description); } myPropertiesLabel.setText(text.toString()); }
Example #3
Source File: MuleLibraryDescription.java From mule-intellij-plugins with Apache License 2.0 | 4 votes |
private MuleLibraryDescription(@NotNull final Set<? extends LibraryKind> libraryKinds) { myLibraryKinds = libraryKinds; }
Example #4
Source File: MuleLibraryDescription.java From mule-intellij-plugins with Apache License 2.0 | 4 votes |
@NotNull @Override public Set<? extends LibraryKind> getSuitableLibraryKinds() { return myLibraryKinds; }
Example #5
Source File: LibraryPresentationManager.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull public abstract List<String> getDescriptions(@Nonnull VirtualFile[] classRoots, Set<LibraryKind> excludedKinds);
Example #6
Source File: LibraryPresentationManager.java From consulo with Apache License 2.0 | 4 votes |
public abstract boolean isLibraryOfKind(@Nonnull Library library, @Nonnull LibrariesContainer librariesContainer, @Nonnull Set<? extends LibraryKind> acceptedKinds);
Example #7
Source File: LibraryPresentationManager.java From consulo with Apache License 2.0 | votes |
public abstract List<Library> getLibraries(@Nonnull Set<LibraryKind> kinds, @Nonnull Project project, @Nullable StructureConfigurableContext context);
Example #8
Source File: LibraryPresentationManager.java From consulo with Apache License 2.0 | votes |
public abstract boolean isLibraryOfKind(@Nonnull List<VirtualFile> files, @Nonnull LibraryKind kind);