Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

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 (http://wiki.pentaho.com/display/ServerDoc2x/The+Pentaho+XUL+Framework+Developer's+Guide). Below is a current list of areas written in XUL that can be modified:

...

Code Block
<?xml version='1.0' encoding='UTF-8'?>
<beans
  xmlns="http://www.springframework.org/schema/beans" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

  <bean id="YOUR_BEAN_ID" class="org.sample.YourSpoonPluginClass"></bean>
</beans>

...

Code Block
XulOverlay overlay = new DefaultXulOverlay("org/pentaho/agilebi/pdi/spoon/overlays.xul");
Map<String, XulOverlay>List<XulOverlay>> overlays = new HashMap<String, XulOverlay>List<XulOverlay>>();
overlays.put("spoon", Collections.singletonList(overlay));
return overlays;

Returning an overlay keyed as "spoon" causes the overlay to be applied to the main Spoon UI. Other locations can be modified by returning overlays associated with the key for those areas:

...

Code Block
Map<String, XulEventHandler> handlers = new HashMap<String, XulEventHandler>List<XulEventHandler>>();
handlers.put("spoon", XUL_EVENTHANDLER_INSTANCE);
handlers.put("databaseDialog", Collections.singletonList(XUL_EVENTHANDLER_INSTANCE));
return handlers;

Lifycycle Listeners

...

Spoon Perspectives are specialized classes that can add a new super-set of functionality to Spoon that change the entire look of the application when enabled. Spoon Perspectives are covered in detail here (add link).