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 3584 - Form Editor should try to enforce more order in the XML elements in .form.
Summary: Form Editor should try to enforce more order in the XML elements in .form.
Status: RESOLVED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-08-25 18:56 UTC by Jesse Glick
Modified: 2009-12-21 04:35 UTC (History)
1 user (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 Jesse Glick 1999-08-25 18:56:53 UTC
Sometimes if one thing is changed on a form--or perhaps even if the form is just opened and then closed again--some of the XML elements will be rearranged gratuitously. This causes e.g. VC systems t
o show a diff, although the content has not really changed.

Suggest using a stable ordering for the items in an XML file so that this will not happen. E.g. sort by property name, and so on.

The same reordering occurs in the Java source, too.
Comment 1 Marek Grummich 2000-07-25 09:21:59 UTC
Priority is changed to P4 (normal).
Comment 2 Marian Mirilovic 2001-01-25 12:12:59 UTC
verified in [nb31](34) [boston](1160)
Comment 3 Jesse Glick 2003-02-24 19:14:38 UTC
Was this in fact fixed? How? What is the sort order?

See the patch in issue #31372 - e.g.
apisupport/lite/src/org/netbeans/modules/apisupport/lite/LoaderPanel.form
has a totally useless diff. Not sure what version of NB last touched
this .form nor what version of NB Maxym is using, but this bug is
marked fixed as of NB 3.1 and I am guessing that the form is not
*that* old. The new order is not alphabetical or anything obvious.
Comment 4 Tomas Pavek 2003-02-26 18:43:31 UTC
I don't know if/how this was fixed, this bug is too old.

I think now the properties in the .form file are stored in the order
they come from BeanInfo (but I'm not sure now if they are set in the
same order when loaded, as they go through DOM, but probably yes).
They are also generated in the java file the same way. It's not so
easy to chanege the order, as the properties are not always
order-independent (should be according to JavaBean spec, but even in
Swing there are several cases where the order matters).

I'll investigate this more. See also issue 22146.
Comment 5 Jesse Glick 2003-02-26 20:06:37 UTC
I was going to suggest use of Utilities.topologicalSort, but in fact
it does not guarantee (a) a stable sort (unrelated elements keep their
original ordering whenever possible), or (b) consistency between call
to call, since the input dependencies are unordered maps. I am not
even sure that the notion of a "stable topological sort" is
well-defined (certainly "stable total sort" is well-defined). So it is
not quite trivial if there are inter-property dependencies.
Comment 6 Quality Engineering 2009-12-21 04:31:27 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team
Comment 7 Quality Engineering 2009-12-21 04:35:43 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team