The preconfigured Eclipse projects for two sample plugins and a batch mode (command-line) tool are provided with a program installation. These projects can be found in <modeling tool installation directory>/openapi/ide/eclipse.zip.

Let's use MagicDraw as an example to describe the following procedures.


To setup the Eclipse environment for the modeling tool development


If there is no Java 11, add it. Java 11 version must be added, because later versions (e.g. 17) are not supported by our tool.

3.5. Click Apply and Close.
3.6. Select Execution environment check box and in the combo box, select JavaSE-11.
3.7. Click Environments button.
3.8. In the Execution Environments list, select JavaSE-11 and in the Compatible JREs list, select Java 11.
3.9. Click Apply and Close and then Finish buttons.
3.10. Select Order and Export tab, click Select All button to select all check boxes.
3.11. Click Apply and Close.


Eclipse Workspace is ready for the source code development and running/debugging.


To use one of the prepared launch configurations


The launch configuration is designed to load plugins from the MagicDraw (or other according to a modeling tool you are using ) installation directory (see step #2) and two plugins from the Eclipse Workspace. Thus, if the md.plugins.dir java system property is not defined (see Plugins directories), developing plugins are not loaded. 


The libraries (jar files) of the plugin must be added to the development class path throughout the plugin dependency hierarchy if the developing code depends on that plugin.
For example, if the code depends on plugin A; plugin A depends on plugins B and C; plugin B depends on plugin D, the libraries of all plugins (A, B, C, and D) must be added to the class path.


When you launch your own plugin, you need to add all jar files that are required by your plugin from appropriate plugins. The MagicDraw jar files can be found in MAGIC_DRAW_INSTALL_DIRECTORY/lib and its sub directories, whereas plugins' jar files can be found in MAGIC_DRAW_INSTALL_DIRECTORY/plugins and its sub directories.


 Even if the plugin descriptor file contains information about the runtime plugin .jar file, it is not necessary to build and deploy this .jar file to a plugin directory while the plugin is developed under Eclipse.