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

Bug 360398

Summary: "Make Anonymouse Type Global" refactoring corrupts <xs:annotation></xs:annotation> block
Product: [Modeling] EMF Reporter: Dany <danymaster>
Component: XSDAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks, frederic.jouault, jean.bezivin, keith.chong.ca, Kenn.Hussey, pelder.eclipse, richard.gronback, sebastien.demathieu, sven.efftinge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dany CLA 2011-10-10 04:23:17 EDT
Build Identifier: 20110218-0911

"Make Anonymouse Type Global" refactoring corrupts <xs:annotation></xs:annotation> block. Any items between <xs:annotation> and </xs:annotation> disappeared.

Reproducible: Always

Steps to Reproduce:
1. open xsd file with "XML Scheme Editor"
2. click on any anonymouse <xs:complexType> with <xs:annotation> elements inside
3. select "Make Anonymouse Type Global" from context menu
4. all blocks <xs:annotation>...</xs:annotation> in <xs:complexType> were corrupted. Any items between <xs:annotation> and </xs:annotation> disappeared.
Comment 1 Keith Chong CLA 2011-10-13 14:31:30 EDT
Reproducible.   The refactor command calls XSD's cloneConcreteComponent method, and then sets the name.
Comment 2 Ed Merks CLA 2011-10-13 16:03:40 EDT
I'd suggest providing a patch.  Failing that, a test case (JUnit) that uses only the XSD APIs will be needed for me to reproduce the problem.