com.intellij.openapi.roots
Interface ModifiableRootModel

All Superinterfaces:
ModuleRootModel

public interface ModifiableRootModel
extends ModuleRootModel

Model of roots that should be used by clients to modify module roots.

See Also:
ModuleRootManager.getModifiableModel()

Method Summary
 ContentEntry addContentEntry(VirtualFile root)
          Adds the specified directory as a content root.
 LibraryOrderEntry addInvalidLibrary(java.lang.String name, java.lang.String level)
          Adds an entry for invalid library.
 ModuleOrderEntry addInvalidModuleEntry(java.lang.String name)
           
 LibraryOrderEntry addLibraryEntry(Library library)
          Creates an entry for a given library and adds it to order
 ModuleOrderEntry addModuleOrderEntry(Module module)
           
 void addOrderEntry(OrderEntry orderEntry)
          Appends an order entry to the classpath.
 void clear()
           
 void commit()
          Commits changes to a ModuleRootManager.
 void dispose()
          Must be invoked for uncommited models that are no longer needed.
 LibraryOrderEntry findLibraryOrderEntry(Library library)
           
 java.lang.String getCompilerOutputUrl()
          Deprecated. Use ModuleRootModel.getCompilerOutputPathUrl() instead
 java.lang.String getCompilerOutputUrlForTests()
          Deprecated. Use ModuleRootModel.getCompilerOutputPathForTestsUrl() instead
 Module[] getModuleDependencies()
           
 LibraryTable getModuleLibraryTable()
          Returns library table with module libraries.
 VirtualFile[] getOrderedRoots(OrderRootType type)
           
 java.lang.String[] getOrderedRootUrls(OrderRootType type)
           
 void inheritJdk()
          Makes this module inheriting JDK from its project
 boolean isChanged()
           
 boolean isExcludeExplodedDirectory()
           
 boolean isExcludeOutput()
           
 boolean isWritable()
           
 void rearrangeOrderEntries(OrderEntry[] newOrder)
           
 void removeContentEntry(ContentEntry entry)
          Remove the specified content root.
 void removeOrderEntry(OrderEntry orderEntry)
          Removes order entry from an order.
 void setCompilerOutputPath(java.lang.String url)
           
 void setCompilerOutputPath(VirtualFile file)
           
 void setCompilerOutputPathForTests(java.lang.String url)
           
 void setCompilerOutputPathForTests(VirtualFile file)
           
 void setExcludeExplodedDirectory(boolean excludeExplodedDir)
           
 void setExcludeOutput(boolean excludeOutput)
           
 void setExplodedDirectory(java.lang.String url)
           
 void setExplodedDirectory(VirtualFile file)
           
 void setJavadocUrls(java.lang.String[] urls)
           
 void setJdk(ProjectJdk jdk)
          Sets JDK for this module to a specific value
 
Methods inherited from interface com.intellij.openapi.roots.ModuleRootModel
getCompilerOutputPath, getCompilerOutputPathForTests, getCompilerOutputPathForTestsUrl, getCompilerOutputPathUrl, getContentEntries, getContentRoots, getContentRootUrls, getDependencyModuleNames, getExcludeRoots, getExcludeRootUrls, getExplodedDirectory, getExplodedDirectoryUrl, getJavadocPaths, getJavadocUrls, getJdk, getModule, getOrderEntries, getSourceRoots, getSourceRootUrls, isJdkInherited, processOrder
 

Method Detail

addContentEntry

@NotNull
ContentEntry addContentEntry(VirtualFile root)
Adds the specified directory as a content root.

Parameters:
root - root of a content
Returns:
new content entry

removeContentEntry

void removeContentEntry(ContentEntry entry)
Remove the specified content root.

Parameters:
entry - the content root to remove.

addOrderEntry

void addOrderEntry(OrderEntry orderEntry)
Appends an order entry to the classpath.

Parameters:
orderEntry - the order entry to add.

addLibraryEntry

LibraryOrderEntry addLibraryEntry(Library library)
Creates an entry for a given library and adds it to order

Parameters:
library - the library for which the entry is created.
Returns:
newly created order entry for the library

addInvalidLibrary

LibraryOrderEntry addInvalidLibrary(java.lang.String name,
                                    java.lang.String level)
Adds an entry for invalid library.

Parameters:
name -
level -
Returns:

addModuleOrderEntry

ModuleOrderEntry addModuleOrderEntry(Module module)

addInvalidModuleEntry

ModuleOrderEntry addInvalidModuleEntry(java.lang.String name)

findLibraryOrderEntry

LibraryOrderEntry findLibraryOrderEntry(Library library)

removeOrderEntry

void removeOrderEntry(OrderEntry orderEntry)
Removes order entry from an order.

Parameters:
orderEntry -

rearrangeOrderEntries

void rearrangeOrderEntries(OrderEntry[] newOrder)
Parameters:
newOrder -

clear

void clear()

commit

void commit()
Commits changes to a ModuleRootManager. Should be invoked in a write action. After commit(), the model becomes read-only.


dispose

void dispose()
Must be invoked for uncommited models that are no longer needed.


getModuleLibraryTable

LibraryTable getModuleLibraryTable()
Returns library table with module libraries.
Note: returned library table does not support listeners.

Returns:
library table to be modified

setJdk

void setJdk(ProjectJdk jdk)
Sets JDK for this module to a specific value

Parameters:
jdk -

inheritJdk

void inheritJdk()
Makes this module inheriting JDK from its project


getCompilerOutputUrl

java.lang.String getCompilerOutputUrl()
Deprecated. Use ModuleRootModel.getCompilerOutputPathUrl() instead


getCompilerOutputUrlForTests

java.lang.String getCompilerOutputUrlForTests()
Deprecated. Use ModuleRootModel.getCompilerOutputPathForTestsUrl() instead


getOrderedRoots

VirtualFile[] getOrderedRoots(OrderRootType type)

setCompilerOutputPath

void setCompilerOutputPath(VirtualFile file)

setCompilerOutputPath

void setCompilerOutputPath(java.lang.String url)

setCompilerOutputPathForTests

void setCompilerOutputPathForTests(VirtualFile file)

setCompilerOutputPathForTests

void setCompilerOutputPathForTests(java.lang.String url)

setExplodedDirectory

void setExplodedDirectory(VirtualFile file)

setExplodedDirectory

void setExplodedDirectory(java.lang.String url)

isChanged

boolean isChanged()

getOrderedRootUrls

java.lang.String[] getOrderedRootUrls(OrderRootType type)

isExcludeOutput

boolean isExcludeOutput()

isExcludeExplodedDirectory

boolean isExcludeExplodedDirectory()

setExcludeOutput

void setExcludeOutput(boolean excludeOutput)

setExcludeExplodedDirectory

void setExcludeExplodedDirectory(boolean excludeExplodedDir)

getModuleDependencies

Module[] getModuleDependencies()

isWritable

boolean isWritable()

setJavadocUrls

void setJavadocUrls(java.lang.String[] urls)