Class Plugin

java.lang.Object
com.nomagic.magicdraw.plugins.Plugin
Direct Known Subclasses:
BaseEmfUml2XmiPlugin, MofPlugin

@OpenApiAll public abstract class Plugin extends 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.
See Also:
  • Constructor Details

    • Plugin

      public Plugin()
  • Method Details

    • 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 for example).
      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 returns true. Override this method to check specific conditions for the plugin supportability.
      Returns:
      true, if plugin is supported; false, if plugin is not supported