Debug your plugins with Eclipse

tomcat-thumbVisual 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:

  1. Deploy your plugin to your Visual Paradigm (including source files).
  2. 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

    Create new Java project on your plugin which deployed to VP

  3. 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
  4. Press Finish to close the New Java Project dialog.

    Close the New Java Project dialog

    Close the New Java Project dialog

  5. Select Debug As… > Debug Configuration.

    Open Debug Configurations

    Open Debug Configurations

  6. Select Java Application, and then press the New launch configuration button.

    Create new launch configuration

    Create new launch configuration

  7. Name the configuration as Debug Plugin, and specify the main class as RV.

    Define the name and main class for debug configuration

    Define the name and main class for debug configuration

  8. Switch to Arguments tab, and enter debug in Program arguments.

    Specify "debug" as Program arguments

    Specify “debug” as Program arguments

  9. In the Working directory field, select Other > File System…, and then specify Visual Paradigm/bin folder.

    Specify bin folder of VP as working directory

    Specify bin folder of VP as working directory

  10. 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

    Launch VP from Eclipse to debug your plugin

  11. 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

    Auto build your project to allow your changes reflect in VP immediately

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply