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

Editors
- permit the creation and modification of resources.

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.

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 RAD's 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


RAD allows the following actions on perspectives:
// 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
RAD 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

To Restore
Minimize

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 RAD Perspectives


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'.

IBM Rational Application Developer V7.0 Perspectives

Crystal Reports Perspective 
//  IBM Rational database report editor

"Crystal Reports is a business intelligence application
used to design and generate reports from a wide range
of data sources. . . .  Crystal Reports became the defacto
report writer when Microsoft released it with Visual Basic."

                                                           -quote from wikipedia

An optional add-on, Crystal Reports provide tools to work
with a database and produce simple or complex reports.
The reports may be published to the web or incorporated
into an application.

The main editor uses a Layout page which allows report
elements to be placed on a report template from a Palette
view. A Preview page is used to show what a report will
look like.


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:


// The context menu allows specifying new repository locations.
// the contents of the editor are read-only.

The Data Perspective // In Rational, not in Eclipse

This would be one of the key value added options
that RAD 7 has over standard Eclipse. The Data
perspective allows access to a set of relational
database tools. These can be used to create and
manipulate the database definitions for a project.


Data Perspective Key Views

// more details in Chapter 9, Developing Database Applications


Debug Perspective  // basic to Eclipse

Debug is a standard part of Eclipse. The default Debug
perspective has five view panes.

Debug View Panes


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 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
Common Base  Events.


CBE Site


http://www.eclipse.org/tptp/home/documents/tutorials/gla/getting_started_gla.html


Java Perspective // native to eclipse


The Java 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
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 are in the Java
perspective and and have been discussed earlier

// 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 to
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

Java Browsing Perspective Buttons


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


// 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



Profiling and Logging Perspective // Rational only

The Profiling and Logging perspective is an IBM
Rational value added plug-in. This perspective
provides views for working with logs and for profiling
applications. This sophisticated feature supplies
tools for analyzing logs. It also provides profiling
functions to obtain performance and statistical
information.


Profiling & Logging Perspective Views

Addition editors viewing profiling results such as "the
Memory Statistics view" and the "Object References view".
More details about these views are found in in Chapter 25,
“Profile applications” on page 1155.  

// we won't get there in this course!


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
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 synchronizes the
resources in the workspace with resources held on an
SCM repository system. This perspective is used with
CVS and ClearCase plus any other source code repository
which might run as a plug-in. 

Team Synchronizing Perspective Views
"For any resource with is under source control, the user
can select Team → Synchronize,which prompts the user
to move to the Team Synchronizing perspective and
show the Synchronize view. "

"It displays the list of synchronization items that result
from the analysis of the differences between the local
and repository versions of your projects. Double-clicking
an item will open the comparison view to help you in
completing the synchronization."

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.

// XML, MyLin
// "Mylyn extends Eclipse with rich facilities for keeping
// track of the tasks that you work and collaborate on."


Key Test Perspective Views


// The Tasks, Properties, and Outline views are present and have
already been covered

// More info. in Chapter 21



Web Perspective

This feature appears to belong to IBM / Rational. It
works in a fashion very similar to other visual web
page builders. There may be an open-source plug-in
for Eclipse that does this sort of editing.

"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."

Web Perspective Views and Editors 

Page designer works with HTML files JSP and
embedded JavaScript.  The editor is synchronized
with the Outline and Properties views, so that the
selected HTML or JSP element always appears.
Three tabs in Page Designers allow working different
ways.

Main Page Designer Tabs

Contains catalogs of reusable Web page resources
such as images, wallpaper, Web art, sound files and
style sheet files.

"Allows you manage data from a variety of sources,
such as session EJBs, JavaBeans, and Web services
which can be configured and dropped onto a JSP."

// sophisticated feature

Provides guided editing for cascading style sheets and
individual style definitions for HTML elements.

// nice feature

Shows image thumbnails useful when used with the
Gallery view to add images from the artwork libraries.

Used with the Gallery view, thumbnail also displays
folder contents which can be dragged and dropped
into the Project Explorer view or to the Design or
Source page of Page Designer.

"Allows you to edit small bits of code, including adding and
editing actions assigned to tags. This view is synchronized
with what element is selected in the Page Designer. You
can drag and drop items from the Snippets view into the
Quick Edit view."

"Contains expandable drawers of drag and drop objects.
Allows you to drag objects, such as tables or form buttons,
onto the Design or Source page of the Page Designer."

The link icon at the bottom left corner of the Web perspective
shows linked resources. The view provides a way to navigate
through referenced parts of a Web application.

// The Project Explorer, Outline, Properties, Servers, Console,
// Problems, and Snippets views are also present and have been
discussed earlier

// We will see Chapter 12 where this is perspective is used



The Progress View //  RAD feature not in Eclipse

"The Progress View is not part of any one perspective
by default, but is a very useful tool when using Rational
Application Developer. When Rational Application
Developer is carrying out a task that takes a substantial
amount of time a prompt may appear with two options
available."

Progress View Options
The second options runs slower, but affords the developer
the opportunity to continue working. In background mode
the view can be clicked to check the progress status.



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