Child pages
  • Documenting the Plugin API

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: SVY-10870 Wiki problems

...

The IScriptable interface is an empty interface that classes that expose methods or properties to the JavaScript layer in Servoy have to implement. When plugins get loaded in Servoy Developer, all documentation provided in the classes implementing this interface will be loaded. For more information refer to the IScriptable API doc in the Servoy API.

The IScriptable interface replaces three methods of the IScriptObject interface previously used to provide documentation for plugin methods and properties: getSample, getToolTip, getParameterNames.

...

In order to have the method documentation available in JavaScript, the documentation generation tool needs to be installed in the Eclipse in which the plugin is being developed. The documentation generation tool must be installed via Eclipse update sites. Go to Help > Install New Software..., add the http://wwwdownload.servoy.com/documentbuilder URL and install the documentation generator (Servoy Documentation Generator Feature). It will show up under installed software as the Servoy Documentation Generator Feature.

...

After the tool is installed, the documentation of the plugin can be generated by selecting the project/package corresponding to that plugin a Servoy plugin, ie. a class that implements IClientPlugin, and using the context menu Servoy > Generate Servoy Documentation XML . A file with the plugin's documentation, available in XML format, will be generatedin the Package Explorer view. Separate documentation XMLs are generated for each of the topmost package which contains a Servoy plugin, so one documentation file per plugin.

For instance, if the package structure is the following:

com.mycompany.myplugin (this package contains a class implementing IClientPlugin)
com.mycompany.myplugin.feature1
com.mycompany.myplugin.feature2

A servoydoc.xml file will be generated in the com.mycompany.myplugin package.

In order to have this documentation available with the plugin, in the Servoy Developer, the plugin developer must include and bundle the documentation XML file along with the actual plugin, inside the plugin jar file. Then, once the plugin jar is copied to the Servoy installation's application_server/plugins directory, the documentation XML, corresponding to that plugin, will be automatically loaded and the documentation will be available.

...