Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314452 - Feature Manifest Editor: compute dependencies cause adding plugin even if imported package marked as optional
Summary: Feature Manifest Editor: compute dependencies cause adding plugin even if imp...
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 2000
: P3 minor with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 08:55 EDT by Alexey Markevich CLA
Modified: 2013-03-19 11:21 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 Alexey Markevich CLA 2010-05-26 08:55:30 EDT
Why optional import package from plugin cause creating required plug-in in feature?
1. Create Plug-in project ('plugin')
2. Create Feature project and make reference to 'plugin'
3. In Plug-in Manifest Editor at Dependencies tab add for example 'org.junit' plug-in dependency and set it as optional.
4. In Feature Manifest Editor at Dependencies tab select 'Compute' button - no 'org.junit' dependency appeared.
5. In Plug-in Manifest Editor at Dependencies tab add 'org.junit' import package and set it as optional.
6. In Feature Manifest Editor at Dependencies tab select 'Compute' button - 'org.junit' dependency appeared.
Comment 1 Curtis Windatt CLA 2013-03-19 11:15:33 EDT
What version of Eclipse are you running on.  The feature editor doesn't use the dependency calculator like the product editor, but it should still skip optional imports.  Looking at the code I see a check to skip optional.

org.eclipse.pde.internal.core.feature.Feature.addPluginImports(List<IFeatureImport>, List<IFeatureImport>, IPluginBase)
Comment 2 Curtis Windatt CLA 2013-03-19 11:21:31 EDT
Was looking at another dependency bug and happened upon this one.  Confirmed that optional dependencies are not added as dependencies when computing (Kepler 4.3).  Closing as WORKSFORME.

Create a plug-in with two required bundles, one optional one not.
Create a feature that includes the plug-in
Go to the dependencies page, with no existing dependencies, hit compute
Result: Only the non-optional requirement will be added.