Stephan Herrmann wrote:
Hi,
I was wondering, how the matching of feature versions happens.
Consider these features:
3.5RC3
org.eclipse.jdt_3.5.0.v20090527-2000-7r88FEeFJePyvYe69JGnUag1
3.5RC4
org.eclipse.jdt_3.5.0.v20090527-2000-7r88FEeFJePyvYeA27DiZdc1
The long string at the end is to ensure that these one feature is "greater" than the other, so that you would be able to install an upgrade (they're generated by a mix of things, one of which is a contained plugin incremented its version).
The problem is Feature Patches are designed to target a specific feature, and PDE tools/build propagates the exact feature ID into the p2 metadata. In my case, I had to hack the content.xml directly to replace the range for the feature I was patching:
<xsl:template match="@range[
../@name='org.eclipse.rcp.feature.group']">
<xsl:attribute name="range">[3.5.0,4.0.0)</xsl:attribute>
</xsl:template>
<!-- Whenever you match any node or any attribute -->
<xsl:template match="node()|@*">
<!-- Copy the current node -->
<xsl:copy>
<!-- Including any attributes it has and any child nodes -->
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
If there's another way to do it, I'm all ears.
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm