Perspectives, Views &
Editors
Peter Komisar © Conestoga
College version 1.0 Fall / 2007
Reference:
Third Draft Document for Review, Sept. 17,2007,
SG24-7501-00 'Rational Application Developer V7 Programming
Guide'.
This is a synopsis
of information found in the fourth chapter,
'Perspectives Views & Editors' found in the third draft Document
for Review, dated September 17, SG24-7501-00 Rational
Application Developer V7 Programming Guide. It has been
prepared for private academic purposes and is not an effort
to publish the contained material.
Any anonymous
quotes are from the
above noted reference.
Both the J2EE and IBM's RAD,
(for Rational Application
Developer) environment make use of the concept of roles
to define divisions of duty. Different tools are provided
to the user filling different roles.
First common structures are introduced.
The Integrated Development Environment
IDE = 'Workbench' = a
set of software development
tools accessible from a single user interface.
Several default perspectives are
supplied. The user
can switch between several opened perspectives.
Perspectives
= View(s) + Editor(s)
Example
The J2EE perspective contains views and editors
applicable for EJB development.
Views - supply
different ways of looking at resources.
Views are stackable, in tabbed panes.
Ctrl-F7 - Use Ctrl-F7 to flip
through views. Press F7
until the desired view is found.
Examples
- Project Explorer views projects
- The Links View shows URL links between Web pages
Editors - permit the creation and modification of resources.
Editors with Specific File Type
Associations Auto Open
Given Editors associated with specific file types are
automatically opened. If no association is found the
default editor is opened which is the text editor.
RAD synchronizes views with changes in
editors.
Examples
Page Designer for HTML
Java Editor for .java and .jpage files
Ctrl-F6 - Use Ctrl-F6 to flip
through editors. Press
F6 until the desired view is found.
'Next' and 'Previous' cursor
location move focus
around recent cursor positions.
The 'Last Edit
Location Icon', a 'Previous' icon with
an asterisk associated, returns the focus to the last
change location.
'Next and Previous
Annotation', up down arrows over
page icons list through items. For instance, these
buttons may be used to move through error positions.
Perspective
Layout
See the PDF for a good picture.
- The
editor // center panel
- Project Explorer //
west, for navigation
- Outline or Pallete // east
- Task, Problems, Property Views //
south
Selecting Perspectives
Select Window → Open
Perspective
ShortCut Bar
In the upper right-hand corner of a perspective a
shortcut bar is supplied. The left-most button opens
another perspective. The right-most button shows
all opened perspectives.
//
skipped tips which were obvious
The Default
Perspective
The J2EE Perspective is the default perspective.
To specify a perspective as the default do the following.
Specifying the Default
Perspective
Window →
Preferences→
expand General →
Select Perspectives→Select
the perspective that
will become the Default →click
Make Default→
Click OK.
Organizing and Customizing Perspectives
Eclipse allows the following actions on perspectives:
- opening
- customizing
- resetting
- saving
- closing
//
actions are found in the Window menu
Actions on Perspectives
Window →
Customize Perspective
//
the 'Customize Perspective' dialog opens
Customizing
Menus
From with the Customize
Perspective View use
the following.
The Shortcuts Tab
allows specifying which options
are
shown on the 'New', 'Open Perspective', and
'Show View' menus within the current perspective.
Select a menu to customize ( from the Sub menus
drop
down window) → check
the boxes for which options
you want to
appear.
//
unselected items are accessible in 'Other menu options'
The Commands Tab
allows selecting command
groups for the menu bar or tool bar.
It is also possible to reposition any of the views and
editors and to add or
remove other editors as desired.
Adding and Removing Views
Select Window→ Show
View →select
the view to add to
currently open perspective.
To remove a view, simply close it from its
title menu.
Move a view to another pane using drag
and
drop.
Moving Views
Select its title bar →drag
the view to another place on
the
workspace.
//
cursor changes to a drop cursor
// area to be filled is highlighted
with a rectangular outline
The drop cursor points to where the view will dock.
Other icons indicate the view will dock, in a tabbed
pane, a status bar, or the view becomes a separate
window.
Other View
Controls
Fast View
A Fast View appears as a button in the status bar
of
Eclipse in the bottom left corner of the workspace.
Clicking
toggles whether or not the view displays on top of other
views in the perspective.
Maximize and Minimize a View
Maximize
- Double-click the title bar of
the view
- press Ctrl+M
- click the Maximize icon in the view
toolbar.
To
Restore
- double-click the title bar
- select the restore button
- press Ctrl+M again.
Minimize
- click the minimize button in the toolbar
- click the Restore button
Save
To save a configuration of a perspective do the
following.
Saving a Perspective
Configuration
selecting Window →Save
Perspective As
→type a
new name.
//
The new perspective now appears as an option
// on the Open Perspective window.
Restore
To restore the currently open perspective reset
as follows.
Select Window →
Reset
Perspective
Help
The RAD 7 Help system provides documentation
that may be browsed, printed and searched.
Displaying Help Contents
Selecting Help →Help Contents // from menu bar
Available books are listed in the left pane while
contents are listed in the right pane. Navigate with
'Go Back' & 'Go Forward' Icons.
Help
Functions
Show in Table of Contents -synchronizes the navigation
frame with the current topic Shows where the current topic
fits into the navigation path.
Bookmark Document
-adds a bookmark to the
'Bookmarks' view,
Print Page -
allows printing the currently displayed page
Maximize -
maximizes the right hand pane to fill
//
the icon changes to 'Restore' to reverse action
F1 → Help View
Pressing F1 at anytime will bring the Help View up.
Help can also be found by the following steps.
Windowing to Help
Window → Show View → Other → Help → Help.
Search Scope
"Clicking the Search Scope link opens a dialog
box where you can select a scope for your search."
Survey of Perspectives
We have elected to leave out
the perspectives
not supported in Enterprise Eclpse.
Following is a description of each of the perspectives
supplied in RAD 7.0. First a list is provided of the
perspectives in alphabetical order as they appear
in the 'Select Perspective Dialog'.
Eclipse Supported
Perspectives
- Crystal Reports perspective
- CVS Repository Exploring perspective
- Data perspective
- Debug perspective
- Generic Log Adapter perspective
- J2EE perspective
- Java perspective
- Pre-defined search scope
- Java Browsing perspective
- Java Type Hierarchy perspective
- Plug-in Development perspective
- Profiling and Logging perspective
- Report design perspective
- Resource perspective
- Rule Builder perspective
- Team Synchronizing perspective
- Test
perspective
- Web perspective
CVS Repository Exploring Perspective //
also in Eclipse
"The Concurrent Versions System (CVS), also known
as the Concurrent Versioning System, is an open-source
version control system that keeps track of all work and all
changes in a set of files, typically the implementation of
a software project, and allows several (potentially widely-
separated) developers to collaborate. It was invented and
developed by Dick Grune in the 1980s"
-quote from wikipedia
This perspective lets you connect to Concurrent Versions
System (CVS) repositories so that the revision history of
resources can be inspected.
The perspective holds the following views:
- CVS
Repositories View
- shows CVS repository locations
- expanding reveals
- the main trunk (HEAD),
- project versions
- branches in that repository
- further expand to folders & files
//
The context menu allows specifying new repository locations.
- Editor View
- view repository files by double-clicking
- from a branch or version.
- The file specified opens in the editor pane.
//
the contents of the editor are read-only.
- CVS Resource
History View
- Displays detailed file history
- provides a list of all the revisions
- revisions can be compared
- CVS
Annotation View
- → right-click & select
'Show Annotation'
- display
a summary of changes made to
a
resource since coming under the CVS server's control.
The Database
Development
Perspective
in Eclipse
RAD
had quite an extensive API for Database Connectivity.
The Eclipse support here is spartan but could be complimented
with Plug-ins.
Eclipse does supply a Database Debug Perspective.
Debug
Perspective // basic to Eclipse
Debug is a standard part of Eclipse. The default Debug
perspective has five view panes.
Debug View Panes
- Debug and Servers //
Top left
- Breakpoints,
Variables & Expressions // Top right
- The editor in the debugging process //
middle left
- Outline view // middle right
- The Console & Tasks view // bottom
Debug
View
"The Debug View displays the
stack frame for the
suspended threads
for each target you are debugging.
Each thread in your program appears as a node in the
tree. If the thread is suspended, its stack frames are
shown as child elements.
If the resource containing a selected thread is not open
and/or active, the file opens in the editor and becomes
active, focusing on the point in the source where the
thread is currently positioned. The Debug view contains
a number of command buttons which enable users to
perform actions such as start, terminate, and step-by-
step debug
actions."
- IBM RAD 7. 0 Redbook
Variables
View
The Variables view displays information about the
variables in the currently selected stack frame.
Breakpoints
View
//
"A breakpoint
suspends the execution of a program
// at the
location where the breakpoint is set." -eclipse help
The Breakpoints view lists all the breakpoints set in
the Workbench projects. Double-click a breakpoint
to display its location in the editor. Breakpoints can
be enabled or disabled, deleted, have their properties
changed and new ones made be added.
"This view also lists Java exception breakpoints,
which suspend execution at the point where the
exception is thrown."
Servers
View
"The Servers view lists all the defined servers and
their status. Right-clicking a server displays the
server context menu, which allows the server to
be started, stopped and to republish the current
applications."
Outline View // a skeleton view
of the resource
"The Outline view shows the elements (imports,
class, fields, and methods) that exist in the source
file in the front editor. Clicking an item in the outline
will position you in the editor view at the line where
that structure element is defined."
Problems View
This view shows all errors, warnings, and information
messages relating to resources in the workspace.
Items listed can be used to navigate to the pertinent
line of code.
//
The Console and Tasks views were already discussed
Generic Log Adapter
Perspective
// can get from Eclipse site, a standardized logging system
This is a RAD 7 view however there is a standardized
logging system that can be obtained for Eclipse from
the home site.
This view supplies a different logging system. It allows
the creation of applications to converts logs into the
Common Base Event or CBE format.
"This is a defined format for logging system events in
a standardized format, so that problems from different
applications can be caught and managed centrally. "
Because most applications do not log CBE format,
tools are provided to create and debug adapters
from non-standard application log formats to perspective supports creating, editing, and
compiling Java code.
A main editor area displayed by default is complimented
with the following views:
Package Explorer View
This view provides a Java-specific view of resources.
It shows the source folders and libraries
that are
referenced in tree format Contents of internal and
external JAR files can be browsed.
Hierarchy View
This view provides three ways to look at class
hierarchy.
Three Hierarchy Views //
click one of three icons
- The
Type Hierarchy
- displays
- position, super and subclasses
- The Supertype
Hierarchy
- any interfaces the type implements
- The Subtype
Hierarchy
- displays
- for interfaces
- displays
- classes that implement the type.
Javadoc
View
This view shows the Javadoc comments associated
an element selected in the editor or outline view.
Declarations View
Shows the source code declaration of the element
selected in the editor or in outline view.
//
The Outline and Problems views that are in the Java
// perspective are the same as those
discussed earlier
// in the Debug view
//
Chapter 7
J2EE
Perspective // Eclipse has a J2EE version
This perspective is used for working with Enterprise
Application projects and EJB projects. It contains the
following views typically used when developing J2EE
applications:
Project
Explorer View
Project Explorer in the J2EE perspective is similar to the
Navigator view but includes
extra icons specific for J2EE
such as deployment
descriptors and the Security Editor
For Web projects the Project Explorer view includes icons
for the web deployment descriptor, the Web Navigation
view, the Web Diagram view and the Security Editor.
Snippets View // store bits of
code
The Snippets view lets you catalog and organize reusable
programming objects. Examples are HTML tagging,
JavaScript, JSP code and custom JSP tags. Snippets are
arranged in drawers. Drawers can be customized by right-
clicking a drawer and selecting Customize.
Properties
View
"Provides a tabular view of the properties and associated
values of objects in files you have open in an editor, the
format of this view differs depending on what is selected in
the editor. " The default is to show file properties (last
modification date, file path and so on).
//
The Outline, Servers, Problems, Tasks, and Database
// Explorer views, relevant to the
Web perspective, have
// already been discussed.
Java
Browsing Perspective
The Java Browsing perspective provides additional support
for the Java perspective. The
Browsing perspective has
a larger editor area and
several views to select a
programming element to edit.
Java Browsing Perspective Views
- Projects
view
- Packages view
- Types view
- Members view
- shows the selected types members
Java Browsing Perspective Buttons
- The Show
Selected Element Only button
- toggles between
- selected type contents and the
- code element selected in Member's view.
- The
Toggle Mark occurrences button
- toggled
- highlights occurrences
of the previous search text
Java Type Hierarchy Perspective
This perspective users to explore the type hierarchy.
It can be opened on types,
compilation units, packages,
projects, or source folders.
It consists of the Hierarchy
view and an editor.
The Hierarchy view shows only an information message
until you select a type, in the outline view , in the editor
or by drag and dropping an element onto this view.
"To open a type in the Hierarchy view, open the context
menu for a Java class in any view or editor (for example
the main source code editor and select Open Type
Hierarchy. "
The Hierarchy view is present in the Java and the Java
Type perspective, it is useful as it provides a an uncluttered
view of complex object hierarchies for exploration and
understanding.
Plug-in
Development Perspective
"The ability to write extra features and plug-ins is
an important part of the philosophy of the Eclipse
framework."
This perspective allows for the creation of custom
Application Developer or Eclipse tools.
The Plug-in Model provides a
flexible design that
provides a base on which
other parties can build
plug-ins, for Eclipse
whether open source or
proprietary.
The Plug-in Development
perspective Views
- Plug-ins View
- Shows the combined list of
- workspace &
- external plug-ins
- Error Log
View
- Shows the error log for the platform
- supports diagnosis of plug-in code.
// The perspective also includes Package Explorer,
// Outline, Tasks, and Problems views
already described
//
how to develop plug-ins for RAD or Eclipse is not covered in this
// redbook. For more info see the
IBM Redbooks document. 'Eclipse
// Development using the
Graphical Editing Framework and the Eclipse
// Modeling Framework', SG24-6302 or
'The Java Developer’s Guide
// to Eclipse-Second Edition', D’Anjou et al
RAD 7 has a Profiling and Logging Perspective which
Eclipse does not so we take a pass here.
- Profiling
and
Logging Perspective
Eclipse has an equivalent
perspective to the 'Report Design
Perspective' that can be
picked up at the Eclipse site.
Report Design
Perspective // Eclipse but needs to be added
This perspective supports the design
and development
of report templates using the
Business Intelligence and
Reporting Tools (BIRT)
framework. This is an Eclipse-
based open source reporting system for Web applications,
specifically for those based on Java and J2EE.
"The BIRT system also includes a runtime component to
process these reports which can be added to an Application
Server. The Reports Designer
editor provides the facility
to layout the fields on the
report template and to map these design
and development
of report templates using the
Business Intelligence and
Reporting Tools (BIRT)
framework. This is an Eclipse-
based open source reporting system for Web applications,
specifically for those based on Java and J2EE.
"The BIRT system also includes a runtime component to
process these reports which can be added to an Application
Server. The Reports Designer
editor provides the facility
to layout the fields on the
report template and to map these
fields with data from XML
schemas or database definitions
and to test them within Application Developer."
Link to Add Report Design
Functionality
http://eclipse.org/birt/phoenix/project
Resource Perspective // Included with Eclipse
Resource is a simple perspective containing only Navigator,
Outline, and Tasks views and an editor area. It is useful to
abstract the view of underlying files and folders present for
a project without extra information added.
//
All these views have been previously described
Rule Builder
Perspective // import from the IBM site
The Rule Builder perspective supports 'Active Correlation
Technology'. This is a system "that processes logs and other
application outputs according to a set of rules to help
diagnose when certain high level system events occur,
. . . in particular . . . when an error or some other condition
worth raising an alert has occurred."
"The rules are expressed in a defined XML language and
can be configured to run within a running application server.
Application Developer provides a Rules Editing wizard in
this perspective to aid the rule development process."
Active Correlation Technology
Link
http://www.ibm.com/developerworks/autonomic/library/ac-acact/index.html
Team
Synchronizing Perspective //
part of Eclipse
The Team Synchronizing perspective syn you in
completing the synchronization."
- Source Code
Comparison Editor
This editor shows a line by line comparison of two
revisions of the same source code.
//
Also present is the History view to show the revision history
// and the Tasks and Problems view.
// more details in Chapter 26!
Test
Perspective
In Eclipse there is there is a
JUnit perspective
described for testing. Though
not listed in the
perspectives, the basic classes are supported
in Eclipse.
Other Frameworks supported in
Eclipse
Check Window -> Preferences
The Test perspective provides a framework for defining
and executing test cases and test suites. The focus is
on testing not building the code that is used in in JUnit
tests. This is best done in the Java perspective.
Key Test Perspective Views
- Test Navigator
- The main view for
- browsing and editing test suites &
- reviewing test results.
- two main structuring options to display resources
- The Show
the Resource test navigator
- shows resources based on the file system
- Show the
Logical test navigator option
- shows the resources arranged
- by Test suites, source code and test results.
- Test Log view
- click a test result, this view shows
- in the main editor area, shows
- the date/time and result of the test.
- Test editor
- provides a summary of a test suite and its contained tests.
//
The Tasks, Properties, and Outline views are present and have
already been covered There is more info in Chapter 21 of the
RAD pdf
Web Perspective
There
is a web perspective in both RAD 7 and Eclipse.
However it appears that the
support 'out of the box' for
WYSIWYG is not there in Eclipse.
However there seems
to be stuff available from the
Eclipse site in this regard.
"Web developers can use the Web perspective to
build and edit Web resources, such as servlets,
JSPs, HTML pages, style sheets and images as
well as the deployment descriptor web.xml."
The RAD 7 support for Web elements is extensive
and >
There
is a web perspective in both RAD 7 and Eclipse.
However it appears that the
support 'out of the box' for
WYSIWYG is not there in Eclipse.
However there seems
to be stuff available from the
Eclipse site in this regard.
"Web developers can use the Web perspective to
build and edit Web resources, such as servlets,
JSPs, HTML pages, style sheets and images as
well as the deployment descriptor web.xml."
The RAD 7 support for Web elements is extensive
and so we will not torture ourselves with RAD 7's
capability in these respects.
If you need this support, consider investigating RAD 7
or checking the Eclipse site for an add-on.
Assignment
Use the Welcome Tutorial to build 'HelloWorld'. Keep
this program active as you gather the following screen
shots.
Screen shot each of the following perspectives main pages
from either Eclipse, WebSphere Studio or RAD 7. Title each
screen shot and include a single sentence that summarizes
what service each perspective provides.
Perspectives
- CVS Repository Exploring perspective
- Debug perspective
- Java perspective
- Java Browsing perspective
- Java Type Hierarchy perspective
- Resource perspective