Debug your plugins with Eclipse
Visual Paradigm Open API provides an interface for developers to develop plugins and extend the functionalities of Visual Paradigm. Plugin development could be time consuming especially during debug phrase since you constantly need to deploy your plugin to Visual Paradigm, even just with slightly changes. Instead of deploy the plugin to VP every time after you made changes, you can directly launch VP with your plugin from Eclipse to perform debugging. This article teaches how to configure Eclipse to perform debugging on your plugins.
To configure eclipse for debug your plugin:
- Deploy your plugin to your Visual Paradigm (including source files).
- Create eclipse Java project from existing source by pointing to your plugin inside Visual Paradigm/plugins folder, Press Next to proceed.
Create new Java project on your plugin which deployed to VP
- Switch to Libraries tab and press Add External JARs to include all the following jar files.
Parent Directory Filename %VisualParadigm%/lib vpplatform.jar lib01-09.jar openapi.jar jniwrap.jar winpack.jar %VisualParadigm%/ormlib orm.jar - Press Finish to close the New Java Project dialog.
Close the New Java Project dialog
- Select Debug As… > Debug Configuration.
Open Debug Configurations
- Select Java Application, and then press the New launch configuration button.
Create new launch configuration
- Name the configuration as Debug Plugin, and specify the main class as RV.
Define the name and main class for debug configuration
- Switch to Arguments tab, and enter debug in Program arguments.
Specify “debug” as Program arguments
- In the Working directory field, select Other > File System…, and then specify Visual Paradigm/bin folder.
Specify bin folder of VP as working directory
- Press Apply to commit. After that you can press the Debug button to start debugging your plugin.
Launch VP from Eclipse to debug your plugin
- You can change the source of your plugin directly in eclipse. Changes will reflect directly in VP after you save your modification as long as you have to specify the Build Automatically for your project (under the Project menu).
Auto build your project to allow your changes reflect in VP immediately
Related Know-how |
Related Link |
Leave a Reply
Want to join the discussion?Feel free to contribute!