public class JavaModuleExternalPathsImpl extends JavaModuleExternalPaths
Disposable.Parent
EP_NAME
Constructor and Description |
---|
JavaModuleExternalPathsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
commit() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
VirtualFile [] |
getExternalAnnotationsRoots() |
java.lang.String [] |
getExternalAnnotationsUrls() |
java.lang.String [] |
getJavadocUrls() |
ModuleExtension |
getModifiableModel(boolean writable)
Note: don't call this method directly from client code.
|
boolean |
isChanged() |
void |
readExternal(Element element) |
void |
setExternalAnnotationUrls(java.lang.String [] urls) |
void |
setJavadocUrls(java.lang.String [] urls) |
void |
writeExternal(Element element) |
getInstance
public ModuleExtension getModifiableModel(boolean writable)
ModuleExtension
ModifiableRootModel modifiableModel = ModuleRootManager.getInstance(module).getModifiableModel(); CompilerModuleExtension extension = modifiableModel.getModuleExtension(CompilerModuleExtension.class); try { // ... } finally { modifiableModel.commit(); }The point is that call to commit() on CompilerModuleExtension obtained like
'CompilerModuleExtension.getInstance(module).getModifiableModel(true)'
doesn't dispose the model.
Call to ModifiableRootModel.commit()
not only commits linked extensions but disposes them as well.getModifiableModel
in class ModuleExtension
writable
- flag which identifies if resulting model is writablepublic void commit()
commit
in class ModuleExtension
public java.lang.String [] getJavadocUrls()
getJavadocUrls
in class JavaModuleExternalPaths
public VirtualFile [] getExternalAnnotationsRoots()
getExternalAnnotationsRoots
in class JavaModuleExternalPaths
public java.lang.String [] getExternalAnnotationsUrls()
getExternalAnnotationsUrls
in class JavaModuleExternalPaths
public void setJavadocUrls(java.lang.String [] urls)
setJavadocUrls
in class JavaModuleExternalPaths
public void setExternalAnnotationUrls(java.lang.String [] urls)
setExternalAnnotationUrls
in class JavaModuleExternalPaths
public void readExternal(Element element) throws InvalidDataException
readExternal
in class ModuleExtension
InvalidDataException
public void writeExternal(Element element) throws WriteExternalException
writeExternal
in class ModuleExtension
WriteExternalException
public boolean isChanged()
isChanged
in class ModuleExtension
public void dispose()
Disposable