public interface IMdac
In practice, the Modelio modules implement the IMdac
interface .
The IMdac
interface is implemented by the MDA Designer tool thanks to the AbstractJavaMdac
class.
The IMdac
can never be used by another module developer.
Only the peer module (IPeerMdac
) can be accessed, as described below:
IPeerMdac module = Modelio.getModelingSession().getPeerMdac (MacroPeerModule.class);
Modifier and Type | Interface and Description |
---|---|
static class |
IMdac.ImageType |
static class |
IMdac.MdacState
Enumeration of the states a module can have at runtime.
|
Modifier and Type | Method and Description |
---|---|
List<IMdacAction> |
getActions(ActionLocation location)
Returns the collection of
IMdacAction associated with passed location. |
IMdacConfiguration |
getConfiguration()
Get the configuration associated to this module.
|
String |
getDescription()
Used to return the module description.
|
long |
getHid()
Returns the high internal identifier of the module
|
org.eclipse.swt.graphics.Image |
getImage(IStereotype stereotype,
IMdac.ImageType type)
Get the image provided by the module for a given stereotype.
|
org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(IStereotype stereotype,
IMdac.ImageType imageType)
Get the image descriptor provided by the module for a given stereotype.
|
ScriptEngine |
getJythonEngine()
Get the Jython scripting engine configured for having access to all the module classes and the public classes of
all required modules.
|
String |
getLabel()
Get the module label that is displayed in dialog boxes and other GUIU parts.
|
long |
getLid()
Returns the low internal identifier of the module
|
Collection<IMdacAction> |
getMdacActions(ActionLocation location)
Returns the collection of
IMdacAction associated with passed location. |
org.eclipse.jface.resource.ImageDescriptor |
getMdacImageDescriptor()
Returns an ImageDescriptor for this module.
|
IModule |
getModel()
Returns the
IModule model associated with this module. |
IModelComponentContributor |
getModelComponentContributor()
Get the configuration associated to this module.
|
IModelingSession |
getModelingSession()
Returns the modeling session this module is loaded into.
|
String |
getName()
Used to return the module name.
|
IParameterEditionModel |
getParametersEditionModel()
Get the parameters model as it must be shown in the module parameters edition dialog.
|
IPeerMdac |
getPeerMdac()
Returns the peer module, connected to this module.
|
Collection<IMdacPropertyPage> |
getPropertyPages()
Return the defined property pages
|
Version |
getRequiredModelioVersion()
Returns the minimum Modelio version that authorize the MDAC to be activated.
|
IMdacSession |
getSession()
Returns the session that is connected to the module.
|
IMdac.MdacState |
getState()
Returns current runtime state of this module.
|
Version |
getVersion()
Used to return the module version.
|
Collection<IWorkbenchAction> |
getWorkbenchActions(WorkbenchActionLocation location)
Deprecated.
not used anymore, kept for compatibility reasons only.
|
void |
init()
Method automatically called just after the creation of the mdac.
|
void |
registerAction(ActionLocation location,
IMdacAction action)
Register a module action for the contextual popupmenu(s) of the application.
|
void |
uninit()
Method automatically called just before the disposal of the mdac.
|
IMdacConfiguration getConfiguration()
IMdacConfiguration
String getDescription()
long getHid()
org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(IStereotype stereotype, IMdac.ImageType imageType)
stereotype
- a stereotypeimageType
- the image typeorg.eclipse.swt.graphics.Image getImage(IStereotype stereotype, IMdac.ImageType type)
stereotype
- a stereotypetype
- the image typeScriptEngine getJythonEngine()
IMdac
MODULE : this moduleClassLoader
CLASSLOADER : the class loader of the moduleString getLabel()
long getLid()
org.eclipse.jface.resource.ImageDescriptor getMdacImageDescriptor()
IModule getModel()
IModule
model associated with this module.IModule
model associated with this module.String getName()
The module name corresponds to the name of the module, as defined in the MDA Designer tool.
IParameterEditionModel getParametersEditionModel()
IPeerMdac getPeerMdac()
The peer module represents the public services of this current module.
IMdacSession getSession()
The developer can:
this
and redefine all the operations directly in the module definition.IMdacSession
Version getVersion()
void init()
The mdac is automatically instantiated at the beginning of the mda lifecycle and the constructor implementation is not accessible to the mdac 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 mdac provides.
This method should never be called by the developer because it is already invoked by the tool.
Version getRequiredModelioVersion()
Collection<IMdacAction> getMdacActions(ActionLocation location)
IMdacAction
associated with passed location.location
- the location for which actions are to be returned.IMdacAction
associated with passed location.void registerAction(ActionLocation location, IMdacAction action)
location
- The action insertion point in the popupmenu (see ActionLocation
)action
- Action to store@Deprecated Collection<IWorkbenchAction> getWorkbenchActions(WorkbenchActionLocation location)
IMdacAction
associated with passed workbench location.location
- the workbench location for which actions are to be returned.IMdacAction
associated with passed workbench location.List<IMdacAction> getActions(ActionLocation location)
IMdacAction
associated with passed location.location
- the location for which actions are to be returned.IMdacAction
associated with passed location.IModelingSession getModelingSession()
Collection<IMdacPropertyPage> getPropertyPages()
IModelComponentContributor getModelComponentContributor()
IMdacConfiguration
IMdac.MdacState getState()
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.