43
Presented by IBM developerWorks ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Making the most of Extending Eclipse with Plug-ins Extending Eclipse with Plug-ins

Extending Eclipse with Plug-ins

  • Upload
    ardara

  • View
    93

  • Download
    2

Embed Size (px)

DESCRIPTION

Extending Eclipse with Plug-ins. What we'll cover. A brief discussion of the Eclipse plug-in architecture Finding, installing and updating plug-ins Some popular plug-ins Demo: Building graphical applications with the Eclipse Visual Editor (VE). The Eclipse plug-in architecture. - PowerPoint PPT Presentation

Citation preview

Page 1: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Extending Eclipse with Plug-insExtending Eclipse with Plug-ins

Page 2: Extending Eclipse with Plug-ins

5-2 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

What we'll coverWhat we'll cover A brief discussion of the Eclipse plug-in architecture Finding, installing and updating plug-ins Some popular plug-ins Demo: Building graphical applications with the Eclipse

Visual Editor (VE)

Page 3: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

The Eclipse plug-in architectureThe Eclipse plug-in architecture

Page 4: Extending Eclipse with Plug-ins

5-4 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Eclipse plug-in architectureEclipse plug-in architecture The Eclipse platform provides some basic functions;

everything else Eclipse does is through plug-ins.The Java development tools are technically a set of plug-ins, even

though they come as part of the basic Eclipse SDK.

Page 5: Extending Eclipse with Plug-ins

5-5 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Eclipse plug-in architectureEclipse plug-in architecture

Workbench HelpSystem

Workspace TeamComponents

C++plug-in

GUI builderplug-in

Modelingplug-in

YOUR plug-inYOUR plug-in

Page 6: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Finding, installing and Finding, installing and updating plug-insupdating plug-ins

Page 7: Extending Eclipse with Plug-ins

5-7 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Finding plug-insFinding plug-ins

There are two great sites for finding Eclipse plug-ins: eclipse-plugins.info eclipseplugincentral.com

Between these two sites, you'll find more than 500 plug-ins. Both sites have categories and search engines to help you find what

you need.

Page 8: Extending Eclipse with Plug-ins

5-8 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Finding plug-insFinding plug-ins Some plug-ins are installed just like Eclipse.

You download the plug-in and unzip it into the same directory as Eclipse.

Others are installed directly from the Internet.These are much easier to manage and to keep up-to-date.

Page 9: Extending Eclipse with Plug-ins

5-9 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing plug-insInstalling plug-ins The most primitive way to add a plug-in is to download

and unzip a file containing a plug-in. It works, but it requires the user to know how Eclipse is installed

and configured.

The next time you start Eclipse, the workbench tries to load the plug-in.You can cancel the installation if something goes wrong.

Page 10: Extending Eclipse with Plug-ins

5-10 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing local plug-insInstalling local plug-ins If you've downloaded and

unzipped a plug-in into a directory, you can define that directory as a local site for plug-ins.

You can tell Eclipse to look for new or updated plug-ins there.

Page 11: Extending Eclipse with Plug-ins

5-11 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins The best way to get a plug-in is to install it directly from

the site that hosts the plug-in. Given a URL, the workbench looks for a file named site.xml. Eclipse uses the site.xml file to determine what plug-ins are on

that site, what the current versions of those plug-ins are and what other plug-ins they require, if any.

Page 12: Extending Eclipse with Plug-ins

5-12 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins You can add a new site

bookmark that points to the plug-in's URL.

Eclipse uses the site to look for new plug-ins.

When you check for updates, Eclipse looks at the site for any new versions of the plug-in.

Some plug-ins automatically define site bookmarks when you install them.

Page 13: Extending Eclipse with Plug-ins

5-13 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

DependenciesDependencies Some plug-ins require other plug-ins.

For example, the Graphical Editing Framework and the Eclipse Modeling Framework are used by lots of plug-ins.

When you try to install a plug-in, Eclipse checks to see if the required plug-ins are already installed. If not, Eclipse will tell you (and possibly check the Internet for them).

Page 14: Extending Eclipse with Plug-ins

5-14 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins

In this case, Eclipse has contacted the Perl tools update site and has found a plug-in. You decide which plug-ins to install; Eclipse doesn't install anything

without your permission.

Page 15: Extending Eclipse with Plug-ins

5-15 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins

You have to accept the plug-in's license agreement before you can install it. Be sure to read the agreement carefully.

Eclipse won't install a plug-in that doesn't have a license agreement.

Page 16: Extending Eclipse with Plug-ins

5-16 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins Most open source plug-ins

aren't signed. Eclipse warns you about this,

but you're free to ignore it and install the plug-in anyway.

Page 17: Extending Eclipse with Plug-ins

5-17 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins

After you've answered all of the questions, Eclipse starts to download and install the plug-in.

All you have to do now is wait…

Page 18: Extending Eclipse with Plug-ins

5-18 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Updating remote plug-insUpdating remote plug-ins After you've defined your

update sites, you can tell Eclipse which ones to visit.

In this case, we're looking for updates to the Perl tools.

Page 19: Extending Eclipse with Plug-ins

5-19 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins

When the plug-in has been downloaded and installed, you might see a message like this.

Restart the workbench if it's at all possible.

Page 20: Extending Eclipse with Plug-ins

5-20 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing remote plug-insInstalling remote plug-ins

When the workbench restarts, the plug-ins you just installed are available. In this example, there is a new wizard to create a Perl project.

Page 21: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Updating EclipseUpdating Eclipse

Page 22: Extending Eclipse with Plug-ins

5-22 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Updating EclipseUpdating Eclipse One of the many cool features of Eclipse is its ability to

update itself with little or no effort on your part. You can ask Eclipse to install:

Updates to itselfAny plug-ins that Eclipse finds on your hard drive or on the InternetUpdates to any plug-ins you've already installed

Page 23: Extending Eclipse with Plug-ins

5-23 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The current configurationThe current configuration

You can use the HelpSoftware UpdatesManage Configuration menu item to view the current configuration to see what's currently installed.

Page 24: Extending Eclipse with Plug-ins

5-24 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Updating EclipseUpdating Eclipse

To get started, choose HelpSoftware UpdatesFind and Install.

Page 25: Extending Eclipse with Plug-ins

5-25 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Updating what's installedUpdating what's installed Eclipse knows what plug-ins are

installed on your machine. If any of those plug-ins came

from the Internet, Eclipse can visit the plug-in's site to see if there are any updates.

You can choose which update sites Eclipse visits. This is particularly useful when

you're looking for a fix for a particular problem.

Page 26: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Some popular plug-insSome popular plug-ins

Page 27: Extending Eclipse with Plug-ins

5-27 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Popular plug-insPopular plug-ins We'll look at several popular plug-ins that add features to

Eclipse.Hopefully you can find plug-ins that add the functions you're

looking for. If not, many plug-ins are open source, so you can often take the

source of someone else's plug-in and customize it to your needs.

Page 28: Extending Eclipse with Plug-ins

5-28 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The Web Tools ProjectThe Web Tools Project The Eclipse Web Tools Project (WTPWTP) adds many

powerful features to the Eclipse platform:Web site design and developmentJSP and JSF supportDatabase supportWeb services creation, testing and monitoring

It consists of three subprojects: Web Standard Tools (WST), J2EE Standard Tools (JST) and Java Server Faces Tools (JSF).

eclipse.org/webtools

Page 29: Extending Eclipse with Plug-ins

5-29 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

C/C++C/C++ The mission of the C Development Tools (CDTCDT) project is

to provide Eclipse support for C and C++ that's comparable for Eclipse support for Java.

You can download the CDT from eclipse.org/cdt.

Page 30: Extending Eclipse with Plug-ins

5-30 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PHPPHP As with Perl, you have multiple choices here. The most

popular plug-in is PHP EclipsePHP Eclipse:phpeclipse.sourceforge.net

The environment has tools that let you control Apache, Tomcat and the PHP engine.

Page 31: Extending Eclipse with Plug-ins

5-31 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Perl Perl There are several Perl plug-ins on the Internet.

The best I've seen is EPICEPIC, from the Eclipse Perl Integration project.

http://e-p-i-c.sf.net/updates is the Eclipse update site.

Page 32: Extending Eclipse with Plug-ins

5-32 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

DatabasesDatabases There are relational database tools in the Web Tools

Project. The Data Tools Project has more advanced database

tools.

Page 33: Extending Eclipse with Plug-ins

5-33 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

JSTJST The Eclipse J2EE Standard Tools Project is building a

vendor-neutral J2EE toolset. For all the details, see eclipse.org/webtools/ jst/main.xml.

Page 34: Extending Eclipse with Plug-ins

5-34 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

AJAX Tools FrameworkAJAX Tools Framework IBM, along with BEA, Oracle, Zimbra, Laszlo and others,

has recently announced plans for the AJAX Tools Framework (ATF).The goal of the project is to build tools that work with the most

popular AJAX frameworks (Dojo, Zimbra, etc.)See eclipse.org/proposals/atf

Page 35: Extending Eclipse with Plug-ins

5-35 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

UML toolsUML tools At the Eclipse.org site you can find UML2UML2, an EMF-based

implementation of UML 2.0.eclipse.org/uml2

There are a number of commercial UML tools for Eclipse, including Rational Software Architect and Rational Software Modeler.

Page 36: Extending Eclipse with Plug-ins

5-36 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Aspect-oriented programmingAspect-oriented programming There are two projects at Eclipse for aspect-oriented

programming:AspectJAspectJ is an aspect-oriented extension to Java

(eclipse.org/aspectj)AJDTAJDT is a set of aspect-oriented development tools for AspectJ

(eclipse.org/ajdt)

Page 37: Extending Eclipse with Plug-ins

5-37 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Web services validation toolsWeb services validation tools If you're working with Web services, take a look at WSVTWSVT,

the Web Services Validation Test plug-in. It includes a TCP/IP monitor and a SOAP message validator,

among other things.eclipse.org/wsvt has downloadable files and information about

the project.

Page 38: Extending Eclipse with Plug-ins

5-41 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The Eclipse Visual Editor projectThe Eclipse Visual Editor project You can get an open source graphical editor through the

Eclipse Visual EditorVisual Editor project, eclipse.org/vep.The Visual Editor is built on the Graphical Editing Framework

(GEF) and the Eclipse Modeling Framework (EMF). You can download a package at the project's home page that

includes the Eclipse SDK and the correct levels of the GEF and EMF.

Page 39: Extending Eclipse with Plug-ins

5-42 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Things we've already mentionedThings we've already mentioned The Eclipse Modeling Framework (EMF) and the

Graphical Editing Framework (GEF) are two Eclipse projects we've mentioned already. EMF – eclipse.org/emfGEF – eclipse.org/gef

Many plug-ins require one or both of these frameworks.

Page 40: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Demo: The Eclipse Visual EditorDemo: The Eclipse Visual Editor

Page 41: Extending Eclipse with Plug-ins

5-44 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Demo: The Eclipse Visual EditorDemo: The Eclipse Visual Editor We'll take a brief look at the Eclipse Visual Editor. This is

an open source, professional-quality GUI build tool. As we mentioned before, the Visual Editor is built on both

GEF and EMF.

Page 42: Extending Eclipse with Plug-ins

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

SummarySummary

Page 43: Extending Eclipse with Plug-ins

5-46 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

SummarySummary We've taken a brief look at the Eclipse plug-in

architecture. We looked at ways to find, install and update plug-ins,

including ways to automate the update process. We also looked at some popular plug-ins Finally, we used the Eclipse Visual Editor to build an

application. That application is a plug-in built on Eclipse and two frameworks that extend the Eclipse platform.