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.
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.
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).
Created attachment 11155 [details] patch for form editor to use property tabs in Component Inspector
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.
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.
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)
closed