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 46049 - XML nodes are not properly sorted
Summary: XML nodes are not properly sorted
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2004-07-12 16:13 UTC by Jiri Skrivanek
Modified: 2008-12-23 00:40 UTC (History)
0 users

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 Jiri Skrivanek 2004-07-12 16:13:14 UTC
When you create DTD for an XML document, it is put
behind the document in the tree. But it should
alphabetically sorted. It may cause problem for
automated tests. To reproduce:

- create a java project
- create an XML file from template (let's say A.xml)
- from popup call "Generate DTD" item
- le the same fila name in the select dialog and
confirm it
- newly created A.dtd is placed behind A.xml in
the tree in the projects view. But it should be
first. Order of nodes is changed when you add a
new XML file or sometimes automatically after a
random amount of time.

Build 20040712-1258, JDK1.5.0-b56, WindowsXP.
Comment 1 Petr Pisl 2004-07-13 10:39:05 UTC
I don't think that this is problem of the XML module. The parent node
should take care about sorting of its children. So I reassign this
issue to the core team.


I play with this and if you set Sort Mode for the parent node to "By
Name", then the sorting is right, but if you set "By name (Packages
First), then the sorting is wrong.
Comment 2 _ ttran 2004-07-19 23:21:53 UTC
I have the feeling sorting is based on Node names which in turn don't
include extensions but I may be wrong

Comment 3 Petr Hrebejk 2004-07-20 12:26:17 UTC
Loaders (FolderChidren) are responsible for creating the set of children.
Comment 4 David Konecny 2004-08-18 14:55:09 UTC
Fixed in:
Checking in src/org/openide/loaders/FolderComparator.java
new revision: 1.6; previous revision: 1.5
Comment 5 Jiri Skrivanek 2004-08-24 10:16:43 UTC
Verified in build 20040824-0659.