|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.openapi.module.ModuleManager
public abstract class ModuleManager
Provides services for working with the modules of a project.
| Constructor Summary | |
|---|---|
ModuleManager()
|
|
| Method Summary | |
|---|---|
abstract void |
addModuleListener(ModuleListener listener)
Adds a listener for receiving notifications to the module structure of the project. |
abstract void |
dispatchPendingEvent(ModuleListener listener)
Deprecated. for internal IDEA use. |
abstract void |
disposeModule(Module module)
Disposes of the specified module and removes it from the project. |
abstract Module |
findModuleByName(java.lang.String name)
Returns the project module with the specified name. |
static ModuleManager |
getInstance(Project project)
Returns the module manager instance for the current project. |
abstract ModifiableModuleModel |
getModifiableModel()
Returns the model for the list of modules in the project, which can be used to add, remove or modify modules. |
abstract java.util.List<Module> |
getModuleDependentModules(Module module)
Returns the list of modules which directly depend on the specified module. |
abstract java.lang.String[] |
getModuleGroupPath(Module module)
Returns the path to the group to which the specified module belongs, as an array of group names starting from the project root. |
abstract Module[] |
getModules()
Returns the list of all modules in the project. |
abstract Module[] |
getSortedModules()
Returns the list of modules sorted by dependency (the modules which do not depend on anything are in the beginning of the list, a module which depends on another module follows it in the list). |
abstract boolean |
isModuleDependent(Module module,
Module onModule)
Checks if one of the specified modules directly depends on the other module. |
abstract Module |
loadModule(java.lang.String filePath)
Loads a module from an .iml file with the specified path and adds it to the project. |
abstract java.util.Comparator<Module> |
moduleDependencyComparator()
Returns the module comparator which can be used for sorting modules by dependency (the modules which do not depend on anything are in the beginning of the list, a module which depends on another module follows it in the list). |
abstract Graph<Module> |
moduleGraph()
Returns the graph of dependencies between modules in the project. |
abstract Module |
newModule(java.lang.String filePath)
Creates a Java module at the specified path and adds it to the project to which the module manager is related. |
abstract Module |
newModule(java.lang.String filePath,
ModuleType moduleType)
Creates a module of the specified type at the specified path and adds it to the project to which the module manager is related. |
abstract void |
removeModuleListener(ModuleListener listener)
Removes a listener for receiving notifications to the module structure of the project. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModuleManager()
| Method Detail |
|---|
public static ModuleManager getInstance(Project project)
project - the project for which the module manager is requested.
@NotNull
public abstract Module newModule(@NotNull
java.lang.String filePath)
throws LoadCancelledException
filePath - the path at which the module is created.
LoadCancelledException - in case of internal error while creating the module.
@NotNull
public abstract Module newModule(@NotNull
java.lang.String filePath,
@NotNull
ModuleType moduleType)
throws LoadCancelledException
filePath - the path at which the module is created.moduleType - the type of the module to create.
LoadCancelledException - in case of internal error while creating the module.
@NotNull
public abstract Module loadModule(@NotNull
java.lang.String filePath)
throws InvalidDataException,
java.io.IOException,
org.jdom.JDOMException,
ModuleWithNameAlreadyExists,
ModuleCircularDependencyException,
LoadCancelledException
filePath - the path to load the module from.
InvalidDataException - if the data in the .iml file is semantically incorrect.
java.io.IOException - if an I/O error occurred when loading the module file.
org.jdom.JDOMException - if the file contains invalid XML data.
ModuleWithNameAlreadyExists - if a module with such a name already exists in the project.
ModuleCircularDependencyException - never actually thrown (circular module dependency is not an error).
LoadCancelledException - if loading the module was cancelled by some of the components.
public abstract void disposeModule(@NotNull
Module module)
module - the module to remove.@NotNull public abstract Module[] getModules()
@Nullable
public abstract Module findModuleByName(@NotNull
java.lang.String name)
name - the name of the module to find.
@NotNull public abstract Module[] getSortedModules()
@NotNull public abstract java.util.Comparator<Module> moduleDependencyComparator()
@NotNull
public abstract java.util.List<Module> getModuleDependentModules(@NotNull
Module module)
module - the module for which the list of dependent modules is requested.
public abstract boolean isModuleDependent(@NotNull
Module module,
@NotNull
Module onModule)
module - the module to check the dependency for.onModule - the module on which module may depend.
module directly depends on onModule, false otherwise.
public abstract void addModuleListener(@NotNull
ModuleListener listener)
listener - the listener instance.
public abstract void removeModuleListener(@NotNull
ModuleListener listener)
listener - the listener instance.@NotNull public abstract Graph<Module> moduleGraph()
@NotNull public abstract ModifiableModuleModel getModifiableModel()
public abstract void dispatchPendingEvent(@NotNull
ModuleListener listener)
@Nullable
public abstract java.lang.String[] getModuleGroupPath(@NotNull
Module module)
module - the module for which the path is requested.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||