From Section 19.2.9 of our book:
Using the preprocessor approach outlined in the previous sections (see our "Supporting Multiple Eclipse Versions Simultaneously" presentation at EclipseCon 2004) involves source targeted at one version of Eclipse, but generating binaries for other versions of Eclipse. In other words, the code contains some source that is surrounded by preprocessor statements, but uncommented, for the targeted version of Eclipse, while source for the other versions of Eclipse is commented out. At some point, you’ll want to change the targeted version of Eclipse from, say, Eclipse 2.1 to Eclipse 3.0. To accomplish this involves using the preprocessor itself to regenerate your source and the introduction of a new classpath tool.
...
The second step involves updating the projects’ Java build paths by modifying the .classpath file (see the end of Section 19.2.5) to use the appropriate classpath variable. For example, if you are moving from development in Eclipse 2.1 to Eclipse 3.0, then replace all occurrences of ECLIPSE21_HOME with ECLIPSE30_HOME. In addition, you’ll need to update the plug-in’s directory suffix in the .classpath file to match the target version of Eclipse (e.g., plugins/org.eclipse.swt_2.1.1 changes to plugins/org.eclipse.swt_3.0.0).
We created a tool for transforming a java project's classpath from
one version of Eclipse to another.
Right click on the project(s) to modified and select QualityEclipse >
Transform Classpath.
You can install the Reference Project Tool using the QualityEclipse Tools Update Site.
The source is available both as part of the QualityEclipse Tools feature and as a separate download from the QualityEclipse Tools Update Site. The classes involved are:
These tools are available to you
"as-is" free of charge under
Eclipse CPL and thus I work on it in my free time.
Please
send me email
with any comments, suggestions, and bugs you have.