public interface IModule
In practice, the Modelio modules implement the IModule
interface .
The IModule
interface is implemented thanks to the
AbstractJavaModule
class.
The IModule
can never be used by another module developer.
Only the peer module (IPeerModule
) can be accessed, as described
below:
IPeerModule module = Modelio.getInstance().getModelingSession().getModuleService().getPeerModule (ModelerModulePeerModule.class);
Modifier and Type | Interface and Description |
---|---|
static class |
IModule.ImageType |
Modifier and Type | Method and Description |
---|---|
IModuleUserConfiguration |
getConfiguration()
Deprecated.
use
IModuleContext services instead |
String |
getDescription()
Used to return the module description.
|
String |
getDescription(PropertyDefinition pdef)
Deprecated.
use
IModuleContext services instead |
org.eclipse.swt.graphics.Image |
getImage(Stereotype stereotype,
IModule.ImageType type)
Get the image provided by the module for a given stereotype.
|
ScriptEngine |
getJythonEngine()
Deprecated.
use
IModuleContext services instead |
String |
getLabel() |
String |
getLabel(ExternDocumentType docType)
Deprecated.
use
IModuleContext services instead |
String |
getLabel(NoteType noteType)
Deprecated.
use
IModuleContext services instead |
String |
getLabel(PropertyDefinition pdef)
Deprecated.
use
IModuleContext services instead |
String |
getLabel(Stereotype stereotype)
Deprecated.
use
IModuleContext services instead |
String |
getLabel(String key)
Deprecated.
use
IModuleContext services instead |
String |
getLabel(TagType tagType)
Deprecated.
use
IModuleContext services instead |
default ILicenseInfos |
getLicenseInfos() |
IModuleLifeCycleHandler |
getLifeCycleHandler()
Return the life cycle handler of a module.
|
default IMdaExpert |
getMdaExpert(Stereotype st)
Get an expert for a stereotype belonging to this module.
|
ModuleComponent |
getModel()
Deprecated.
use
IModuleContext services instead |
default IModelComponentContributor |
getModelComponentContributor(IModelComponent mc)
Get the ModelComponent contributor associated to this module.
|
IModelingSession |
getModelingSession()
Deprecated.
use
IModuleContext services instead |
IModuleContext |
getModuleContext()
Return the context of a module, to access Modelio services.
|
org.eclipse.swt.graphics.Image |
getModuleImage()
Returns an Image for this module.
|
String |
getModuleImagePath()
Get the path to the image representing the module.
|
String |
getName()
Used to return the module name.
|
default IParameterEditionModel |
getParametersEditionModel()
Get the parameters model as it must be shown in the module parameters
edition dialog.
|
default IPanelProvider |
getParametersEditionPanel()
Define a custom panel for module parameter edition.
|
IPeerModule |
getPeerModule()
Returns the peer module, connected to this module.
|
Version |
getRequiredModelioVersion()
Returns the minimum Modelio version that authorize the Module to be
activated.
|
Version |
getVersion()
Used to return the module version.
|
default void |
init()
Method automatically called just after the creation of the module.
|
void |
initModulecontext(IModuleContext moduleContext)
Reserved for compatibility M3.4 M3.5.
|
default void |
initParametersEditionModel(IParameterEditionModel model)
Initialize the parameters model from the module.xml file at module
install.
|
default void |
uninit()
Method automatically called just before the disposal of the module.
|
@Deprecated IModuleUserConfiguration getConfiguration()
IModuleContext
services insteadIModuleUserConfiguration
String getDescription()
org.eclipse.swt.graphics.Image getImage(Stereotype stereotype, IModule.ImageType type)
stereotype
- a stereotypetype
- the image type@Deprecated ScriptEngine getJythonEngine()
IModuleContext
services insteadIModule
MODULE : this moduleClassLoader
CLASSLOADER : the class loader of the module@Deprecated String getLabel(Stereotype stereotype)
IModuleContext
services instead@Deprecated String getLabel(TagType tagType)
IModuleContext
services instead@Deprecated String getLabel(NoteType noteType)
IModuleContext
services instead@Deprecated String getLabel(ExternDocumentType docType)
IModuleContext
services insteadString getLabel()
@Deprecated String getLabel(String key)
IModuleContext
services instead@Deprecated String getLabel(PropertyDefinition pdef)
IModuleContext
services instead@Deprecated String getDescription(PropertyDefinition pdef)
IModuleContext
services insteaddefault ILicenseInfos getLicenseInfos()
@Deprecated ModuleComponent getModel()
IModuleContext
services insteadModuleComponent
model associated with this module.ModuleComponent
model associated with this module.default IModelComponentContributor getModelComponentContributor(IModelComponent mc)
mc
- the Model component being built.IModelComponentContributor
@Deprecated IModelingSession getModelingSession()
IModuleContext
services insteadorg.eclipse.swt.graphics.Image getModuleImage()
null
.String getName()
The module name corresponds to the name of the module, as defined in the MDA Designer tool.
default IParameterEditionModel getParametersEditionModel()
IPeerModule getPeerModule()
The peer module represents the public services of this current module.
Version getRequiredModelioVersion()
Version getVersion()
default void init()
The module is automatically instantiated at the beginning of the mda lifecycle and the constructor implementation is not accessible to the module developer.
The init
method allows the developer to execute the desired
initialization code at this step. For example, this is the perfect place
to register any IViewpoint this module provides.
This method should never be called by the developer because it is already invoked by the tool.
default void uninit()
The uninit
method allows the developer to execute the
desired un-initialization code at this step. For example, if IViewpoints
have been registered in the init()
method, this method is the
perfect place to remove them.
This method should never be called by the developer because it is already invoked by the tool.
String getModuleImagePath()
default IPanelProvider getParametersEditionPanel()
IParameterEditionModel
.IPanelProvider
. Might be null
to use the
standard Modelio implementation.default void initParametersEditionModel(IParameterEditionModel model)
It might be manually modified later.
model
- The parameters edition model.default IMdaExpert getMdaExpert(Stereotype st)
null
.st
- a stereotype owned by the current module.IModuleContext getModuleContext()
IModuleLifeCycleHandler getLifeCycleHandler()
void initModulecontext(IModuleContext moduleContext)
moduleContext
-