Bug 15500

Summary: name collision error importing org.eclipse.ui+org.eclipse.ui.win32 plug-ins at same time
Product: [Eclipse Project] PDE Reporter: Jim des Rivieres <jeem>
Component: UIAssignee: Dejan Glozic <dejan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: All   
Whiteboard:

Description Jim des Rivieres CLA 2002-05-08 01:52:00 EDT
Internal test build (20020507)

The org.eclipse.ui plug-in has sprouted a new fragment org.eclipse.ui.win32.

0. Fresh workspace
1. Import org.eclipse.ui and org.eclipse.ui.win32

Observe: 

(1) Problem Occurred "Plug-in Import"
(2) Details "Problem while importing "org.eclipse.ui". Name collision.

Expectation:
- there should not be any error here
- error message should be more meaningful than "Plug-in Import"

2. Delete both plug-ins and content
3. Import org.eclipse.ui
4. Import org.eclipse.ui.win32

Observe: No problems doing them one at at time.

5. Delete both plug-ins and content
6. Import org.eclipse.ui.win32
7. Import org.eclipse.ui

Observe: No problems with this order either.

One interesting property about org.eclipse.ui.win32 is that it must be compiled
*after* org.eclipse.ui. (Although I don't see how that would matter.)
Comment 1 Dejan Glozic CLA 2002-05-08 09:14:55 EDT
Can you verify that this is not the same problem as with SWT? Check that the 
same library is not listed twice (once in UI plugin.xml and again in win32 
fragment.xml).
Comment 2 Jim des Rivieres CLA 2002-05-08 09:32:07 EDT
There are no signs of this.

fragment.xml
==================
<?xml version="1.0" encoding="UTF-8"?>
<fragment
   id="org.eclipse.ui.win32"
   name="%fragmentName"
   version="1.9.0"
   plugin-id="org.eclipse.ui"
   plugin-version="1.9.0">
   
  <runtime>
    <library name="workbenchwin32.jar">
      <export name="*"/>
    </library>
  </runtime>

</fragment>
==================

plugin.xml begins
==================
<?xml version="1.0" encoding="UTF-8"?>
<plugin
   id="org.eclipse.ui"
   name="%Plugin.name"
   version="1.9.0"
   provider-name="Object Technology International, Inc."
   class="org.eclipse.ui.internal.WorkbenchPlugin">

   <runtime>
      <library name="workbench.jar">
         <export name="*"/>
      </library>
   </runtime>
   <requires>
      <import plugin="org.apache.xerces"/>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.update.core"/>
      <import plugin="org.eclipse.help"/>
      <import plugin="org.eclipse.swt" export="true"/>
   </requires>
...
==================
Comment 3 Dejan Glozic CLA 2002-05-08 19:46:09 EDT
Found it. Added checks to avoid duplicate entries while computing the classpath.