...
Spoon plugins provide developers the ability to add new or modify existing functionality of the Spoon UI. A Spoon plugin can modify any area that's been written in Pentaho XUL Xul Developer's Guide . Below is a current list of areas written in XUL that can be modified:
- Menu system
- Toolbars
- Agile BI
- Database Explorer Dialog
Plugins can (http://wiki.pentaho.com/display/ServerDoc2x/The+Pentaho+XUL+Framework+Developer's+Guide). They can also provide whole new areas of funtionality to Spoon through the concept of a Spoon Perspective, which is not limited to XUL.
Attached to this wiki is a zip file containing an example Spoon Plugin, some of which you'll see below. In addition to a simple Hello World example, it also contains a more complex document-based Spoon Perspective.
Current Spoon Plugin Doc:
Common Use Cases
The most common use case is to add new functionality to Spoon. However, user interface elements can be hidden, rearranged or have their behaviors changed by Spoon Plugins.
...
Code Block | ||
---|---|---|
| ||
<?xml version='1.0' encoding='UTF-8'?>
@SpoonPlugin(id = "SpoonExample", image = "")
@SpoonPluginCategories({"spoon"})
public class HelloWorldSpoonPlugin implements SpoonPluginInterface {
....
}
|
...
Code Block | ||
---|---|---|
| ||
public void applyToContainer(String category, XulDomContainer container) throws XulException { container.registerClassLoader(getClass().getClassLoader()); if(category.equals("spoon")){ container.loadOverlay("org/pentaho/di/plugins/examples/helloworld/res/spoon_overlay.xul"); container.addEventHandler(new HelloWorldPerspectiveHandler()); } } |
Plugin Area | Category ID |
---|---|
Spoon Menusystem and toolbar | "spoon" |
Database Explorer Dialog | "database_dialog" |
Job Toolbar | "job-graph" |
Transformation Toolbar | "trans-graph" |
Repository Explorer | "repository-explorer" |
Providing New Prespectives to Spoon
...