Decoupling Eclipse RCP Products From Feature Versions
Join the DZone community and get the full member experience.Join For Free
what’s the problem?
by default, product configurations are hard-wired to specific feature versions. and if you decide to upgrade to a new version of the org.eclipse.rcp feature, for example, then your product configuration will break. you won’t be able to create valid run configurations based on your product and your builds will fail as well.
luckily, we now get feedback in the product configuration editor informing us that something is amiss.
so what can we do about this? well one approach is to re-wire your product to the new version of the feature. you can do this by deleting and re-adding the feature, or you can also click the properties button and modify the feature version manually. but this is a brittle approach, as you need to remember to update your configuration every time a feature version changes.
a better way
it’s now possible to decouple products from feature versions by replacing the feature version numbers with 0.0.0. in the future, a blank feature version will also be interpreted as 0.0.0 but as of eclipse 3.5.1 the number must be added.
also, there is a currently a defect in the product configuration editor that results in a feature version entry of 0.0.0 being ignored. of cours
e, this won’t matter once blank versions are
interpreted correctly, but for now it’s a problem. the solution is to
open the product configuration file in a text or xml editor and change
the good news is that you only need to do this once. your product will now accept the feature versions you supply in your target platform without complaint. of course if you want to maintain the wiring between products and feature versions, by all means do that. but it’s nice to know we can decouple these pieces if we wish.
Opinions expressed by DZone contributors are their own.