Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317838 - Feature based launch starts all fragments of a bundle although some of them are not included in the features
Summary: Feature based launch starts all fragments of a bundle although some of them a...
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 10:54 EDT by Andreas Buehler CLA
Modified: 2010-06-24 11:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Buehler CLA 2010-06-24 10:54:21 EDT
Build Identifier: I20100608-0911

We have a plugin which provides core functionality which needs to be initialized depending on the distribution (client vs. server). 
The initialisation code for this bundle is located in two seperate fragments for this bundle.
We have two features, one for client with the "core" bundle + the client fragment, and a server feature with the "core" bundle and the server fragment.

If I use the plugin selection based launch approach everything works fine.
However, if I use the feature based one and select either the client or the server feature both fragments are contained in the launch. 

Note: The fragments have no platform or language configuration.

In my opinion this breaks the new feature based launch functionality since it doesnt work together with fragments.

Reproducible: Always
Comment 1 Curtis Windatt CLA 2010-06-24 11:19:24 EDT
You are using fragments in an unusual way.  Typically fragments are used to extend/overwrite functionality for specific platforms, compatibility etc.  Since you have two different applications, it sounds like you should have three bundles: core, server, client.

Feature launching won't work in this case because it launches all required plug-ins and fragments.  All fragments are included if their base plug-in is included.  This allows the launch to work on multiple platforms (OSGi will only start the fragments if their platform filter matches).

I don't think there is a realistic way for feature launch to handle this case.  The launching of all required plug-ins and fragments is a key part of the feature.
Comment 2 Andreas Buehler CLA 2010-06-24 11:35:48 EDT
Thank you very much for the explanation. I will try to convert the fragments to plugins again - I believe we had some class loading issues during the startup of those which was the reason why I used fragments. However, those might have been solved meanwhile by a different startup logic from us.

I agree that the main usage of fragments is the platform and language specific code. However, maybe someone will come across this issue again together with junit fragments which are used to be able to test package protected methods.
Thankfully, we dont test those and therefore use only plugins for tests.
Comment 3 Curtis Windatt CLA 2010-06-24 11:45:42 EDT
I'm going to close this as WONTFIX.  To support this scenario would require a major reworking of the feature launch so that fragments could somehow be separated.  Adding all requirements automatically is one of the selling points of the feature launch.

There is also the workaround of using the plug-in base launch for more granular control over what is being launched.