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.
Summary: | NullPointerException on the first attribute in Design view | ||
---|---|---|---|
Product: | xml | Reporter: | htt <htt> |
Component: | Schema Tools | Assignee: | Ayub Khan <ayubskhan> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
htt
2006-08-31 22:43:48 UTC
There was a recent change related to automatic DP based code generation in the model. Since then, I can not reproduce this bug. I am marking it as worksforme. Please verify the same and close. With trunk build 060831_2, jdk1.5.0_07... Now that the default Design Pattern is changed to Russian Doll, observe different issue/behavior for a related scenario: Open a new schema (default DP = RD) In Design view, drag/drop element e add (drag/drop) element e1 to e add (drag/drop) attribute a1 to e1 In Projects, right-click newXmlSchema.xsd and select Apply Design Pattern In Apply Design Pattern dialog box, change DP to Venetian Blind. In Design view, expand everything and observe: e e1 > a1=string e1Type > a1=string add (drag/drop) attribute a2 to e1 => Design view blanks out with "Schema is invalid" msg. This seem to me now like a code gen issue. This is the resulting invalid schema after doing the above mentioned actions. <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="e"> <xsd:complexType> <xsd:sequence> <xsd:element name="e1" type="tns:e1Type"> <xsd:complexType> <xsd:attribute name="newAttribute" type="xsd:string"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="e1Type"> <xsd:attribute name="a1" type="xsd:string"/> <xsd:attribute name="newAttribute" type="xsd:string"/> </xsd:complexType> </xsd:schema> Fixed. Files affected: =============== /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/Attic/DefaultSchemaGenerator.java new revision: 1.1.2.40; previous revision: 1.1.2.39 /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/Attic/GardenOfEden.java new revision: 1.1.2.26; previous revision: 1.1.2.25 /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/Attic/VenetianBlind.java new revision: 1.1.2.19; previous revision: 1.1.2.18 Verified in trunk build 060911. |