Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 114642 - Need a way to add plugins to a feature even though they are not resolved
Summary: Need a way to add plugins to a feature even though they are not resolved
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Brian Bauman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-01 15:52 EST by Jeff McAffer CLA
Modified: 2005-11-17 00:08 EST (History)
1 user (show)

See Also:


Attachments
patch to PDE Core (2.07 KB, patch)
2005-11-16 11:58 EST, Brian Bauman CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2005-11-01 15:52:24 EST
Currently you are not able to add plugins to a feature unless they are 
resolved in the target or workspace.  This makes sense but prohibits people 
from crafting features that work on other platforms (or all platforms).  For 
example, how would you edit the RCP feature. It includes all manner of SWT 
fragments.

It might be interesting for people to be able to selectively include plugins 
that are not resolved.  perhaps only those that fail the Platform filter.  
Perhaps some others.

for example, I should not have to have all of RAD just to be able to create a 
feature that includes plugins that depend on RAD.

Perhaps the option is "show unresolved plugins"
Comment 1 Wassim Melhem CLA 2005-11-15 11:00:51 EST
Brian, when we resolve the target platform, we currently only add resolved 
bundles to our state and discard the rest.  

This is somewhat heavy-handed.  If, for example, the user has the RCP delta 
pack installed in the target platform, they would only see the fragments that 
match the current environment which can be mystifying.

Since the state can now tell us exactly wny a bundle is unresolved via 
State#getResolverErrors(...), we can use that information to discard only 
bundles that give PDE a headache (e.g. multiple singleton bundles with the 
same id).  The rest should make it into the PDE state.

So check the type of the resolver error of an unresolved bundle.  If it's not 
of type ResolverError.SINGLETON_SELECTION, the unresolved bundle is added to 
the state.

Comment 2 Brian Bauman CLA 2005-11-16 11:58:33 EST
Created attachment 30076 [details]
patch to PDE Core

Patch should make PDEState aware of non-resolved bundles that are not multiple
singletons.  This should allow users the ability to add unresolved bundles to
their features.
Comment 3 Wassim Melhem CLA 2005-11-17 00:08:23 EST
Thanks Brian.

The patch looks good.

However, you need to break out of the inner loop after setting 'add' to false.

Released the modified patch.