Perspective Extensions¶
In the previous section we used one method for defining a perspective – we used code to manually add views to the perspective. We will now use a second technique – using a plugin.xml extension to declare what a perspective is composed of.
To control what menus are shown we will use an extension to add an Action Set to a perspective. The “Perspective Extensions” extension point can be used to control what actions are available, what views are displayed and so forth.
Open the plugin.xml file.
Switch to the Extensions tab
Click the Add... Button
Select org.eclipse.ui.perspectiveExtensions
Press Finish
Select the targetID element and enter net.refractions.udig.tutorials.customapp.perspective
Save the Manifest.
Right click on net.refractions.udig.tutorials.customapp.perpsective and select New ‣ actionSet
Select the id* field and enter: net.refractions.udig.project.ui.LayerActions
Repeat this process for the following additional entries:
- net.refractions.udig.project.ui.layer.menu
- net.refractions.udig.project.ui.map.menu
- net.refractions.udig.catalog.ui.data.menu
Hint
Eclipse 3.5 includes a Browse button allowing you to look up action sets to add.