com.nomagic.magicdraw.plugins.Plugin is the base abstract class for any modeling tool plugin. A plugin written by a user must be extended from this class. Every plugin has its own descriptor set by a plugin's manager. A plugin has three special methods:

  • a init() method is called on a program startup. The plugin must override this method and implement its own functionality there.
  • a close() method is called on a program exit. The plugin must override this method and return the value true if the plugin is ready to exit. In other case, it should return the value false. If the plugin returns false, the program exit is canceled.
  • a isSupported() method is called before the plugin initialization. If this method returns false, the plugin is not initialized. isSupported() may be used to check if the plugin can be started, for example, on this OS.

Use com.nomagic.magicdraw.plugins.PluginUtils to get references to loaded plugins. This is useful if you have dependencies among plugins and want to get a reference to other plugin object.


com.nomagic.magicdraw.plugins.PluginDescriptor is the class that provides information loaded from the plugin.xml file (a plugin descriptor) to the plugin. Use com.nomagic.magicdraw.plugins.Plugin.getDescriptor() to get the descriptor.

More information is available in javadoc.

Plugins manager workflow