How plugins work

On every startup, a modeling tool scans the plugins directory, and searches for subdirectories there:

  • If a subdirectory contains the plugin descriptor file, the plugin's manager reads the descriptor file.

  • If requirements specified in a descriptor file are fulfilled, the plugin's manager loads a specified class (the specified plugin class must be derived from t he com.nomagic.magicdraw.plugins.Plugin class). Then a met hod init() of th e loaded class is called. Th e init() meth od can add GUI components using the actions architecture or do other activities and return from the method. T he init() met hod is called only if isSupported() returns true.

The following figure illustrates how do plugins work.

images/download/attachments/47117738/how_plugins_work.png
How plugins work

Related pages