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

Bug 308633

Summary: Feature based launch ignores version numbers
Product: [Eclipse Project] PDE Reporter: Ankur Sharma <ankur_sharma>
Component: UIAssignee: Ankur Sharma <ankur_sharma>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, ekke, ralf
Version: 3.6Flags: curtis.windatt.public: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 284887    
Attachments:
Description Flags
Patch none

Description Ankur Sharma CLA 2010-04-09 08:28:20 EDT
features are now all found from target platform

but creating a launch config feature based doesn't work very well

example:
the tp evolved for some features and plugins from
0.5.13 thru 0.5.15 and 0.5.16

if I define the launch config, the newest version (0.5.16) of these features
was displayed,
but the launched eclipse application has plug-ins from the oldest one (0.5.13)
even if I define dependencies to 0.5.16 minimum - always the oldest are
choosen,
so at the moment I cannot use the powerful new feature-based launch configs.
Comment 1 Curtis Windatt CLA 2010-04-28 10:47:43 EDT
There isn't the time left in M7 to fix this, moving to RC1
Comment 2 Ankur Sharma CLA 2010-04-30 14:09:30 EDT
This is how the logic will work

1. if the feature is not tied to specific plug-in version, then pick the highest one
2. If the feature mentions specific version and plugin resolution is workspace, then pick one from workspace whichever version it is
3. if workspace doesn't has it or plugin resolution is external, then check the target. If an exact match is found, pick that, if not pick the highest.
Comment 3 Ankur Sharma CLA 2010-04-30 14:15:32 EDT
Created attachment 166657 [details]
Patch

The logic was always there but it was broken. It was failing if the first plug-in was the exact match.
Comment 4 ekkehard gentz CLA 2010-04-30 14:18:04 EDT
(In reply to comment #2)
> This is how the logic will work
> 
> 1. if the feature is not tied to specific plug-in version, then pick the
> highest one
> 2. If the feature mentions specific version and plugin resolution is workspace,
> then pick one from workspace whichever version it is
> 3. if workspace doesn't has it or plugin resolution is external, then check the
> target. If an exact match is found, pick that, if not pick the highest.

this sounds really good :)
I'll test if available in I-Build
Comment 5 Curtis Windatt CLA 2010-05-03 14:37:08 EDT
+1 Committed to HEAD.  I'm also committing a javadoc comment to explain usage of the getBestCandidateModel() method.  The patch fixes the logic error.  

The method should be refactored as it has duplicate logic and other problems that make it harder to follow.  However, it is RC1 and not worth the risk.

Ekke, if you could try out the change in your use case it would be appreciated.
Comment 6 ekkehard gentz CLA 2010-05-03 17:35:08 EDT
(In reply to comment #5)
> +1 Committed to HEAD.  I'm also committing a javadoc comment to explain usage
> of the getBestCandidateModel() method.  The patch fixes the logic error.  
> 
> The method should be refactored as it has duplicate logic and other problems
> that make it harder to follow.  However, it is RC1 and not worth the risk.
> 
> Ekke, if you could try out the change in your use case it would be appreciated.

thanks - I'll test it with one of the next I-Builds
I', at the JAX 2010 conference until thursday - so perhaps won't find time before friday back home

ekke
Comment 7 ekkehard gentz CLA 2010-05-10 04:34:47 EDT
(In reply to comment #5)
...
> 
> Ekke, if you could try out the change in your use case it would be appreciated.

did some tests at the weekend. but couldn't make it run.
target platform with active ide + some update sites
then wanted to launch, but couldn't launch because
org.eclipse.sdk.ide couldn't be found, I got the error:

Application "org.eclipse.ui.ide.workbench" could not be found in the registry

and Validating the launch config fails
was reported per ex: missing constraint - required bundle org.eclipse.emf.common,
but the feature org.eclipse.emf.common was selected

all tried using I-Build from 20100506

will setup a new installation and do some more tests to figure it out what happens
but at first have to do some work for customer - hopefully this evening I can test more