Introduction to Spoon Perspectives
Spoon Perspectives are a set of functionality so distinct from other areas of Spoon that they've been designed to take over the whole look of the application. The traditional ETL functionality of Spoon is the default perspective and with the release of AGILE_BI_RELEASE_NUM, two additional perspectives have been introduced for Modeling and Visualization of data.
Adding a New Perspective to Spoon
Perspectives are supplied by Spoon Plugins (link to Spoon Plugin Doc). Each Spoon Plugin can provide only one perspective, though several Spoon plugins can be packaged together.
The following methods must return values for a perspective to be valid
Unique identifier for the perspective
SWT Composite to display in the main area when active
Localized Name of the persepctive
16x16 InputStream for the toolbar icon
These methods must be implemented but do not need to return values or necessarily do any work.
Called when the perspective is loaded or unloaded
Optional list of Xul overlys to be loaded when the perspective is activated
Optional list of Xul Event Handlers to be registered when the perspective is activated
Listeners can be added to be informed when the perspective is activated/deactivated
If the perspective has content that can be saved, this method must return the EngineMeta for the active content
Interacting with Perspectives
Spoon Perspectives are managed by a central object, SpoonPerspectiveManager. SpoonPerspectiveManager can be called to active a particular perspective or find the currently active perspective.
Passing in a Spoon Perspective class literal will cause spoon to unload the current perspective and load the one requested
Returns the active SpoonPerspective object