7.1. View Declaration
Three steps are involved in creating a new view:
One way to do all this at once is to create the view when the plug-in itself is being created (see Section 2.2.3, Define the view, on page 69). If the plug-in already exists, then this becomes a three-step process.
7.1.1. Declaring a view category
First, to define a new view category, edit the plug-in manifest and navigate to the Extensions page. Click the Add... button to add the org.eclipse.ui.views extension if it is not already present (see Figure 7-2). Right-click the org.eclipse.ui.views extension and select New > category to add a new category if one does not exist already.
Figure 7-2. The New Extension wizard with the org.eclipse.ui.views extension point selected.
The properties for this category can be modified in the plug-in manifest editor (see Figure 7-3). For the category containing the Favorites view, the attributes would be as follows:
Figure 7-3. The Plug-in manifest editor showing the Quality Eclipse view category.
7.1.2. Declaring a view
When the view category has been defined, right-click again on the org.eclipse.ui.views extension in the Extensions page and select New > view to define a new view. Use the Extension Element Details section of the editor (see Figure 7-4) to modify the attributes of the view. For the Favorites view, the attributes would be as follows:
Figure 7-4. The Plug-in manifest editor view showing the Favorites view.