Bug 193599 - [Plugin][Wizard][Import]Same plug-in listed multiple times in import dialog
Summary: [Plugin][Wizard][Import]Same plug-in listed multiple times in import dialog
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2007-06-20 15:21 EDT by Sonia Dimitrov CLA
Modified: 2009-08-12 11:57 EDT (History)
2 users (show)

See Also:


Attachments
extension location with links (110.70 KB, application/octet-stream)
2007-06-20 15:22 EDT, Sonia Dimitrov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sonia Dimitrov CLA 2007-06-20 15:21:16 EDT
If I have a plug-in with the same version installed in both eclipse and an extension location, it is listed twice in the import dialog.

Is is reasonable to request that plug-ins with the same version only be listed once instead?

To reproduce:

1.  Extract attachment (to follow) in the root of eclipse
2.  Replace the plug-ins it contains with the same from your eclipse installation
3.  Start eclipse with -clean or by deleting the folders in the configuration directory.
4.  Execute "File -> Import -> Plug-ins and Fragments" and accept defaults until you are presented with the Plug-ins and Fragments Selection dialog
5.  Notice that org.eclipse.core.filesystem and org.eclipse.core.jobs is listed twice.
Comment 1 Sonia Dimitrov CLA 2007-06-20 15:22:32 EDT
Created attachment 71949 [details]
extension location with links
Comment 2 Brian Bauman CLA 2007-06-20 16:24:30 EDT
What build are you using
Comment 3 Sonia Dimitrov CLA 2007-06-20 16:34:39 EDT
I20070525-1350 (believe this is RC2).
Comment 4 Brian Bauman CLA 2007-06-20 17:53:14 EDT
We had a similar problem with duplicate plug-ins in the target plug-ins view (bug 184960).  But it appears it should have been fixed in the I20070525-0010 build and after.  

I will look into this one when I get a chance.  I don't think this should be too hard to fix.
Comment 5 Brian Bauman CLA 2007-06-22 15:25:35 EDT
This is definitely different than 184960.  In 184960, we referenced the same plug-in in the same location twice.  In this bug, we have identical plug-ins in two locations.

The fix is to not add a BundleDescription to the resolver state if the state already contains a bundle with the same BSN and version.

Modified org.eclipse.pde.internal.core.MinimalState.addBundle(Dictionary, File, long).
Comment 6 Wassim Melhem CLA 2007-06-23 19:07:01 EDT
Brian, I am not sure I like this resolution.

Two bundles at different locations are different bundles.  PDE supports multiple bundles by the same symbolic name, regardless of version number. 

In the case of the import wizard, the wizard should not be too smart.  It should show both.  After all, the code inside can be different.   Perhaps the label could show the location to distinguish.

If the user does not want to see linked plug-ins, they can point to a single location on the first page of the import wizard, instead of choosing the default (which grabs links).
Comment 7 Wassim Melhem CLA 2007-06-23 19:13:12 EDT
reversed Brian's patch since it broke a basic self-hosting scenario:

1. Create a new plug-in project (com.example.abc 1.0.0)
2. Create a new plug-in project.  Name the project com.example.def, but the bundle ID/version should be set to com.example.abc and 1.0.0.

Note how the second project does not resolve and does not compile.
Comment 8 Curtis Windatt CLA 2008-04-23 15:11:47 EDT
Deferred.  Still marked as bug day for anyone who wants to take a crack at it.
Comment 9 Curtis Windatt CLA 2009-08-12 11:57:16 EDT
The import wizard should not do special processing to remove duplicates.  If you import from a target platform that has multiple identical bundles, we should allow the user to import any of them.  Closing as WONTFIX.