FraSCAti explorer plugins

FraSCAti Explorer provides you the ability to extend it by writing your own plugins. In this way, you can specify specific actions, panels, etc. for specified object types.

While loadin your SCA application, FraSCAti Explorer search for the file META-INF/FraSCAti-Explorer.xml. If it exists, a plugin description is found and the Explorer parse this new plugin and activate it. The full description on explorer plugins can be found here.

A quick way to write your plugin is to take a look at FraSCAti examples. Most of them provide a plugin for FraSCAti Explorer. For instance, let's take a look at the server composite of the calculator example.

The calculator plugin is defined with the help of these files:

The plugin description file (XML) is quite simple and intuitive:

<explorer>
  <node type-name="org.ow2.frascati.examples.soapcalc.api.CalcService">
    <menu>
      <item label="Add 1 to 2 ...">
        <code>org.ow2.frascati.examples.soapcalc.explorer.CalculatorMenuItem</code>
      </item>
    </menu>
    <panel>
      <code>org.ow2.frascati.examples.soapcalc.explorer.CalculatorPanel</code>
    </panel>
  </node>
</explorer>

In this plugin, we just tell to the FraSCAti Explorer that the org.ow2.frascati.examples.soapcalc.api.CalcService type has a menu item called "Add 1 to 2 ..." and a panel. The code child defines the implementation class of each action, item, panel, and so on.

A menu item is implemented by defining an execute() method. A panel is a standard java panel (awt, swing) and provides a reference to the handled object to interact with it.