Search code examples
eclipseeclipse-rcptycho

Eclipse "Installed Software" feature hierarchy in a product built by Tycho


I am building a feature-based product with Tycho. The build passes and the product works fine. Now I want to update a feature via my p2 update-site, but this is not working.

What I noticed is that when I click on Help -> About -> Installation Details, I see the product name as root element and all my features as children. So I'm not able to uninstall any feature and/or update them. Only the root element can be uninstalled. And I obviously don't want to do this because this is the whole product.

When I bring up the installation details dialog in my Eclipse IDE, I see all installed features as root elements. So I can uninstall or update individual features (e.g. EMF, Subversive, EGit).

So why is this different in the product built by Tycho? Why are my features not also top level elements in the installation?


I have tried to activate the checkbox This feature requires exclusive installation for my feature that I want to update, but this didn't helped.


Solution

  • Actually, not all features in your Eclipse IDE are installed on root level. There will also be a product element (e.g. "Eclipse SDK") and that product contains features which can not be updated or uninstalled independent of the product.

    Still, you are having a valid point: How can feature be installed as root elements with Tycho so that they can be uninstalled or updated independently of the product?

    This is possible since Tycho 0.20.0: You can specify in the product file if you want a feature to be installed as child element of the product, or if the feature shall be installed as root element. For the latter, you need to add an attribute installMode="root".

    Example snippet from a *.product file:

    <features>
       <feature id="product-child-element-feature"/>
       <feature id="root-element-feature" installMode="root"/>
    </features>