This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build RC1 - create Java Application - in Schema view create 2 elements 'a' and 'b' - switch to Design view - in context menu for element 'a' select Add -> Element - type 'b' as name and press Enter - switch to source view source code is wrong <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.netbeans.org/schema/newXMLSchema" xmlns:tns="http://xml.netbeans.org/schema/newXMLSchema" elementFormDefault="qualified"> <xsd:element name="a"> <xsd:complexType> <xsd:sequence> <xsd:element ref="tns:NewElement01"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="b"/> <xsd:element name="b"/> </xsd:schema>
For element and attribute references, when it's renamed, we should check if the new name is same as global element or attribute. If so, we should change their referents. AttributeImpl.java: new revision: 1.1.2.11; AttributeRef.java: new revision: 1.1.2.13; ElementImpl.java: new revision: 1.1.2.28; ElementRef.java: new revision: 1.1.2.19; AXIDocument.java: new revision: 1.1.2.12; AXIComponent.java: new revision: 1.1.2.45; It turns out, in the above scenario, the AXIComponent behind the node in ABE is an Element and not an ElementRef. -->to Ayub
BTW I do not think this is a regression. Util.java: new revision: 1.1.2.51;
Fixed in trunk. Files affected: =============== /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/Attic/SchemaGeneratorUtil.java,v new revision: 1.1.2.2; previous revision: 1.1.2.1
verified in 060905