|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.util.SharedClassObject | +--org.openide.modules.ModuleInstall
Provides hooks for a custom module that may be inserted into the IDE. This interface should be implemented by the main class of a module.
Simple modules will likely not need a main class--just a few entries in the manifest file. Even modules with a main class need not do anything in it that is already covered by manifest entries; only additional special functionality need be handled here.
Specify this class in the manifest file with OpenIDE-Module-Install
.
Modules wishing to keep state associated with the installation of the module
may do so by implementing not only this class but also Externalizable
.
In this case, they are responsible for reading and writing their own state
properly (probably using ObjectOutput.writeObject(java.lang.Object)
and ObjectInput.readObject()
).
Note that state which is logically connected to the user's configuration of the module on
a possibly project-specific basis should not be stored this way, but rather
using a system option. (Even if this information is not to be displayed, it should
still be stored as hidden properties of the system option, so as to be switched properly
during project switches.)
Constructor Summary | |
ModuleInstall()
|
Method Summary | |
void |
close()
Called when all modules agreed with closing and the IDE will be closed. |
boolean |
closing()
Called when the IDE is about to exit. |
void |
installed()
Called when the module is first installed into the IDE. |
void |
restored()
Called when an already-installed module is restored (at IDE startup time). |
void |
uninstalled()
Called when the module is uninstalled (from a running IDE). |
void |
updated(int release,
String specVersion)
Called when the module is loaded and the version is higher than by the previous load The default implementation calls restored(). |
Methods inherited from class org.openide.util.SharedClassObject |
addNotify, addPropertyChangeListener, clearSharedData, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, initialize, putProperty, putProperty, readExternal, removeNotify, removePropertyChangeListener, writeExternal, writeReplace |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ModuleInstall()
Method Detail |
public void installed()
Typically, would do one-off functions, and then also call restored()
.
public void restored()
public void updated(int release, String specVersion)
public void uninstalled()
public boolean closing()
true
.
The module may cancel the exit if it is not prepared to be shut down.true
if it is ok to exit the IDEpublic void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |