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.

Bug 80311 - Broken model-source synchronization after cutting and pasting element in Source view
Summary: Broken model-source synchronization after cutting and pasting element in Sour...
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 14:55 UTC by kozlov
Modified: 2006-08-29 12:34 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kozlov 2006-07-14 14:55:16 UTC
Reproduced in build 060713.

To reproduce the bug:

- create a new schema;
- switch to Source view;
- add element '<xsd:element name="new"></xsd:element>' under '<?xml
version="1.0" encoding="UTF-8"?>';
- cut 'new' element and 'paste' it into <xsd:schema ....... /xsd:schema>;
- switch to Schema view.

Elements node is empty.
Comment 1 kozlov 2006-07-17 14:06:17 UTC
Bug was closed mistakenly.
Comment 2 Nam Nguyen 2006-07-17 15:57:16 UTC
kozlov: the change to 'wont fix' is not consitent with your comment.
Comment 3 kozlov 2006-07-17 16:33:57 UTC
-
Comment 4 Nam Nguyen 2006-07-18 20:14:18 UTC
This is very unusual test case, so I wonder justification for P2.  Work-around
is close and reopen the schema.
Sync/autosync produce correct component-added event.  Not sure why UI could not
handle transition from invalid state to valid state with component added event?
Ccing Nathan.
Comment 5 Nam Nguyen 2006-07-28 01:07:59 UTC
Corner case, easy work-around -> P3.
Will fix for FCS.
Comment 6 Nam Nguyen 2006-08-24 01:35:13 UTC
Fixed by make sure old root is preserved when attempt to create new root throw
exception.

/cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/xam/Attic/XDMListener.java,v  <--
 XDMListener.java
new revision: 1.1.2.15; previous revision: 1.1.2.14
/cvs/xml/schema/api/src/org/netbeans/modules/xml/schema/model/impl/SchemaModelImpl.java,v
 <--  SchemaModelImpl.java
new revision: 1.2.2.18; previous revision: 1.2.2.17
/cvs/xml/schema/api/test/unit/src/org/netbeans/modules/xml/schema/model/impl/xdm/SyncTest.java,v
 <--  SyncTest.java
new revision: 1.1.2.28; previous revision: 1.1.2.27
/cvs/xml/schema/api/test/unit/src/org/netbeans/modules/xml/schema/model/resources/Attic/InvalidRoot_corrected.xsd,v
 <--  InvalidRoot_corrected.xsd
new revision: 1.1.2.1; previous revision: 1.1
/cvs/xml/schema/api/test/unit/src/org/netbeans/modules/xml/schema/model/resources/Attic/InvalidRoot.xsd,v
 <--  InvalidRoot.xsd
new revision: 1.1.2.1; previous revision: 1.1
/cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/model/impl/Util.java,v  <--
 Util.java
new revision: 1.2.2.5; previous revision: 1.2.2.4
/cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/model/impl/WSDLModelImpl.java,v
 <--  WSDLModelImpl.java
new revision: 1.2.2.21; previous revision: 1.2.2.20
Comment 7 kozlov 2006-08-29 12:34:52 UTC
Verified in build060829.