JavaEnterprise JavaEclipse Tip: How to Live on the Cutting Edge

Eclipse Tip: How to Live on the Cutting Edge

The Eclipse Foundation’s download servers
barely cooled off after the Callisto release,
and the first milestone build of the next Eclipse version (3.3M1) is already available.
As always, the
upcoming 3.3 release
promises exciting new functionality as well as further
improvements to the existing features. With so much on its plate the Eclipse development
team requires approximately one full year to complete the release cycle. Does this mean
that you, a professional Eclipse plug-in developer, have to wait until June of 2007 to
reap all the benefits? No. This tip will show you how to use the latest Eclipse milestone
builds to develop applications based on the latest stable release.

Brave Users Wanted

Eclipse has a reputation for high-quality milestone builds, starting with the very first one.
This does not mean that they are bug-free and/or should be used “in production”.
However, there are at least two good reasons why experienced Eclipse users should download
and install the latest milestone builds.

First, being a community-driven open-source project, Eclipse relies on its user base to
test-drive the product and report any bugs as soon as possible. By doing that, the users
end up the ultimate winners — bugs get patched earlier in the development cycle
and the overall code quality steadily improves. And, the best way to discover bugs (at least
in the features that matter to you) is to use the product on a daily basis as your primary
development tool.

Unfortunately, few developers get to dictate to their employers or clients which version
of Eclipse to use as the foundation of their products. And regardless, changing platform versions
in the midst of a development cycle would often prove too risky or just plain foolish.
Does this mean you have to resign yourself to using the “old” version of Eclipse as your IDE
until you can upgrade the products you work on? Luckily, with a little help from
the Plug-in Development Environment, you don’t have to.

PDE’s Target Platform


Figure 1: PDE Target Platform preference page showing the list of plug-ins found in my Callisto installation (Eclipse SDK 3.2 with some extras). These plug-ins will be used by the PDE
as my target environment, rather than the 3.3M1 plug-ins installed in my host environment.


When creating an Eclipse plug-in project in a new workspace, you may notice that
you can peruse all plug-ins that are installed in your IDE. By default, PDE is set up
to compile and run your code against your host environment configuration (this is also referred
to as self-hosting). The fact that you don’t need anything other than the tool itself
to create your own plug-ins is certainly very cool; however, there are situations when
you need to write code for a run-time environment that does not match your current
development environment. This is where PDE’s Target Platform comes in; instead of using
your host environment as your target platform as well, you can specify another Eclipse
installation location that will be used as the target platform. This must be a fully
self-contained Eclipse installation with features that you may not have installed in
your IDE. It doesn’t have to be the same version, or even platform architecture
(e.g., you can develop applications for the Mac OS/X on your Linux laptop).

Setting Up Your Workspace

If you’re ready to try it, you will need the latest Eclipse SDK milestone (3.3M1 as of this writing)
as well as the latest stable release (3.2). Both are available from the
Eclipse downloads page. Of course, you can try other
version and/or platform configurations, though you might run into some limitations if the version
gap is too large.

  1. Install your Eclipse SDK 3.3M1 (the host) and Eclipse SDK 3.2 (your target) into separate locations.
  2. Launch your Eclipse SDK 3.3M1 with an empty workspace.
  3. In your Preferences, go to Plug-in Development -> Target Platform.
  4. Specify the location of your Eclipse SDK 3.2 installation. This will update
    the Plug-ins tab with your target plug-ins (you may have to press the Reload button
    if you entered the location manually).
  5. Click OK and you’re ready to start developing Eclipse 3.2 applications in your
    cutting-edge Eclipse 3.3M1 IDE!

For more information about this feature, see the
Target Platform Preferences
topic in your Eclipse Help.

About the Author

Peter Nehrer is a software consultant specializing in Eclipse-based enterprise solutions
and J2EE applications. He is the founder of
Ecliptical Software Inc. and a contributor to
several Eclipse-related Open Source projects. He holds an M.S. in Computer Science from
the University of Massachusetts at Amherst, MA. Peter can be reached at
[email protected].

Latest Posts

Related Stories