What's New in Eclipse 3.1

Since Eclipse's first release in 2001, it has become a
popular environment for Java development. In the period between March
10 and May 11, 2005, users downloaded over 17,000 copies of one of the
production SDK releases and over 3,500 copies of one of the stable
(milestone) SDK builds on average every day. A vibrant eco-system of
developers, plug-in providers, authors, and bloggers has grown up
around it. Eclipse has also gained the backing of the key Java vendors
including BEA, Borland, IBM, SAP, and Sybase. Developers like Eclipse
because it provides a great platform for building Java applications,
and companies like it because it unifies their software tools under one
open source umbrella.


In late June of this year, the latest release of the Eclipse Platform,
version 3.1, will be available for download from eclipse.org. In this
article, I'll highlight some of the more interesting new features it
contains. I'll also discuss some of the other Eclipse projects that are
re-leasing new versions at about the same time.

A New Hope for Developers
One of the major new
features of Eclipse 3.1 is full support for the new language
constructions in J2SE 5.0 (also called J2SE 1.5 in the old numbering
scheme). Generics, annotations, enums, auto boxing, enhanced for loop,
etc., - it's all in there, both in the underlying compiler and the user
interface and code assistance that Eclipse is known for.

While Eclipse didn't invent the idea of refactoring, it
provides one of the most complete implementations. Eclipse 3.1 comes
with a number of new and enhanced refactorings, code assistance, and
"quick fixes", many in conjunction with its J2SE5 support. For example,
you can put your cursor on a conventional for loop that iterates over an array (see Figure 1), press Ctrl+1, and Eclipse will offer to convert it to one of the new style for loops (see Figure 2).

At the heart of Eclipse's Java support is a fully compliant
incremental Java compiler, written in Java and supporting Java language
levels 1.3, 1.4, and now 5.0. Having its own compiler brings Eclipse
some benefits including fast compilation, smoother debugging and
refactoring, and a lot of diagnostic warnings. The compiler has found
several uses outside of Eclipse. It's bundled with many popular Linux
distributions and commercial applications, and recent versions of
Apache Tomcat use it to compile JSPs. It forms the basis of the AspectJ
compiler. And I wouldn't be surprised to see the Eclipse compiler used
in the recently announced Apache Harmony project as well.

Other usability enhancements make 3.1 more productive. For
example, the new release contains a more integrated help system that
changes to show help for what you're doing at all times. One of the
largest improvements is in the area of Preferences. Addressing a key
user request, the Preference dialog now offers the ability to filter by
keywords, for example, you can easily find all options having to do
with "tabs" by typing that keyword into the filter box. In addition,
Web-like navigation has been added to link to related preferences and
go forward and backward in the history.

To make preferences easier to find, in Eclipse 3.1 the
Preferences dialog can be opened directly from many editors and views
through the context menu. For example, if you right-click in the Java
editor and select Preferences..., the dialog will appear. Only the
options related to Java editing, including those for the text editor
that the Java editor inherits, are shown.

Eclipse 3.1 improves its Ant support by including the latest version of Ant, and an Ant script debugger (see Figure 3),
plus many editor enhancements. Another welcome addition: the ability to
import a project from an Ant build file, and to export and generate a
build file from an existing Eclipse project - you can synchronize your
CLASSPATH and build.xml with a few clicks. The generated build.xml is
simple and clean, with a provision for a build-user.xml that you can
override and still keep the benefits of build.xml generation. This is
another example of the community in action: the import/export feature
is based on the contribution of Richard Höfter, author of the
eclipse2ant plugin.

One thing to note is that all these new features don't come
with a performance penalty. Eclipse 3.1 is a lot faster and uses far
less memory for common operations than version 3.0. Don't believe me?
Check out the performance tests results on the download page for any
recent build. These improvements are not just for Windows; Mac and
Linux users will notice even it even more due to the special attention
paid to those platforms. The graphs don't tell the whole story,
however. In normal day-to-day work I've found Eclipse 3.1 to be much
snappier than any previous version.

With developers working with ever larger and more complex
projects, their IDE needs to keep up. In order to experience and study
problems with large workspaces, the Platform team created one
consisting of 135 separate projects and 70,000 classes and other
resources. Then, using various profiling tools they identified and
corrected many bottlenecks, mainly in the area of memory usage and I/O.
As a result, Eclipse 3.1 can handle bigger problems in less time than
before. Launching the test workspace used to take close to two minutes,
but in Eclipse 3.1 it now takes under 10 seconds.

Return of the Java Client
Java started out on the
desktop, and now after a brief vacation on the server side, it's
returning to the desktop with a vengeance. The Rich Client Platform
(RCP) is helping to spark this renaissance. RCP is a subset of Eclipse
that provides a framework for application development. It includes a
widget toolkit (SWT), the plug-in loaders, the help system, and other
components that you can use in your own programs.

By taking advantage of this free "client middleware," you can
focus on your core competencies and reduce your time-to-market.
Eclipse's corporate-friendly license (EPL) allows you to reuse the code
in your own programs, whether or not they are open source. You can
modify and redistribute the code, as long as you return any
improvements to the community.

The biggest change for RCP in Eclipse 3.1 is a set of wizards
and editors for creating, building, branding, and deploying RCP
applications. To create an RCP application just create a plug-in
project, click the checkbox that says "Create an RCP application",
select a template, and then click Finish. With a few more clicks you
can export the project to create a deployable application. No more
trying to figure out plug-in dependencies, tweaking configuration
files, and copying plug-ins by hand. All that's handled for you in the
new release.

Branded applications are supported through the new Product
Configuration editor. You can change the window titles, icons, splash
screens, and other branded elements of your program quickly and easily.
And with the RCP Delta Pack you can create deployable packages for all
supported platforms at the same time (see Figure 4).

RCP applications can take advantage of dynamic plug-ins, that
is, plug-ins that come and go at runtime. This provides flexibility to
the RCP application delivery model. A large application can be deployed
progressively as plug-ins are loaded or on demand when extra
functionality is needed. This technology was originally designed for
mobile phone provisioning as part of the OSGi Service Platform, and
later implemented in Eclipse by the Equinox project team. Eclipse is an
active participant in OSGi, and Eclipse 3.1 includes several features
slated for version 4 of the OSGi standard.

In one proof-of-concept example shown at EclipseCon, the
developers demonstrated a calculator program that started out with only
a plus and minus button. Using Eclipse's update manager and dynamic
plug-ins, the calculator then downloaded a new plug-in that added a
multiply button. All this is done in the running JVM process without a
restart.

One of the most frequently asked questions about RCP-based
applications is if you can deploy them with Java Web Start. The answer
in Eclipse 3.1 is yes. New feature export wizards make this easy;
they'll even sign the JARs for you and create a template .jnlp file. In
support of Java Web Start, most Eclipse plug-ins have been converted to
regular old Java .jar files. Information about extension points,
plug-in dependencies, and so on go in manifest files inside the JARs.

In Eclipse 3.1, client developers can take advantage of a slew
of UI improvements to make their applications even more functional and
better looking than before. For example, SWT includes two new widgets:
a Spinner widget for numeric data entry and a Link widget that allows
hyperlinks to be included in text labels. A number of other widgets
were enhanced.

The Tree widget now supports columns, deprecating the older
TableTree widget. This allows a native implementation and helps resolve
some of the more subtle problems with the TableTree, including the
inability to add an image in the first column. Also the Table widget
got a much requested feature: the ability to drag and drop columns to
reorder them within the table. Virtual tables with deferred loading are
also supported.

The Browser widget continues to get attention as well. This
widget wraps the native HTML browser on the current platform (for
example, IE on Windows and Safari on the Mac). There have been numerous
minor enhancements to the browser including many to its event
mechanism. Perhaps the most exciting feature is the ability to execute
an arbitrary string of JavaScript within the browser's currently loaded
page.

Another area that was improved is SWT graphics. Eclipse 3.1
supports alpha-blending, anti-aliasing, paths for geometric shapes and
lines, and transformations (see Figure 5).
On Windows, using these GC new features takes advantage of the
Microsoft GDI+ library (which is included with Windows XP and 2003 but
available as a separate download on older systems). On GTK and Motif,
the new graphics are implemented with the Cairo graphics library.

The Community Strikes Back
Community involvement
is crucial to the success of Eclipse. One of the things you're expected
to do as a good Eclipse community citizen is report your ideas for
enhancements along with any bugs you find. Since the source code is
available, some take the next step and send code patches as well. Over
7,000 enhancement requests and bug reports have been addressed in
release 3.1.

The Eclipse community continues to grow through the addition
of new projects. As of this writing, over a dozen new project proposals
are pending or have been recently approved. Many of these are
"Technology" projects, which are often created by groups of users that
band together to fulfill a need. For example, the Mylar project was
created at the University of British Columbia to address the problem
with information overload by filtering out uninteresting classes and
other artifacts while you're programming.

Following on the heels of the 3.1 release of the Eclipse
Platform, a number of other Eclipse projects is expected to be
released. One of the biggest, the Web Tools Platform project, or WTP
for short, is scheduled to release a new version in late July. WTP was
initially based on contributions from IBM and ObjectWeb, but many
companies and individuals in the community are working on it now,
including recent joiner BEA.

The Web Tools Platform currently has two subprojects: Web
Standard Tools (WST) and J2EE Standard Tools (JST). WST provides a
common infrastructure for Web applications development and provides
editors, validators, and document generators for a wide range of Web
languages (HTML/XHMTL, CSS, JavaScript, Web services, SQL, XML, XSD,
WSDL, etc.). You can also publish and deploy, run and debug, start and
stop Web applications on target servers (see Figure 6).
WST also includes a TCP/IP Monitor server for debugging HTTP traffic
(including SOAP Web services), and a Web services explorer that is very
handy for testing. Currently it also has support for relational
databases management and queries, though that may be moving to the new
Data Tools project soon.

JST extends WST for J2EE applications and servers. Included is
a range of tools simplifying development with J2EE APIs including JSP,
JCA, JDBC, JTA, JMS, JMX, JNDI, and Web services. It builds on WST to
support J2EE servlet engines and EJB containers, including Apache
Tomcat, Apache Geronimo, and ObjectWeb Jonas. Server vendors are
encouraged to develop adapters for their servers.

Another widely anticipated project is the Business
Intelligence and Reporting Tools (BIRT) project. BIRT 1.1 is targeted
for July, and it will be based on Eclipse 3.1. Currently BIRT includes
three components:

  • A Report Designer for developing and designing XML report templates
  • A Report Engine for generating reports based on the XML template (you can use it standalone or embedded in other applications)
  • A Chart Engine for creating charts within BIRT reports or as a standalone API to draw charts in your Swing or SWT applications.

Future plans for BIRT include a Web-based Report Designer.

The Eclipse Test and Performance Tools Platform Project (TPTP),
formerly known as Hyades, will launch the 4.0 release in July as well.
TPTP delivers components in four areas:

  • A platform for building testing tools, with common UI components and standard data models
  • Monitoring tools for things like analyzing a Web server
  • Test tools, including support for JUnit
  • Tracing and profiling tools

TPTP 4.0 delivers better integration with JUnit, new hooks
to make it easier to link test cases back with requirements and
defects, and usability improvements.

Visual Editor Project (VE) The Visual Editor Project will be
releasing version 1.1 approximately two weeks after Eclipse 3.1.
Highlights include:

  • Support for new SWT controls
  • Better support for Swing tables
  • Copy/paste support
  • Support for editing Eclipse views directly (especially useful for RCP programs)
  • Better code generation and reverse parsing (produces code more like what you would write by hand)

The AspectJ Technology Project will release AspectJ 5.0 soon after
Eclipse 3.1 is shipped. The new version includes full support for J2SE5
features, integration of AspectWerkz-style code, better deployment
(especially for container-based environments), faster performance, and
more comprehensive IDE support. For example, generics are integrated
with AOP language features such as join points, pointcuts, advice, and
inter-type declarations. Annotations bring AOP to pure Java source
files, so you can continue to use your favorite Java compiler and then
weave in the aspects in another build step or when classes are loaded.
Deployment in J2EE containers is easier and compiling and weaving runs
faster and generates better code than before. The class-loading and
runtime aspect weaving that made AspectWerkz so convenient should also
be supported.

For a gentle introduction to AOP, you may want to check out
the Concern Manipulation Environment project (CME) project. It offers
powerful code navigation to help you identify cross-cutting aspects in
your existing Java code.

Finale
In four short years since Eclipse exploded
onto the scene, it has come to dominate the Java IDE landscape. User
groups have sprouted up around the world, and hundreds of books and
articles have been written about it (two dozen in Japanese alone!).
Eclipse 3.1 is the culmination of a year's worth of development effort
on features such as J2SE5 support, performance improvements, and rich
clients. If that weren't enough, it will be the base of the next wave
of software releases from the Eclipse Foundation and its partners.
Whether you're a programmer trying to build the next Killer App or an
entrepreneur building a business model on open source, this is an
exciting time to be involved with Eclipse.

Acknowledgments
I wish to thank the many readers
of www.eclipsepowered.org who contributed to this article, including
Chris Gross, Philippe Ombrédanne, Ng Chin Kiong, Sam Mesh, Bob Foster,
David Orme, mgallego, lmandel, and nobodaddy. And a special thanks to
Xavier Méhaut, who maintains the Eclipse wiki site, http://eclipse-wiki.info, where we worked on the draft.

mars - Fri, 2005-06-17 14:39