This is an old revision of the document!


Tutorial: Plugins

Learning Objectives:

  • What does a plugin do?
  • System plugins
  • Develop custom plugin
  • Deploy custom plugin
  • Sharing custom plugin

Develop custom plugin

Set plugin development environment using Eclipse IDE:

  • create a java project
  • add toplugin.jar to build path (project properties)

Create plugin package Create plugin class inheriting from PluginAncestor class Add @TO_PLUGIN annotation to the class Implement required methods Add your plugin functions, declare as public functions Compile and fix errors Write your junit test to test the plugin functions.

Deploy Custom Plugin: Export project as jar file Copy plugin jar file to /lib folder Register your plugin package in config.properties

 plugin.packages=your_plugin_package_path

Restart TestOptimal server

Use Custom Plugin: Open an existing model or create a new model Select SCRIPT tab Click on “P” icon on SCRIPT tab toolbar Check the checbox for your custom plugin Your plugin should show up on CodeAssist list as “$'pluginID'”, e.g. $MYPLUGIN CodeAssist on your custom plugin should automatically be added.