430 likes | 717 Views
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.
E N D
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)
Eclipse 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.
Eclipse plug-in architecture YOUR plug-in C++plug-in HelpSystem Workbench GUI builderplug-in Workspace TeamComponents Modelingplug-in
Finding 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.
Finding 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.
Installing 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.
Installing 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.
Installing 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.
Installing 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.
Dependencies • 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).
Installing 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.
Installing 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.
Installing 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.
Installing 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…
Updating 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.
Installing 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.
Installing 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.
Updating 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 itself • Any plug-ins that Eclipse finds on your hard drive or on the Internet • Updates to any plug-ins you've already installed
The current configuration • You can use the HelpSoftware UpdatesManage Configuration menu item to view the current configuration to see what's currently installed.
Updating Eclipse • To get started, choose HelpSoftware UpdatesFind and Install.
Updating 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.
Popular 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.
The Web Tools Project • The Eclipse Web Tools Project (WTP) adds many powerful features to the Eclipse platform: • Web site design and development • JSP and JSF support • Database support • Web 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
C/C++ • The mission of the C Development Tools (CDT) 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.
PHP • As with Perl, you have multiple choices here. The most popular plug-in is PHP Eclipse: • phpeclipse.sourceforge.net • The environment has tools that let you control Apache, Tomcat and the PHP engine.
Perl • There are several Perl plug-ins on the Internet. • The best I've seen is EPIC, from the Eclipse Perl Integration project. • http://e-p-i-c.sf.net/updates is the Eclipse update site.
Databases • There are relational database tools in the Web Tools Project. • The Data Tools Project has more advanced database tools.
JST • The Eclipse J2EE Standard Tools Project is building a vendor-neutral J2EE toolset. • For all the details, see eclipse.org/webtools/ jst/main.xml.
AJAX 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
UML tools • At the Eclipse.org site you can find UML2, 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.
Aspect-oriented programming • There are two projects at Eclipse for aspect-oriented programming: • AspectJ is an aspect-oriented extension to Java (eclipse.org/aspectj) • AJDT is a set of aspect-oriented development tools for AspectJ (eclipse.org/ajdt)
Web services validation tools • If you're working with Web services, take a look at WSVT, 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.
The Eclipse Visual Editor project • You can get an open source graphical editor through the Eclipse Visual 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.
Things 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/emf • GEF – eclipse.org/gef • Many plug-ins require one or both of these frameworks.
Demo: 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.
Summary • 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.