Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 106123

Summary: UI feature export crashes when version qualifier contains underscores
Product: [Eclipse Project] PDE Reporter: Philippe Ombredanne <pombredanne>
Component: BuildAssignee: Andrew Niefer <aniefer>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: emissary, francois
Version: 3.1   
Target Milestone: 3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 99393    

Description Philippe Ombredanne CLA 2005-08-04 22:05:25 EDT
The UI feature export cannot work when using _ in the version qualifier.
This is reminiscent fo bug 89428 adn has teh same origins.
The name gets mangled in the same way because there are indirect references in
update to PluginVersionIdentifier.
org.eclipse.update.core.VersionedIdentifier calls PluginVersionIdentifier in its
constructor.
It may be an update code problem, but it's manifestation in PDE UI, so I am
submitting it here first.

A simple test is to use create a feature with a version like 0.1.0.ABC_DEF and
try to export it using the UI export.

Something like this simple test will fail:
VersionedIdentifier vi = new VersionedIdentifier("some.id", "0.1.0.ABC_DEF");
assertEquals("Wrong version", vi.getVersion(), "0.1.0.ABC_DEF");
So does that one:
PluginVersionIdentifier pvi = new PluginVersionIdentifier( "0.1.0.ABC_DEF");
assertEquals("Wrong version", pvi, "0.1.0.ABC_DEF");

Therefore org.eclipse.pde.internal.build.site.BuildTimeSite#findFeature can
never find the feature that is about to be exported, and the export crashes with
a n "Unable to find feature" error.
Comment 1 Pascal Rapicault CLA 2005-11-11 14:37:49 EST
We really need to figure this one out as we are moving forward with the
generation of the qualifier.
Comment 2 Dominik Maehl CLA 2005-12-20 10:34:23 EST
Hi,

yeah, no duplicate for this from myself...I finally get a hold of bugzilla and its search function.

But I just want to comment that the whole _to- thing is causing a clean 3.2M4 install to have warnings in its product configuration.

I will attach a screenshot of that.

The problem seems to come from 
org.eclipse.core.runtime.PluginVersionIdentifier.verifyQualifier where each non  letter or digit is replaced by a dash.

In this case it is only a cosmetic issue (at least I hope so) but IMHO a clean Eclipse install should not have any warnings or am I wrong here? ;)
Comment 3 Dominik Maehl CLA 2005-12-20 10:42:37 EST
Sorry but I have to put an URL for the screenshot because I cannot upload anything :(

If someone would be so kind to upload the image for me if it is of any help?

http://dsnine.com/underscore-bug.png
Comment 4 Pascal Rapicault CLA 2005-12-20 11:40:31 EST

*** This bug has been marked as a duplicate of 121424 ***