Creating a Perspective in Java

Generation DataMatrix in Java Creating a Perspective
Creating a Perspective
Data Matrix 2d Barcode Maker In Java
Using Barcode generator for Java Control to generate, create Data Matrix ECC200 image in Java applications.
addActionSet(String)
Barcode Creator In Java
Using Barcode maker for Java Control to generate, create barcode image in Java applications.
- Adds an action set with the given id to
Barcode Reader In Java
Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications.
this page layout
Data Matrix ECC200 Creation In Visual C#
Using Barcode encoder for Visual Studio .NET Control to generate, create Data Matrix ECC200 image in Visual Studio .NET applications.
addFastView(String)
DataMatrix Creation In .NET
Using Barcode maker for ASP.NET Control to generate, create Data Matrix ECC200 image in ASP.NET applications.
- Adds the view with the given id to the
Creating Data Matrix In Visual Studio .NET
Using Barcode generation for VS .NET Control to generate, create Data Matrix image in Visual Studio .NET applications.
page layout as a fast view
Data Matrix Encoder In Visual Basic .NET
Using Barcode printer for Visual Studio .NET Control to generate, create Data Matrix image in VS .NET applications.
addFastView(String, float)
Drawing GTIN - 12 In Java
Using Barcode encoder for Java Control to generate, create UPC-A Supplement 5 image in Java applications.
- Adds the view with the given id
UCC-128 Drawer In Java
Using Barcode printer for Java Control to generate, create EAN 128 image in Java applications.
to the page layout as a fast view with the given width ratio
Data Matrix 2d Barcode Generator In Java
Using Barcode creator for Java Control to generate, create ECC200 image in Java applications.
addNewWizardShortcut(String)
Encoding Code 39 In Java
Using Barcode maker for Java Control to generate, create Code 3/9 image in Java applications.
- Adds a creation wizard to the
Make ANSI/AIM Code 128 In Java
Using Barcode maker for Java Control to generate, create Code 128A image in Java applications.
File New menu
2/5 Standard Encoder In Java
Using Barcode encoder for Java Control to generate, create Industrial 2 of 5 image in Java applications.
addPerspectiveShortcut(String)
Bar Code Drawer In Visual Basic .NET
Using Barcode generator for VS .NET Control to generate, create bar code image in VS .NET applications.
- Adds a perspective shortcut to
Creating Barcode In Visual Basic .NET
Using Barcode generator for .NET Control to generate, create bar code image in VS .NET applications.
the Perspective menu
Code 39 Full ASCII Reader In VS .NET
Using Barcode reader for .NET framework Control to read, scan read, scan image in VS .NET applications.
addPlaceholder(String, int, float, String)
USS Code 128 Printer In C#
Using Barcode generator for VS .NET Control to generate, create Code 128B image in Visual Studio .NET applications.
- Adds a place-
Draw Code39 In .NET Framework
Using Barcode generation for .NET framework Control to generate, create Code 39 image in .NET applications.
holder for a view with the given id to this page layout
Code 3 Of 9 Creator In .NET
Using Barcode printer for ASP.NET Control to generate, create ANSI/AIM Code 39 image in ASP.NET applications.
addShowInPart(String)
Code 128 Code Set B Generator In Visual Basic .NET
Using Barcode maker for .NET Control to generate, create Code-128 image in Visual Studio .NET applications.
- Adds an item to the Show In prompter - Adds a view to the Show View
addShowViewShortcut(String)
menu
addView(String, int, float, String)
- Adds a view with the
TT 10 Perspectives
given id to this page layout
createFolder(String, int, float, String)
- Creates and adds a
folder with the given id to this page layout
createPlaceholderFolder(String, int, float, String)
- Creates
and adds a placeholder for a new folder with the given id to this page layout
getEditorArea()
- Returns the special identifier for the editor
area in this page layout
setEditorAreaVisible(boolean)
- Show or hide the editor area
for the page's layout
102 ENHANCING AN EXISTING PERSPECTIVE
In addition to creating a new perspective, you can also extend an existing perspective by adding new views, placeholders, shortcuts and action sets To illustrate this, we will add several extensions to the standard Resource perspective
Enhancing an Existing Perspective
To extend an existing perspective, open the favorites plug-in manifest editor, select the Extensions tab, and click the Add button to open the New Extension wizard Select Generic Wizards on the left and Schema-based Extension on the right, followed by the Next button Select the
orgeclipseuiperspectiveExtensions
extension point from the list of avail-
able extension points (see Figure 10-6)
TT 10 Perspectives
Figure 10-6 - The New Extension wizard showing the orgeclipseuiperspectiveExtensions extension point selected
Enhancing an Existing Perspective
On the Extensions page of the plug-in manifest editor, right click on the orgeclipseuiperspectiveExtensions extension, and select New > perspectiveExtension This immediately adds a perspective extension named
comqualityeclipsefavoritesperspectiveExtension1
in the plugin manifest
Double click on this new perspective extension to open the Properties view and change the targetID field to orgeclipseuiresourcePerspective (see Figure 10-7) This will change the name of the perspective extension as seen on the Extensions page
Figure 10-7 The properties view showing the perspective extension attributes
Once the perspective extension has been created, a number of different extension types may be added including views, placeholders, action sets, as well as shortcuts for views, perspectives and the new wizards
TT 10 Perspectives
Adding Views and Placeholders
A view may be either directly added to an existing perspective or a placeholder may be added so that when the user opens the view it appears in the correct place As an example, we will add the Favorites view to the standard Resource perspective On the Extensions page, right-click on the newly created orgeclipseuiresourcePerspective extension, and select New > view This immediately adds a perspective view extension named
comqualityeclipsefavoritesview1
in the plugin manifest Double clicking
on this new extension opens the Properties view so that the properties can be modified as follows (see Figure 10-8):
id - "comqualityeclipsefavoritesviewsFavoritesView" The unique identifier of the Favorites view relative - "orgeclipseuiviewsTaskList" The view relative to which the added view should be oriented
Enhancing an Existing Perspective
relationship - "stack" This specifies how the view should be oriented relative to the target view visible - "true" The view should be initially visible
Figure 10-8 The properties view showing the perspective view extension attributes
The name of the perspective view extension as seen on the Extensions page will change to reflect the id entered above In addition to being stacked in a folder relative to another view, the added view could also be placed to the left, right, above or below the view specified in the relative field or added as a fast view in the left-hand toolbar
TT 10 Perspectives
If the new view is added to the left, right, above or below the ratio of space that the new view takes from the old view may also be specified If the visible field is specified as true, the new view will be opened when the perspective is opened If it is set to false, the view will not be opened automatically Rather, a placeholder is established that defines the initial location of the view, if it is ever opened by the user Switching to the Source page of the plug-in manifest editor, you will see the following new section of XML defining the new perspective extension
<extension point="orgeclipseuiperspectiveExtensions"> <perspectiveExtension targetID="orgeclipseuiresourcePerspective"> <view relative="orgeclipseuiviewsTaskList" visible="true" relationship="stack" id="comqualityeclipsefavoritesviews FavoritesView"> </view> </perspectiveExtension> </extension>
When the Resource perspective is opened, the Favorites view will appear stacked relative to the Task view (see Figure 10-9)
Enhancing an Existing Perspective
Figure 10-9 - The Resource perspective showing the Favorites view
Adding Shortcuts
Shortcuts for quickly accessing related views, perspectives and new wizards may also be added to the perspective As an example, we will add shortcuts
TT 10 Perspectives
for accessing the Favorites view and perspective to the Resources perspective We will start by adding a view shortcut for accessing the Favorites view from the Resource perspective On the Extensions page, right-click on the orgeclipseuiresourcePerspective extension, and select New > viewShortcut This adds a view shortcut extension named