Work with perspectives

Perspectives

Each Workbench window contains one or more perspectives. A perspective defines the initial set and layout of views in the Workbench window. Within the window, each perspective shares the same set of editors. Each perspective provides a set of capabilities aimed at accomplishing a specific type of task or working with specific types of resources. For example, the Java perspective combines views that you would commonly use while editing Java source files, while the Debug perspective contains the views that you would use while debugging Java programs. As you work in the Workbench, you will probably switch perspectives frequently.

Perspectives control what appears in certain menus and toolbars. They define visible action sets, which you can change to customize a perspective. You can save a perspective that you build in this manner, making your own custom perspective that you can open again later.

You can set your Workbench preferences to open perspectives in the same window or in a new window.

Opening perspectives

Perspectives provide combinations of views and editors that are suited to performing a particular set of tasks. For example, you would normally open the Debug perspective to debug a Java program.

To open a new perspective:

  1. Click the Open a Perspective button on the shortcut bar on the left side of the Workbench window. (This provides the same function as the Window > Open Perspective menu on the menu bar.)

    Open Perspective

  2. To see a complete list of perspectives, select Other from the drop-down menu.

  3. Select the perspective that you want to open.

    Select Perspective

When the perpective opens, the title bar of the window it is in changes to display the name of the perspective. In addition, an icon is added to the shortcut bar, allowing you to quickly switch back to that perspective from other perspectives in the same window.

By default, a perspective will open in the same window. If you would rather it opened in a new window, change the setting in Window > Preferences > Workbench > Perspectives.

Switching between perspectives

Open perspectives are all represented by icons on the shortcut bar (the toolbar at the left of the Workbench window). When you have more than one perspective open, you can switch between them by clicking the icons on the shortcut bar.

Select Perspective

Changing where perspectives open

You can change the default behavior for how perspectives are opened in the Workbench:

  1. From the main menu bar, select Window > Preferences.

  2. Expand the Workbench category on the left and select Perspectives. The Perspectives preferences page opens.

  3. Select either In the same window or In a new window from the Open a new perspective group.

  4. Click OK.

Specifying the default perspective

The default perspective always shows up on the Window > Open Perspective menu. The Resource perspective is the predefined default perspective.

To change the default perspective:

  1. From the main menu bar, select Window > Preferences.

  2. Expand the Workbench category on the left and select Perspectives. The Perspectives preferences page opens.

  3. Select the perspective that you want to define as the default, and click Make Default. The default indicator moves to the perspective that you selected.

  4. Click OK.

Configuring perspectives

In addition to configuring the layout of your perspective you can also control several other key aspects of a perspective. These include:

To configure a perspective:

  1. Switch to the perspective that you want to configure.

  2. Select Window > Customize Perspective.

  3. Expand the item that you want to customize.

  4. Use the check boxes to select which elements you want to see on drop-down menus in the selected perspective. Items you do not select will still be accessible by clicking the Other menu option.

  5. Click OK.

Configure Perspective

Java perspectives

The Java development tools contribute the following perspectives to the workbench: Java, Java Browsing, Java Type Hierarchy, Debug.

Java

A perspective tuned for working with Java projects. It consists of an editor area and the following views:

Java Perspective

Java Browsing

A perspective tuned for working with Java projects. It consists of an editor area and the following views:

Java Browsing Perspective

Java Type Hierarchy

This perspective allows you to explore a type hierarchy. It can be opened on types, compilation units, packages, projects or source folders and consists of the Hierarchy view and an editor.

Java Type Hierarchy Perspective

Debug

This perspective is tuned for debugging your Java program. It includes an editor area and the following views:

Debug Perspective

Saving a user-defined perspective

If you have modified a perspective by adding, deleting, or moving (docking) views, you can save your changes for future use.

  1. Switch to the perspective that you want to save.

  2. Click Window > Save Perspective As.

  3. Type a new name for the perspective into the Name field.

  4. Click OK.

The name of the new perspective is added to the Window > Open Perspective menu.

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine