|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ModifiableModuleModel
Represents the model for the list of modules in a project, or a temporary copy of that model displayed in the configuration UI.
ModuleManager.getModifiableModel()| Method Summary | |
|---|---|
void |
commit()
Commits changes made in this model to the actual project structure. |
void |
commitAssertingNoCircularDependency()
Deprecated. use commit() instead. |
void |
dispose()
Disposes of all modules in the project. |
void |
disposeModule(Module module)
Disposes of the specified module and removes it from the project. |
Module |
findModuleByName(java.lang.String name)
Returns the project module with the specified name. |
Module[] |
getModules()
Returns the list of all modules in the project. |
Module |
getModuleToBeRenamed(java.lang.String newName)
Returns the project module which has been renamed to the specified name. |
java.lang.String |
getNewName(Module module)
Returns the name to which the specified module has been renamed. |
boolean |
isChanged()
Checks if there are any uncommitted changes to the model. |
Module |
loadModule(java.lang.String filePath)
Loads a module from an .iml file with the specified path and adds it to the project. |
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. |
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. |
void |
renameModule(Module module,
java.lang.String newName)
Schedules the rename of a module to be performed when the model is committed. |
| Method Detail |
|---|
@NotNull Module[] getModules()
ModuleManager.getModules().
@NotNull
Module newModule(@NotNull
java.lang.String filePath)
throws LoadCancelledException
commit() must be called to
bring the changes in effect.
filePath - the path at which the module is created.
LoadCancelledException - in case of internal error while creating the module.
@NotNull
Module newModule(@NotNull
java.lang.String filePath,
@NotNull
ModuleType moduleType)
throws LoadCancelledException
commit() must be called to
bring the changes in effect.
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
Module loadModule(@NotNull
java.lang.String filePath)
throws InvalidDataException,
java.io.IOException,
org.jdom.JDOMException,
ModuleWithNameAlreadyExists,
LoadCancelledException
commit() must be called to bring the changes in effect.
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.
LoadCancelledException - if loading the module was cancelled by some of the components.
void disposeModule(@NotNull
Module module)
commit()
must be called to bring the changes in effect.
module - the module to remove.
@Nullable
Module findModuleByName(@NotNull
java.lang.String name)
name - the name of the module to find.
void dispose()
boolean isChanged()
void commit()
throws ModuleCircularDependencyException
ModuleCircularDependencyException - never actually thrown (circular module dependency is not an error).void commitAssertingNoCircularDependency()
commit() instead.
void renameModule(@NotNull
Module module,
@NotNull
java.lang.String newName)
throws ModuleWithNameAlreadyExists
module - the module to rename.newName - the new name to rename the module to.
ModuleWithNameAlreadyExists - if a module with such a name already exists in the project.
@Nullable
Module getModuleToBeRenamed(@NotNull
java.lang.String newName)
newName - the name of the renamed module to find.
@Nullable
java.lang.String getNewName(@NotNull
Module module)
module - the module for which the new name is requested.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||