public abstract class LibraryType<P extends LibraryProperties> extends LibraryPresentationProvider<P>
LibraryPresentationProvider
extension point instead.
<extensions defaultExtensionNs="com.intellij">
<library.type implementation="qualified-class-name"/>
</extensions>
LibraryPresentationProvider
Modifier and Type | Field and Description |
---|---|
static OrderRootType[] |
DEFAULT_EXTERNAL_ROOT_TYPES |
static ExtensionPointName<LibraryType<?>> |
EP_NAME |
Modifier | Constructor and Description |
---|---|
protected |
LibraryType(PersistentLibraryKind<P> libraryKind) |
Modifier and Type | Method and Description |
---|---|
LibraryRootsComponentDescriptor |
createLibraryRootsComponentDescriptor()
Override this method to customize the library roots editor
|
abstract NewLibraryConfiguration |
createNewLibrary(javax.swing.JComponent parentComponent,
VirtualFile contextDirectory,
Project project)
Called when a new library of this type is created in Project Structure dialog
|
abstract LibraryPropertiesEditor |
createPropertiesEditor(LibraryEditorComponent<P> editorComponent) |
P |
detect(java.util.List<VirtualFile> classesRoots)
Returns non-null value if a library with classes roots
classesRoots is of a kind described by this provider. |
static LibraryType |
findByKind(LibraryKind kind) |
abstract java.lang.String |
getCreateActionName() |
OrderRootType [] |
getExternalRootTypes() |
PersistentLibraryKind<P> |
getKind() |
boolean |
isSuitableModule(Module module,
FacetsProvider facetsProvider) |
getDescription, getIcon, getIcon
public static final ExtensionPointName<LibraryType<?>> EP_NAME
public static final OrderRootType[] DEFAULT_EXTERNAL_ROOT_TYPES
protected LibraryType(PersistentLibraryKind<P> libraryKind)
public PersistentLibraryKind<P> getKind()
getKind
in class LibraryPresentationProvider<P extends LibraryProperties>
public abstract java.lang.String getCreateActionName()
null
if the type should not be shown in the 'New Library' popuppublic abstract NewLibraryConfiguration createNewLibrary(javax.swing.JComponent parentComponent, VirtualFile contextDirectory, Project project)
public boolean isSuitableModule(Module module, FacetsProvider facetsProvider)
true
if library of this type can be added as a dependency to module
public LibraryRootsComponentDescriptor createLibraryRootsComponentDescriptor()
LibraryRootsComponentDescriptor
instancepublic abstract LibraryPropertiesEditor createPropertiesEditor(LibraryEditorComponent<P> editorComponent)
public P detect(java.util.List<VirtualFile> classesRoots)
LibraryPresentationProvider
classesRoots
is of a kind described by this provider.detect
in class LibraryPresentationProvider<P extends LibraryProperties>
public OrderRootType [] getExternalRootTypes()
public static LibraryType findByKind(LibraryKind kind)