The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft...

31
The Eclipse IDE Gareth Davies

Transcript of The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft...

Page 1: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

The Eclipse IDE

Gareth Davies

Page 2: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using

successive versions of Visual Studio Serious (on-the-job) Java development

since 4Q2001 No commercial Java IDE experience

Page 3: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Agenda Overview

What it is, who did it and when Features

How it helps us build Java systems Resources

Where to go for more information

Page 4: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

So, what is Eclipse? A “universal platform for integrating

development tools” with an “open, extensible architecture based on plug-ins”

A Plug-in implements functionality for one or more “extension points” defined by the platform or another plug-in

Platform runtime discovers installed plug-ins on startup (using manifests), builds and caches a global plug-in registry

Plug-ins are grouped and installed as “features”

Page 5: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

The Big Picture

Platform Runtime

Workspace

Help

Team

Workbench

JFace

SWT

Eclipse Project

JavaDevelopment

Tools(JDT)

Their Tool

Your Tool

AnotherTool

Plug-inDevelopmen

tEnvironment

(PDE)

Eclipse Platform

Debug

Page 6: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

A Brief History Developed by IDE Groups at IBM and OTI

(i.e. those responsible for Visual Age) Eclipse 1.0 released – October 2001 Effort transitioned into an open source

project and source base donated – November 2001

Eclipse 2.0 released – June 2002

Page 7: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

The Eclipse Board

* September 2002

Page 8: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Features (1) Wizards Incremental Project Builder Tasks and Quick Fix Ant Integration JUnit Integration Version and Configuration Management

Integration Refactoring Code Templates

Page 9: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Features (2) Code Assist and Tooltips Debug Perspective Source Menu Options Local History Import/Export (including JAR Creation) Search and Replace Install/Update Type Hierarchy Perspective Customization

Page 10: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Wizards New Projects New Resources (Classes, Interfaces etc.) Import and Export Override Methods Generate Getter and Setter Externalize Strings Refactoring

Page 11: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Incremental Project Builder JDT Java builder is passed resource delta – all

changes since previous build – and then rebuilds the entire project based on this delta

Customizable through Workbench preferences (including JRE selection, level of detail for error messages etc.)

Only applies to Workbench-controlled resources – must refresh any externally-edited resources and explicitly rebuild the project

Page 12: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Tasks and Quick Fix Task view includes compiler messages and

user-defined tasks May be filtered and sorted Quick Fix feature is available from both

Task list and margin of Java editor Provides choices to resolve problems

Page 13: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Ant Integration Run as an “External Tool” inside or outside

workspace UI allows you to select order of targets and

specify command-line arguments Clunky editor for build.properties file Some problems with recognizing modern

compiler when running inside workspace – recommend specifying compiler (e.g. Jikes) in build.properties file

Page 14: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

JUnit Integration Integrated with the Java perspective as a

plug-in Wizards available for TestCase and

TestSuite classes Run or Debug JUnit tests and see results in

a JUnit view

Page 15: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Version and Configuration Management (VCM) Integration Default VCM provider is CVS

Others are available via plug-ins (e.g. ClearCase, PVCS, SourceSafe etc.)

Providers provide repository-specific actions via the Team menu, specialized views and resource decorators

Page 16: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Refactoring Eight refactorings currently supported:

Rename (field, method, class, package) Move (field, method, class) Pull Up Modify Parameters Extract Method Extract Local Variable Inline Local Variable Self Encapsulate Field

Can preview (and exclude) each resulting change

Page 17: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Code Templates Context-sensitive code snippets for

common tasks (activated with <Ctrl>-<Spacebar>)

Can customize existing templates and define new ones (including overloading templates – e.g. for)

Import and Export templates to enhance team productivity

Page 18: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Code Assist and Tooltips Code-completion (activated with <Ctrl>-

<Spacebar>) with variable name suggestion, argument hints

Works with Java code and Javadoc comments

Hovering over identifier shows Javadoc

Page 19: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Debug Perspective Launch Configurations allow you to specify JRE,

runtime arguments (class and JVM) Breakpoints/watches: supported and configurable Variables view shows object values in current stack

frame Code inspection (Expressions, Display) Library source step through available (with source

attachment) Console provides stdout, stdin and stderr Hot swap available (if supported by target JVM)

Page 20: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Source Menu Options Add/Remove Comments Organize/Add Import Override Methods Generate Getter and Setter Add Javadoc comment Add try/catch block Externalize Strings

Page 21: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Import/Export (including JAR Creation) Files can be selectively imported from various

sources: Directory on file system Specific Zip file

Files can also be selectively exported to various targets: Directory on file system Jar file Zip file

Javadocs may be created via File>Export

Page 22: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Local History Eclipse retains a history of deltas to each

Workbench-managed resource (duration and volume are configurable)

Current resource may be compared to (and optionally replaced by) any version in the Local History

May be judiciously used in conjunction with VCM

Page 23: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Search and Replace Can search entire workspace or definable subsets

(“working sets”) File search is a text-based search and applies to

files of any type (and is necessary for global search and replace operations)

Java search applies to .java files only but allows more control (e.g. can search for specific Java elements by declaration or reference)

Results can be filtered, sorted and selectively deleted

Page 24: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Install/Update Search Internet (and possibly your

computer) for updates to Eclipse and any installed plug-ins

Selectively apply updates Configuration history is maintained

May restore previous configuration

Page 25: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Type Hierarchy Alternative view to the Package Explorer Useful to visualize the inheritance

hierarchy

Page 26: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Perspective Customization Perspectives are customizable

arrangements of views and editors Can save multiple configurations of the

Java perspective, each suited to different projects (e.g. web application using Struts and Tomcat may require several plug-ins not needed by simple applications)

Page 27: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

SWT/JFace SWT = Standard Widget Toolkit OS-independent GUI toolkit that uses

native widgets where available and emulates otherwise – native look and feel

SWT vs Swing debate rages JFace = “set of UI frameworks for common

UI tasks” in conjunction with SWT – also “window-system independent”

Page 28: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Some Products based on Eclipse IBM WebSphere® Studio Family

Application Developer v4.0.3, v5.0 Application Developer Integration Edition for

Windows v4.1 Site Developer Advanced for Windows v4.0.3 Device Developer v4.0

Rational® XDE™ Professional v2002: Java™ Platform Edition

Page 29: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Some Eclipse Subprojects AspectJ Development Tools (AJDT) C/C++ Development Tools (CDT) Cobol IDE Eclipse Modeling Framework (EMF) Graphical Editor Framework (GEF) Stellation XSD Infoset Model

Page 30: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Some Useful Plug-ins Easy Struts – wizards for Struts development Lomboz –wizards for J2EE development Omondo – UML class diagram with round-trip

engineering Quantum DB – explore and query databases Solar Eclipse – HTML/JSP/XML editing Sysdeo Tomcat Launcher – project wizard and

runs Tomcat X-Men – XML editing

Page 31: The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.

Resources Help: Workbench User Guide, JDT User

Guide Homepage: www.eclipse.org Slide Presentation:

www.eclipse.org/eclipse/presentation/eclipse-slides.html

Plugin Index: eclipse-plugins.2y.net Wiki Wiki Web: eclipsewiki.swiki.net