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 63348 - [50cat][navigator] Replacing whole document screws up its tree
Summary: [50cat][navigator] Replacing whole document screws up its tree
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 63337 64983 64988 67831 69614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-30 15:58 UTC by Jiri Kovalsky
Modified: 2005-12-21 11:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of invalid XML navigator content. (16.81 KB, image/png)
2005-08-30 15:59 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2005-08-30 15:58:33 UTC
Development build #20050830-1159 of NetBeans 4.2
Windows XP, JDK 1.5.0_05 EA build #02

Description:
============
XML navigator displays weird things when whole content of XML document gets
replaced by something else. Basically it doubles the nodes. See attached picture
to see what I mean.

Steps to reproduce:
===================
1. Create new sample web application project and new XML document underneath.
2. Press CTRL+A to select whole content and invoke "Edit|Copy" from main menu.
3. Press CTRL+V to replace the selection
Comment 1 Jiri Kovalsky 2005-08-30 15:59:27 UTC
Created attachment 24367 [details]
Screenshot of invalid XML navigator content.
Comment 2 Jiri Kovalsky 2005-08-30 16:20:51 UTC
Luckily this has a workaround: use Delete between CTRL+C and CTRL+V keystrokes.
Comment 3 Jiri Kovalsky 2005-09-23 14:10:50 UTC
*** Issue 64988 has been marked as a duplicate of this issue. ***
Comment 4 Jiri Kovalsky 2005-09-23 14:11:58 UTC
This issue was reported by NetCAT 5.0 team member.
Comment 5 Marek Fukala 2005-09-27 15:26:05 UTC
Covered by XMLDocumentModelTest.testRemoveAndAddEntireDocumentContent.

The problem seems to be in a wrong order of document elements in the internally
stored set since the document is not marked as dirty after the delete/add of the
content.
Comment 6 Jiri Kovalsky 2005-10-17 07:41:11 UTC
This usecase is not so rare. Please fix this if possible.
Comment 7 Marek Fukala 2005-10-31 12:32:59 UTC
*** Issue 67831 has been marked as a duplicate of this issue. ***
Comment 8 Marek Fukala 2005-11-04 15:19:18 UTC
*** Issue 63337 has been marked as a duplicate of this issue. ***
Comment 9 Marek Fukala 2005-11-11 14:52:40 UTC
*** Issue 64983 has been marked as a duplicate of this issue. ***
Comment 10 Marek Fukala 2005-11-19 14:58:01 UTC
fixed

Checking in
xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentElement.java;
/cvs/xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentElement.java,v
 <--  DocumentElement.java
new revision: 1.5; previous revision: 1.4
done
Checking in
xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentModel.java;
/cvs/xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentModel.java,v
 <--  DocumentModel.java
new revision: 1.17; previous revision: 1.16
done
Checking in
xml/text-edit/src/org/netbeans/modules/xml/text/structure/XMLDocumentModelProvider.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/structure/XMLDocumentModelProvider.java,v
 <--  XMLDocumentModelProvider.java
new revision: 1.11; previous revision: 1.10
done
Comment 11 Marek Fukala 2005-11-30 14:00:22 UTC
*** Issue 69614 has been marked as a duplicate of this issue. ***
Comment 12 Jiri Kovalsky 2005-12-21 11:50:55 UTC
Verified in development build #200512202030 of NetBeans 5.0.