Package com.nomagic.magicdraw.plugins
Class Plugin
- java.lang.Object
-
- com.nomagic.magicdraw.plugins.Plugin
-
- Direct Known Subclasses:
BaseEmfUml2XmiPlugin
,MofPlugin
@OpenApiAll public abstract class Plugin extends java.lang.Object
The base abstract class for any MagicDraw plugin. Plugin must be extended from this class. Every plugin has it own descriptor.
MagicDraw calls method init() for plugin on startup.
MagicDraw will not exit if at least one plugin close() method returns false.
-
-
Constructor Summary
Constructors Constructor Description Plugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
close()
MagicDraw calls this method before exiting the application.PluginDescriptor
getDescriptor()
Returns plugin descriptor.abstract void
init()
Plugin initialization method.abstract boolean
isSupported()
MagicDraw calls this method to identify if this plugin is supported.
-
-
-
Method Detail
-
getDescriptor
public PluginDescriptor getDescriptor()
Returns plugin descriptor.- Returns:
- plugin descriptor.
-
init
public abstract void init()
Plugin initialization method. Every plugin must override this method and do any action related to plugin initialization. For example registers actions configurators to MagicDraw application. This method is called by MagicDraw application during MagicDraw startup.
-
close
public abstract boolean close()
MagicDraw calls this method before exiting the application. If at least one plugin returns 'false', MagicDraw application will not exit. Override this method and do any exit specific action(your plugin state saving and etc).- Returns:
- true, if plugin can be closed normally; false, if plugin cannot be closed and MagicDraw application can not exit.
-
isSupported
public abstract boolean isSupported()
MagicDraw calls this method to identify if this plugin is supported. Plugin is initialized and started only if this method returnstrue
. Override this method to check specific conditions for the plugin supportability.- Returns:
- true, if plugin is supported; false, if plugin is not supported.
-
-