public class LibraryImpl extends TraceableDisposable implements LibraryEx.ModifiableModelEx, LibraryEx, RootProvider
LibraryEx.ModifiableModelExLibrary.ModifiableModelDisposable.ParentRootProvider.RootSetChangedListener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
EXCLUDED_ROOTS_TAG |
static java.lang.String |
LIBRARY_NAME_ATTR |
static java.lang.String |
LIBRARY_TYPE_ATTR |
static java.lang.String |
PROPERTIES_ELEMENT |
static java.lang.String |
ROOT_PATH_ELEMENT |
static java.lang.String |
ROOT_TYPE_ATTR |
EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
void |
addExcludedRoot(java.lang.String url)
Add a URL to list of directories excluded from the library.
|
void |
addJarDirectory(java.lang.String url,
boolean recursive) |
void |
addJarDirectory(java.lang.String url,
boolean recursive,
OrderRootType rootType) |
void |
addJarDirectory(VirtualFile file,
boolean recursive) |
void |
addJarDirectory(VirtualFile file,
boolean recursive,
OrderRootType rootType) |
void |
addRoot(java.lang.String url,
OrderRootType rootType) |
void |
addRoot(VirtualFile file,
OrderRootType rootType) |
void |
addRootSetChangedListener(RootProvider.RootSetChangedListener listener) |
void |
addRootSetChangedListener(RootProvider.RootSetChangedListener listener,
Disposable parentDisposable) |
Library |
cloneLibrary(RootModelImpl rootModel) |
void |
commit() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
boolean |
equals(java.lang.Object o) |
void |
forgetKind()
Removes custom library kind and associated properties if any
|
VirtualFile [] |
getExcludedRoots() |
java.lang.String [] |
getExcludedRootUrls()
Returns URLs of directories under the library roots which are excluded from the library.
|
ProjectModelExternalSource |
getExternalSource()
Return non-null value if this element was automatically created by the IDE during importing from some external project system rather
than created by user manually via UI.
|
VirtualFile [] |
getFiles(OrderRootType rootType) |
java.util.List<java.lang.String> |
getInvalidRootUrls(OrderRootType type) |
PersistentLibraryKind<?> |
getKind() |
LibraryEx.ModifiableModelEx |
getModifiableModel()
As soon as you obtaining modifiable model you will have to commit it or call Disposer.dispose(model)!
|
Module |
getModule() |
java.lang.String |
getName() |
LibraryProperties |
getProperties() |
RootProvider |
getRootProvider() |
Library |
getSource()
In case of modifiable library returns origin library it was created from
|
LibraryTable |
getTable() |
java.lang.String [] |
getUrls(OrderRootType rootType) |
int |
hashCode() |
boolean |
isChanged() |
boolean |
isDisposed() |
boolean |
isJarDirectory(java.lang.String url) |
boolean |
isJarDirectory(java.lang.String url,
OrderRootType rootType) |
boolean |
isValid(java.lang.String url,
OrderRootType rootType) |
void |
moveRootDown(java.lang.String url,
OrderRootType rootType) |
void |
moveRootUp(java.lang.String url,
OrderRootType rootType) |
void |
readExternal(Element element) |
boolean |
removeExcludedRoot(java.lang.String url) |
boolean |
removeRoot(java.lang.String url,
OrderRootType rootType) |
void |
removeRootSetChangedListener(RootProvider.RootSetChangedListener listener) |
void |
restoreKind() |
void |
setKind(PersistentLibraryKind<?> kind) |
void |
setName(java.lang.String name) |
void |
setProperties(LibraryProperties properties) |
java.lang.String |
toString() |
void |
writeExternal(Element rootElement) |
getStackTrace, kill, killExceptionally, throwDisposalError, throwObjectNotDisposedErrorpublic static final java.lang.String LIBRARY_NAME_ATTR
public static final java.lang.String LIBRARY_TYPE_ATTR
public static final java.lang.String ROOT_PATH_ELEMENT
public static final java.lang.String ELEMENT
public static final java.lang.String PROPERTIES_ELEMENT
public static final java.lang.String EXCLUDED_ROOTS_TAG
public static final java.lang.String ROOT_TYPE_ATTR
public void dispose()
Disposabledispose in interface Disposablepublic boolean isDisposed()
isDisposed in interface LibraryExpublic java.lang.String getName()
getName in interface LibrarygetName in interface Library.ModifiableModelpublic java.lang.String [] getUrls(OrderRootType rootType)
getUrls in interface LibrarygetUrls in interface Library.ModifiableModelgetUrls in interface RootProviderpublic VirtualFile [] getFiles(OrderRootType rootType)
getFiles in interface LibrarygetFiles in interface Library.ModifiableModelgetFiles in interface RootProviderpublic void setName(java.lang.String name)
setName in interface Library.ModifiableModelpublic LibraryEx.ModifiableModelEx getModifiableModel()
LibrarygetModifiableModel in interface LibraryExgetModifiableModel in interface Librarypublic Library cloneLibrary(RootModelImpl rootModel)
public java.util.List<java.lang.String> getInvalidRootUrls(OrderRootType type)
getInvalidRootUrls in interface LibraryExpublic void setProperties(LibraryProperties properties)
setProperties in interface LibraryEx.ModifiableModelExpublic RootProvider getRootProvider()
getRootProvider in interface Librarypublic ProjectModelExternalSource getExternalSource()
ProjectModelElementgetExternalSource in interface ProjectModelElementpublic void readExternal(Element element)
throws InvalidDataException
readExternal in interface JDOMExternalizableInvalidDataExceptionpublic void writeExternal(Element rootElement)
writeExternal in interface JDOMExternalizablepublic PersistentLibraryKind<?> getKind()
getKind in interface LibraryExgetKind in interface LibraryEx.ModifiableModelExpublic void forgetKind()
LibraryEx.ModifiableModelExforgetKind in interface LibraryEx.ModifiableModelExpublic void restoreKind()
restoreKind in interface LibraryEx.ModifiableModelExpublic void addExcludedRoot(java.lang.String url)
LibraryEx.ModifiableModelExurl must be located under some
of the library roots.addExcludedRoot in interface LibraryEx.ModifiableModelExurl - URL of a directory to be excludedLibraryEx.getExcludedRootUrls()public boolean removeExcludedRoot(java.lang.String url)
removeExcludedRoot in interface LibraryEx.ModifiableModelExpublic java.lang.String [] getExcludedRootUrls()
LibraryExgetExcludedRootUrls in interface LibraryExgetExcludedRootUrls in interface LibraryEx.ModifiableModelExpublic VirtualFile [] getExcludedRoots()
getExcludedRoots in interface LibraryExLibraryEx.getExcludedRootUrls()public LibraryProperties getProperties()
getProperties in interface LibraryExgetProperties in interface LibraryEx.ModifiableModelExpublic void setKind(PersistentLibraryKind<?> kind)
setKind in interface LibraryEx.ModifiableModelExpublic void addRoot(java.lang.String url,
OrderRootType rootType)
addRoot in interface Library.ModifiableModelpublic void addRoot(VirtualFile file, OrderRootType rootType)
addRoot in interface Library.ModifiableModelpublic void addJarDirectory(java.lang.String url,
boolean recursive)
addJarDirectory in interface Library.ModifiableModelpublic void addJarDirectory(VirtualFile file, boolean recursive)
addJarDirectory in interface Library.ModifiableModelpublic void addJarDirectory(java.lang.String url,
boolean recursive,
OrderRootType rootType)
addJarDirectory in interface Library.ModifiableModelpublic void addJarDirectory(VirtualFile file, boolean recursive, OrderRootType rootType)
addJarDirectory in interface Library.ModifiableModelpublic boolean isJarDirectory(java.lang.String url)
isJarDirectory in interface LibraryisJarDirectory in interface Library.ModifiableModelpublic boolean isJarDirectory(java.lang.String url,
OrderRootType rootType)
isJarDirectory in interface LibraryisJarDirectory in interface Library.ModifiableModelpublic boolean isValid(java.lang.String url,
OrderRootType rootType)
isValid in interface LibraryisValid in interface Library.ModifiableModelpublic boolean removeRoot(java.lang.String url,
OrderRootType rootType)
removeRoot in interface Library.ModifiableModelpublic void moveRootUp(java.lang.String url,
OrderRootType rootType)
moveRootUp in interface Library.ModifiableModelpublic void moveRootDown(java.lang.String url,
OrderRootType rootType)
moveRootDown in interface Library.ModifiableModelpublic boolean isChanged()
isChanged in interface Library.ModifiableModelpublic Library getSource()
LibraryExpublic void commit()
commit in interface Library.ModifiableModelpublic LibraryTable getTable()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void addRootSetChangedListener(RootProvider.RootSetChangedListener listener)
addRootSetChangedListener in interface RootProviderpublic void removeRootSetChangedListener(RootProvider.RootSetChangedListener listener)
removeRootSetChangedListener in interface RootProviderpublic void addRootSetChangedListener(RootProvider.RootSetChangedListener listener, Disposable parentDisposable)
addRootSetChangedListener in interface RootProvider