Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 170020

Summary: PDE Editor doesn't handle schemas with two elements using the same name
Product: [Eclipse Project] PDE Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Curtis Windatt CLA 2007-01-09 16:45:16 EST
Build ID:  I20061214-0010

I was working with the org.eclipse.ui.popupMenus extension point.  The schema imports several other schemas including commonExpression and expressionLanguage.  Both of these imported schemas define an element called "enablement" (each has different attributes).

The PDE editor only recognizes the "enablement" element from the schema that is imported first.

This results in the editor behaving oddly in a few cases:
1.  When editing the popupMenus.exsd schema, I was able to add both types of "enablement" elements (they both show up in the reference context menu).  However, once the editor is saved, closed and reopened, all the "enablement" elements have become the same type (the type defined in the schema imported first).

2. When adding an extension to the popupMenu extension point in the PDE editor, you can only add "enablement" elements of one type (once again the type defined int he schema imported first).

3. When adding an extension by editing the xml, it is possible to add an "enablement" element of either type.  The xml editor adds a warning (ex. "Element 'test' is not legal as a child of element 'enablement').  However, the plugin will launch successfully with the enablement expression working as expected.

I looked but couldn't find a duplicate of this bug.  I can attach a test case if necessary, but the popupMenus extension point provides an excellent example.
Comment 1 Wassim Melhem CLA 2007-01-11 05:34:29 EST

*** This bug has been marked as a duplicate of bug 77043 ***