How to set up Eclipse for plug-in development?
- Create Java Project.
- Include all *.jar files from "MagicDraw\lib" folder into Project Build Path. Exclude "md_commontw_api.jar" and "md_commontw.jar".
- Write plug-in. Start from main Plug-in class by extending "com.nomagic.magicdraw.plugins.Plugin".
- Create Plug-in descriptor file "plugin.xml".
- Make clean plug-in directory in MagicDraw plug-ins directory (./plugins/ ), copy "plugin.xml" to it. Do not copy any binaries to MagicDraw plug-ins directory or they will have conflicts with your binaries in Eclipse.
- Create new Debug configuration to run Application.
- select "Project" your plug-in project.
- search for Main class, select "com.nomagic.magicdraw.Main".
- add "-Xmx600M -XX\:PermSize\=40M -XX\:MaxPermSize\=150M" to Arguments.
- Apply changes.
More details can be found in "MagicDraw Open API User Guide"
- don't forget to include all sub folders from "MagicDraw\lib" into your Build Path;
- create jar file from Eclipse: use "Export / JAR file";
- you wouldn't have to copy files each time if you will select destination jar file already in "MagicDraw\plugins" folder;
-save jar file description to build jar file later;