public abstract class AdditionalLibraryRootsProvider
extends java.lang.Object
Library
and attach it to a module via OrderEntry
.
Additional library roots will extend GlobalSearchScope.allScope(Project)
(in UI, "Project and Libraries" scope). Also, files contained in the roots will be shown as library files
in Project View and will be available in "Navigate | File..." popup.Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<AdditionalLibraryRootsProvider> |
EP_NAME |
Constructor and Description |
---|
AdditionalLibraryRootsProvider() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<SyntheticLibrary> |
getAdditionalProjectLibraries(Project project)
Returns a collection of
SyntheticLibrary . |
java.util.Collection<VirtualFile> |
getRootsToWatch(Project project)
The method returns roots that IDE should use to track external changes.
|
public static final ExtensionPointName<AdditionalLibraryRootsProvider> EP_NAME
public java.util.Collection<SyntheticLibrary> getAdditionalProjectLibraries(Project project)
SyntheticLibrary
.
This method is suitable when it's easier to collect all additional library roots associated with Project
,
instead of Module
. E.g. JavaScript libraries can be associated with files or folders allowing more
fine-grained control.project
- Project instanceSyntheticLibrary
public java.util.Collection<VirtualFile> getRootsToWatch(Project project)
WatchedRootsProvider
.
CAUTION!
Each root provided by this method makes VFS update slower.
Please, avoid returning a lot of watched roots, especially if they have complicated internal structure.project
- Project instanceWatchedRootsProvider