The
Workbench
When the Workbench is launched, the first thing you see
is a dialog that allows you to select where the workspace should be located.
The workspace is the directory where your work will be stored. For now, just
click OK to pick the default location.
After the workspace location is chosen, a single
Workbench window is displayed. A Workbench window offers one or more
perspectives. A perspective contains editors and views, such as the Project
Explorer. Multiple Workbench windows can be opened simultaneously. Initially,
in the first Workbench window that is opened, the Java perspective is
displayed, with only the Welcome view visible. Click the arrow labeled Workbench
in the Welcome view to cause the other views in the perspective to become visible.
Note you can get the Welcome view back at any time by selecting Help >
Welcome.
A shortcut bar appears in the top right corner of the
window. This allows you to open new perspectives and switch between ones
already open. The name of the active perspective is shown in the title of the
window and its item in the shortcut bar is highlighted.
You should be seeing the Java perspective. We will switch
to the simpler Resource perspective to simplify this tutorial. Select Window >
Open Perspective > Other... > Resource. The Project Explorer,
Outline, and Tasks views should now be visible.
Editors
Depending on the type of file that is being edited, the
appropriate editor is displayed in the editor area. For example, if a .TXT file
is being edited, a text editor is displayed in the editor area. The figure
below shows an editor open on the file file1.txt. The name of the file appears
in the tab of the editor. An asterisk (*) appearing at the left side of the tab
indicates that the editor has unsaved changes. If an attempt is made to close
the editor or exit the Workbench with unsaved changes, a prompt to save the
editor's changes will appear.
When an editor is active, the Workbench menu bar and
toolbar contain operations applicable to the editor. When a view becomes
active, the editor operations are disabled. However, certain operations may be
appropriate in the context of a view and will remain enabled.
The editors can be stacked in the editor area and
individual editors can be activated by clicking the tab for the editor. Editors
can also be tiled side-by-side in the editor area so their content can be
viewed simultaneously. In the figure below, editors for JanesFile.txt and
JanesFile2.txt have been placed above the editor for JanesText.txt.
Instructions will be given later in this tutorial explaining how to rearrange
views and editors.
If a resource does not have an associated editor, the
Workbench will attempt to launch an external editor registered with the
platform. These external editors are not tightly integrated with the Workbench
and are not embedded in the Workbench's editor area.
Editors can be cycled through using the back and forward
arrow buttons in the toolbar. These move through the last mouse selection
points and permit moving through several points in a file before moving to
another one. Additionally, editors can be cycled by using the Ctrl+F6
accelerator (Command+F6 on the Macintosh). Ctrl+F6 pops up a list of currently
open editors. By default, the list will have selected the editor used before
the current one, allowing you to easily go back to the previous editor.
On Windows,
if the associated editor is an external editor, the Workbench may attempt to
launch the editor in-place as an OLE document editor. For example, editing a
DOC file will cause Microsoft Word to be opened in-place within the Workbench
if Microsoft Word is installed on the machine. If Microsoft Word has not been
installed, Word Pad will open instead.
Views
The primary use of Views is to provide navigation of the information
in the Workbench. For example:
- The
Bookmarks view displays all bookmarks in the Workbench along with the
names of the files with which the bookmarks are associated.
- The
Project Explorer view displays the Workbench projects, their folders and
files.
A view might appear by itself or stacked with other views in a
tabbed notebook.
To activate a view that is part of a tabbed notebook simply click
its tab.
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.
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 sub-menu. Additional views are available
by choosing Other...
at the bottom of the Show View sub-menu. This is just one of the many
features that provide for the creation of a custom work environment.
Through the normal course of using the Workbench you will open,
move, resize, and close views. If you'd like to restore the perspective back to
its original state, you can select the Window > Reset Perspective
menu operation.
No comments:
Post a Comment
SAY HELLO!!