Work with prespectives and views

Views

Views support editors and provide alternative presentations or navigations of the information in the Workbench. For example:

A view might appear by itself or stacked with other views in a tabbed notebook:

Stacked views

To activate a view that is part of a tabbed notebook simply click its tab. The Workbench provides a number of quick and easy ways to configure an environment, including whether the tabs are at the bottom or top of the notebooks.

Views have two menus, the first, which is accessed by right clicking on the view's tab, allows the view to be manipulated in much the same manner as the menu associated with the Workbench window:

View menu on right click

The second menu, called the "view pull-down menu", is accessed by clicking the down arrow. The view pull-down menu typically contains operations that apply to the entire contents of the view, but not to a specific item shown in the view.

View pull-down menu

Customizing the Workbench is a good opportunity to use the Window > Reset Perspective menu operation. The reset operation restores the layout to its original state.

A view can be displayed by selecting it from the Window > Show View menu. A perspective determines which views may be required and displays these on the Show View submenu. Additional views are available by choosing Other... at the bottom of the Show View submenu. This is just one of the many features that provide for the creation of a custom work environment.

Show View

Fast views

Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window.

Fast views are represented by toolbar buttons on the fast view bar, which is the horizontal toolbar on the bottom left of the Workbench window. When you click the toolbar button for a fast view, that view opens temporarily in the current perspective. As soon as you click outside that view, it is hidden again.

Fast View Bar

You can create a new fast view by dragging any open view to the shortcut bar or by selecting Fast View from the menu that opens when you click the icon at the left end of the view's title bar:

Fast View

Showing and hiding members

Several Java views (e.g. Outline, Package Explorer, Members) offer filtering of members (fields, types and methods). The filters are available as toolbar buttons or as view menu items, depending on the view. There are 3 member filters:

Adding scripted events to Web pages

You can use the Quick Edit view to add scripted events to your Web pages

To add scripted events:

  1. Open an HTML or JSP file in Page Designer.

  2. Select a tag in the HTML or JSP file. For example, select a Submit button in Page Designer or its corresponding FORM tag in the source editor.

  3. Open the Quick Edit view if it is not already open (Window > Show View > Basic > Quick Edit).

  4. Select an event in the event pane (the left pane) of the Quick Edit view. For example, select an onclick event.

    Quick Edit view

  5. You can add script to the script editor (the right pane) in one of the following ways:

    • Type directly in the Quick Edit script editor.

    • Drag a snippet from the Snippets view.

    • Insert snippets by clicking the menu icon in the Quick Edit toolbar and choosing Insert Snippet. Select a snippet from the list of snippets that opens.

    Tip: Before you drag and drop items or text from the Snippets view onto the Quick Edit view, make sure that the Quick Edit view is cleared of the Insert a code snippet instruction. You can clear the instructions by clicking in the script editor pane.

  6. Select the next tag to which you want to add a scripted event or select another event, and repeat the procedure.

Breakpoints view

The Breakpoints view lists all the breakpoints you have set in the workbench projects. You can double-click a breakpoint to display its location in the editor. In this view, you can also enable or disable breakpoints, delete them, or add new ones.

Breakpoints view

This view also lists Java exception breakpoints, which suspend execution at the point where the exception is thrown. You can add or remove exceptions.

Controlling your console

Output displayed in the console can be locked to a specific process via the Pin Console action in the Console view toolbar:

Pin Console

There's also a Scroll Lock action that stops the console from automatically scrolling as new output is appended:

Scroll Lock

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