Download presentation
Presentation is loading. Please wait.
Published byPatricia Fleming Modified over 9 years ago
1
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 4
2
Workbench customization Workbench – very versatile: -provides a common paradigm for -creation -management -navigation of workspace resources, -ensures seamless tool integration, -allows controlled openess. Customizations for: -development task – through perspectives, extended by plug-in contributions. -developer preferences – through preferences, extended at each new release. Kinds of customizations: -Organize task-specific views, using multiple perspectives, -Create new perspectives, -Chose views and editors, -Set individual preferences, -Set team preferences.
3
Customization through perspectives Perspective: -related to a set of functionalities specific to a type of task, -works with specific types of resources, -UI - collection of views and action sets organized in a layout. Suits an assigned task for a typical user. Used: -as it is -cloned and modified Available perspectives: -default perspectives, with initial configurations ( set and layout of views in the workbench window ) -contributed by new plug-ins -contributed by third-party products built on Eclipse platform
4
Customization through perspectives Perspective (continued) Default perspectives in standard Eclipse SDK: Resource The default perspective when opening Eclipse; useful for browsing all workspace resources(projects and their contents). Java Primary views and menu/toolbar commands used during Java development. Java Browsing Very useful for exploring large projects; contains views for projects, packages, types, and members. Java Type Hierarchy Includes a subset of the Java perspective used to explore class inheritance. Debug Views used while debugging Java programs. CVS Repository Exploring Used while opening and exploring CVS repositories, especially when discovering shared projects to be imported into workspace. Team Synchronizing Used while synchronizing file modifications with a CVS (or other) version control repository. Plug-in Development Specialized views used while developing new plug-in contributions for Eclipse.
5
Customization through perspectives Perspective (continued) Customizable components: -views -editors -actions (commands) Components can be added or removed, being selected from the complete set provided by the plug-ins installed in the workbench. Capability - defines a related set of perspectives, views, and command sets whose functionality is related to a particular development task. Window>Preferences>General>Capabilities
6
Customization through perspectives Views -display information about the content of the workbench -support editors -provide alternative presentations -provide ways to navigate the information in the workspace -may appear: -by itself -stacked with other views in a tabbed notebook can be manipulated (ex. minimized) as a group). -grouped in named categories ( ex. General, Java, Debug, PDE, etc ). Complete list at Window>Show View>Other… -have (optional) own menu and tool bar (workbench has the main menu and toolbar).
7
Customization through perspectives Views (continued) The most common views in General category: Navigator Displays a general-purpose view of projects, folders, and files in the current workspace; useful in any perspective. Properties (customized by plug-ins) Displays and edit name/value properties for any resource or object. Its content changes to reflect what is selected in other views or editors. Outline (customized by plug-ins) Displays a structural view of resource contents. For example, it can display an outline of methods in a Java class file or an outline of tasks in an Ant build file. Problems Displays a list of problems found in a resource; for example, compilation errors and warnings in a Java file. Tasks Displays a list of tasks to be performed, along with a reference to the resource and line number for each task. Useful as reminders of work remaining in your programs or documentation. Bookmarks Displays bookmarks for quick reference and navigation to specific lines in a file. Search Displays results of searching the workspace.
8
Customization through perspectives Views (continued) Generally, a view’s display is coordinated with selections in other views or editors in the workbench window. Properties and Outline views: -have only one instance, which is shared by different resources ( ex, Java files, XML files, UML models ) -are adapting to the current selection of the resource to be described. Problems, Tasks, Bookmarks views = marker views: Display a list of markers, each linked to a line in the correspondent file. Activate marker the file is opened in an appropriate editor and the cursor is positioned at the correspondent line. Marker -object associated with a workbench resource -shown: -in marker view, -on marker bar in the editor area.
9
Customization through perspectives Views (continued) Java task tags -Included in code comments. -Build project parser automatically identifies task tags. Tasks view -displays tagged comments, -ordered by priority, -may be filtered by tag. Default tags: -FIXME -TODO -XXX Tags types can be added, defined by: -tag name -priority
10
Customization through perspectives Views (continued) View layout Operations with views: -Add -Remove -Reposition -Filter – to cope with information overload; option on the menu bar of the view -Detach – in a separate window, in front of the workbench -Move and dock – ( drag&drop) -Create fast view – the view is docked on one side of the workbench window as part of fast view bar; when activated it overlays other views; option in the context menu of the view. -Restore from fast view – at the initial location; option in the context menu of the view.
11
Customization through perspectives Resource editors -Generic text editor. -Java file editor – source code. -Java class file editor – open (but not modify) compiled byte code files to display their attributes and method signatures. -Other editors provided by plug-ins. Operations: -File associations = assign default editor to file type. -Split editor area edit more files simultaneously.
12
Customization through preferences Window>Preferences Preferences dialog page -Shared dialog box. -Over 60 pages of preferences organized in a hierarchy of categories. -Preferences added with each new release. -Own category of preference settings contributed by each plug-in. Preferences scopes: -Configuration -Saved in the installation folder -Shared by all workspace instances -Workspace instance -Shared by all projects in a specific workspace -Default preference scope -Project -Limited to a certain project Sharing preferences: ( in file configuration\.settings\org.eclipse.ui.ide.prefs ) -Import option in a new workbench with a different workspace -E-mail the file -Check the file into a version control repository Export option
13
Customization through preferences Keyboard accelerators Predefined editor bindings – selected with Active Scheme in General>Keys -Default -Emacs Configurable key binding strategy Extendable by plug-ins User can control key bindings to be used Plug-ins can define key bindings that emulate other tools Plug-ins can define contexts for key bindings
14
Customization through preferences Keyboard accelerators (continued) Basic strategy: (1) Command declaration of: -semantic action -associated category (2) Key accelerator Key combination 10..n (3) Key binding Action Defined by plug-in for an: -editor -action set -view implements 1 1..n Context = set of actions available to the user at a specific point time Scheme = group of key bindings activable via Window>Preferences dialog
15
Customization through preferences Individiual preferences Related primarily to individual: -biases -experiences -quirks Team preferences Impact on: -coordinated team work -shared code; directly affect the style, structure, and compilance of written code should be agreed upon and shared by all members of a project team
16
Customization through preferences Typical model: Individiual preferences: keyboard accelerators workbench editor appearance, colors, and font perspective layout and view selection view filters linked resources locations
17
Customization through preferences Typical model: Team preferences: Code style and format Code templates Comment templates Task tags Java JRE version Compiler options Team file content type
18
Rapid development Improves development productivity. Provides features to: -navigate complex Java projects, -understand complex Java projects, -automate repetitive and tedious tasks.
19
Rapid development Fundamental capabilities: Java editor Outline view Synchronized navigation and editing Content Assist - accelerates development by inserting type and variable names or completing methods while you type. Configure source code files to obtain: -detailed Javadoc information in hovers, -Content Assist lists. Source code templates: -insert and guide through common coding patterns ( such as for loops, switch statements, or try/catch blocks ). -can be customized -new templates can be created to suit needs and style.
20
Rapid development Fundamental capabilities (continued) : Quick Fix - suggestions and automatic correction of common compilation errors (such as failure to catch a thrown exception). Right click on the light bulb on the ruler of the editor => Quick fix option. Getter and setter methods generator, for selected fields in class. Also allows to implement -additional constraints checking, -change notification behavior, on accessing class fields. Right click in the editor => Source>Generate Getters and Setters. Defined templates must be exported (shared) when working in a team. Method templates customization ( e.g., to add logging or change notification in all setter methods ).
21
Rapid development Fundamental capabilities (continued) : Hierarchy view - allows to rapidly explore and navigate type hierarchies in Java code ( as determined by classes extending classes, interfaces extending interfaces, and classes implementing interfaces ). Type hierarchies in OO code are determined by: -class extends class -interface extends interface -class implements interface Modes of displaying class hierarchies: -Type hierarchy – subclasses, superclasses, and implementations of the focus type. -Subtype hierarchy – subclasses and implementations of the focus type. -Supertype hierarchy – types extended by and implemented by the focus type. Open Type Hierarchy (F4) from the context menu. Navigate>Open Type Hierarchy from the workbench menu. Ctrl+T in Java editor => Quick Type Hierarchy.
22
Rapid development Editor&Outline Editor view: -basic text editing features -capabilities unique to resource type Java editor : resource type = Java source code Outline view: -adapts its content to the resource type in the current editor. Outline view with Java editor: -displays lists of: -imports -fields -methods -inner classes -toolbar – sort&filter members displayed. -F3 opens a new editor for the selected type containing the definition of the selected item. Recommendation: Explore unfamiliar Java class libraries using the F3 and Ctrl+F3 shortcuts to open a new editor for referenced types and methods.
23
Rapid development Java editor (continued) Hover – pop-up window that appear when the mouse hovers over any Java type, field, or method. Content: -detailed description (if source code is available) -signature (if source code not available) Java>Editor>Hovers in Preferences Main options: -Disable hovers (in familiar contexts hovers are disturbing) -Allow hovers to be displayed on demand -Combined hover – content based on the current context of the selected element, chosen in the following order: -over a variable while debugging => current value -over an element with a compiler problem => problem description -otherwise: formatted Javadoc text for the element under the mouse Ex. -hover over the Java file => Javadoc descriptions -Ctrl+hover over type name + => source code of the class -Combined hover available on demand by pressing F2 (even all hovers are disabled).
24
Rapid development Java editor (continued) Ruler -bar on a side of the editor -contains marker icons Hover over ruler markers => details Ex. of marked entities: -Errors -Warnings -Problems -Bookmarks -Breakpoints (created and added for debugging) -Recorded notes in the Task view
25
Rapid development Content Assist General capability for prompting with a list of possible ways to complete the current code expression. -related to the current cursor position, -using the previous or enclosing word as a key for the appropriate content. Facilities: -Complete type, variable, or method names. -Guess new variable or parameter names from their types. -Insert code templates representing common code patterns. Def. Template = structured description of coding patterns. Defined in Window>Preferences>Java>Editor>Templates. -Insert HTML or Javadoc tags in Javadoc documents. Javadoc tag begins with @ => automatic assistance for completing the tag. Ex. @author, @version, @param parameter_name, etc. -Fill field values in dialog boxes and wizards.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.