From Section 19.2.6.3 of our book
and our "Supporting
Multiple Eclipse Versions Simultaneously" presentation at
EclipseCon 2004:
[We use] a Java preprocesssor to handle the differences between versions of Eclipse. This way, we have a single code base that is compiled against each different version of Eclipse, verifying that the calls to Eclipse methods match the public APIs available in that version. A build process takes one code base and produces one binary for each version of Eclipse that our product supports. In contrast to the facade pattern approach, related functionality and methods tend to stay logically clumped together in the same package rather than being spread out across the product, which leads to a more maintainable product.
We have been using our preprocessor and getclasspath Ant tasks to build our CodePro and SWT Designer products and these tasks have been part of our CodePro product for years. We have pulled these Ant tasks out of CodePro and made them available here.
![]() |
--- Work in progress --- |
The getclasspath Ant task is now available, but the preprocessor Ant task is still being cleaned up.
These Ant tasks are available to you "as-is" free of charge under Eclipse CPL and thus I work on it in my free time. I have not had time to fully clean up the preprocessor Ant task yet, but please send me email and I'd be happy to send you the work in progress as it exists.
If you need to use the preprocessor Ant task before I get a chance to extract and clean them up, download CodePro Studio and use them as they exist now.