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 |
---|---|
java.lang.String |
getDescription()
Used to return the module description.
|
org.eclipse.swt.graphics.Image |
getImage(Profile profile,
IModule.ImageType imageType)
Get the image provided by the module for a given profile.
|
org.eclipse.swt.graphics.Image |
getImage(Stereotype stereotype,
IModule.ImageType type)
Get the image provided by the module for a given stereotype.
|
java.lang.String |
getLabel()
Get the module's i18n label.
|
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.
|
default IModelComponentContributor |
getModelComponentContributor(IModelComponent mc)
Get the ModelComponent contributor associated to this module.
|
IModuleContext |
getModuleContext()
Return the context of a module, to access Modelio services.
|
org.eclipse.swt.graphics.Image |
getModuleImage()
Returns an Image for this module.
|
java.lang.String |
getModuleImagePath()
Get the path to the image representing the module.
|
java.lang.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.
|
java.lang.String getDescription()
org.eclipse.swt.graphics.Image getImage(Stereotype stereotype, IModule.ImageType type)
stereotype
- a stereotypetype
- the image typeorg.eclipse.swt.graphics.Image getImage(Profile profile, IModule.ImageType imageType)
type
- the image typeprofile
- a profilejava.lang.String getLabel()
default ILicenseInfos getLicenseInfos()
IModuleLifeCycleHandler getLifeCycleHandler()
default IMdaExpert getMdaExpert(Stereotype st)
null
.st
- a stereotype owned by the current module.default IModelComponentContributor getModelComponentContributor(IModelComponent mc)
mc
- the Model component being built.IModelComponentContributor
IModuleContext getModuleContext()
org.eclipse.swt.graphics.Image getModuleImage()
null
.java.lang.String getModuleImagePath()
java.lang.String getName()
The module name corresponds to the name of the module, as defined in the MDA Designer tool.
default IParameterEditionModel getParametersEditionModel()
default IPanelProvider getParametersEditionPanel()
IParameterEditionModel
.IPanelProvider
. Might be null
to use the
standard Modelio implementation.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 IExpertise this module provides.
This method should never be called by the developer because it is already invoked by the tool.
void initModulecontext(IModuleContext moduleContext)
moduleContext
- the module's context.default void initParametersEditionModel(IParameterEditionModel model)
It might be manually modified later.
model
- The parameters edition model.default void uninit()
The uninit
method allows the developer to execute the
desired un-initialization code at this step. For example, if an IExpertise
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.