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 21065 - The default property sort mode should be Unordered
Summary: The default property sort mode should be Unordered
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: API, UI
Depends on: 21069 29071
Blocks: 21064
  Show dependency tree
 
Reported: 2002-03-01 12:10 UTC by Jaroslav Tulach
Modified: 2008-12-22 16:50 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
a experimental patch (5.26 KB, patch)
2002-09-04 15:30 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-03-01 12:10:38 UTC
As discussed in
http://www.netbeans.org/servlets/SearchList?listName=nbui&searchText="Default+PropertySheet+sort+mode"&defaultField=subject
the default sort mode of revolving property sheet and the one opened from popup
menu (NodeOperation.showProperties ()) has to be the Unordered one.

Please change it.
Comment 1 Jaroslav Tulach 2002-03-01 12:27:55 UTC
Should be solved together with issue 21069
Comment 2 David Simonek 2002-03-01 12:40:46 UTC
Jiri, please take care of this. Should be easy, Yarda will help and
explain if needed.
Comment 3 Marek Grummich 2002-07-22 08:47:11 UTC
Target milestone was changed from '3.4' to TBD.
Comment 4 Marek Grummich 2002-07-22 09:20:52 UTC
Target milestone was changed from '3.4' to TBD.
Comment 5 Jesse Glick 2002-08-26 21:25:35 UTC
When implementing this, do not forget that

openide/api/doc/org/openide/doc-files/upgrade.html

must mention the change and suggest to module owners to evaluate the
order in which they insert properties and to reorder them for
usability if necessary.
Comment 6 Jiri Rechtacek 2002-09-04 15:30:38 UTC
Created attachment 7312 [details]
a experimental patch
Comment 7 Jiri Rechtacek 2002-09-04 15:32:10 UTC
I attach a patch, default sorting mode is set to UNSORTED. I add a
possibility to add attribute PROPERTY_SORTING_MODE (e.g.
"sortingMode") into node's descriptor. The attribute determines sort
mode of property sheet built on a node. This possibility enables set
own for sort mode for the nodes, for example for BeanNode. Additional
possibility how to sort the properties will be solved by issue 21069.
Comment 8 Jesse Glick 2002-09-04 16:08:52 UTC
I don't see any reason why the property sheet code needs to support
the PROPERTY_SORTING_MODE attr on the node. Nodes can already define
what order properties are listed in a Sheet.Set: just put() them in
the desired order. So why would you need the property sheet to sort
your properties for you? If you want them alphabetical, sort them
alphabetically before adding them.

BeanNode, similarly, should probably be adding properties in the same
order as PropertyDescriptor's are found. This assumes that
Introspector preserves the order from a BeanInfo, even after merging
superclasses etc. If not, I suggest that BeanNode honor a special
(documented) BeanDescriptor attribute, of type
Comparator<PropertyDescriptor> (or should it be Comparator<String> to
be given the code names of the properties instead?).
Comment 9 Jaroslav Tulach 2002-09-04 16:46:01 UTC
Introspector uses HashMap and as such the order is completely random.
Issue 21069 is created to address this problem.
Comment 10 Jaroslav Tulach 2002-09-04 16:47:39 UTC
To the patch. I do not think there is a need for changing the sortmode
from inside the Node. At least not until it is really needed.
Comment 11 _ tboudreau 2003-08-06 11:56:19 UTC
As far as I can tell, this issue is fixed - the default sort mode
in the new property sheet is unordered.  So I am closing
this issue.

Re whether the property sheet or the node should be 
responsible for sorting, see my comments on issue 21069
Comment 12 Jesse Glick 2003-08-07 15:04:34 UTC
Tim - I just added the note to the upgrade guide, which you apparently
forgot to do (see comment of 2002-08-26).