Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
writeplugin [2020/04/26 03:33] 127.0.0.1 external edit |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Writing Custom Plugins ===== | ||
- | There are two reasons you may want to develop your own plugins: adding custom functions to mScript or extend // | ||
- | |||
- | Add custom function to mScript: | ||
- | |||
- | - create a java class by inheriting from an existing plugin which you will be using to run your model: [[http:// | ||
- | - add your function to the new plugin java class and add the following like right above each of the functions: | ||
- | |||
- | @MSCRIPT_METHOD | ||
- | |||
- | - all functions must have string parameters, but can return String, String[], int or boolean. | ||
- | - compile the java class, copy the .class file or .jar file to /build/ folder. | ||
- | - define the plugin in [[Config|Help/ | ||
- | - restart // | ||
- | |||
- | Create a new plugin (to extend // | ||
- | |||
- | - create a java class by inheriting from [[http:// | ||
- | - implement a few methods required by PluginAncestor class. | ||
- | - create your own methods you need to drive your application/ | ||
- | - compile and deploy the java class | ||
- | - define the plugin in [[Config|Help/ | ||
- | - restart // |