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.
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.
Should be solved together with issue 21069
Jiri, please take care of this. Should be easy, Yarda will help and explain if needed.
Target milestone was changed from '3.4' to TBD.
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.
Created attachment 7312 [details] a experimental patch
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.
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?).
Introspector uses HashMap and as such the order is completely random. Issue 21069 is created to address this problem.
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.
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
Tim - I just added the note to the upgrade guide, which you apparently forgot to do (see comment of 2002-08-26).