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 35168 - PropertySet tab order should be natural order, not alphabetic
Summary: PropertySet tab order should be natural order, not alphabetic
Status: VERIFIED 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:
Depends on:
Blocks:
 
Reported: 2003-07-28 14:16 UTC by _ tboudreau
Modified: 2008-12-22 16:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch for form editor to use property tabs in Component Inspector (18.90 KB, application/octet-stream)
2003-07-28 14:45 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2003-07-28 14:16:52 UTC
In issue 34158, Dusan suggests that the order
should be
different for the tabs in the property sheet for
components.
The order is determined by iterating the
PropertySet objects
returned by getPropertySets() - changing the order
in which
they are added to Sheet will change the order of tabs.
Comment 1 Tomas Pavek 2003-07-28 14:44:31 UTC
The property sets are returned in the following order:
Properties, Other Properties, Events, Layout, Code Generation,
Accessibility

but order of shown tabs is Properties, Code, Events.

Please try the attached patch to demonstrate (I cannot integrate it
due to issue 35167).
Comment 2 Tomas Pavek 2003-07-28 14:45:29 UTC
Created attachment 11155 [details]
patch for form editor to use property tabs in Component Inspector
Comment 3 Tomas Pavek 2003-07-29 11:21:04 UTC
Looks like PropertySheet puts the tabs in a TreeMap with special
comparator (PropUtils.getTabListComparator) that puts "Properties" tab
always first and sorts the other tabs alpabetically. So the tabs are
not handled in the order returned from Node.getPropertySets(). Maybe
there should be no map used, PropertySheet.SheetTabbedPane could work
just with two lists - tab names and corresponding property sets.
Comment 4 _ tboudreau 2003-07-29 12:28:32 UTC
Ugh, I'm a bonehead - did I sort them alphabetically?

Easier to just change the comparator, I think, to just 
put Properties first if present.  I'll do that.

In the meantime, the tabs should be working properly now,
so the patch can be committed - as long as they're added
in the correct order, I can take care of making them appear
in that order later.
Comment 5 _ tboudreau 2003-09-16 09:55:52 UTC
Fixed in trunk.

Checking in PropUtils.java;
/cvs/openide/src/org/openide/explorer/propertysheet/PropUtils.java,v 
<--  PropU
tils.java
new revision: 1.11; previous revision: 1.10
done
Checking in PropertySetModelImpl.java;
/cvs/openide/src/org/openide/explorer/propertysheet/PropertySetModelImpl.java,v
 <--  PropertySetModelImpl.java
new revision: 1.4; previous revision: 1.3
done
Checking in PropertySheet.java;
/cvs/openide/src/org/openide/explorer/propertysheet/PropertySheet.java,v
 <--  P
ropertySheet.java
new revision: 1.126; previous revision: 1.125
done
Checking in SheetCellEditor.java;
/cvs/openide/src/org/openide/explorer/propertysheet/SheetCellEditor.java,v
 <--
 SheetCellEditor.java
new revision: 1.6; previous revision: 1.5
done
RCS file:
/cvs/openide/src/org/openide/explorer/propertysheet/SheetTabbedPane.ja
va,v
done
Checking in SheetTabbedPane.java;
/cvs/openide/src/org/openide/explorer/propertysheet/SheetTabbedPane.java,v
 <--
 SheetTabbedPane.java
initial revision: 1.1
done
Processing log script arguments...
Mailing the commit message to cvs@openide.netbeans.org (from
tboudreau@netbeans.
org)
Comment 6 Marian Mirilovic 2005-07-13 13:23:00 UTC
closed