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.
[ BUILD # : 200809250201 ] [ JDK VERSION : 1.6.0_07 ] Local variables are not sorted correctly in debugger output pane. See screenshot: sort arrow is visible in name field, but names are not sorted. After three clicks on the column header to cycle through sort orders, it is correct.
Created attachment 70599 [details] screenshot
Debugger is not involved in the sorting. Moving to tree table view.
i tried nb080929, jdk1.6_05, win xp and sorting of local variables worked fine. can you QA pls help me reproducing this issue? thanks
easily reproducible with 09/25 build on WinXp and jdk1.6.0_10.
after discussion with saubrecht I fount out that I'm not able to reproduce it. It works for me as expected: 1, the table of local variables appears with order as the variables are in the code 2, click the name column -> ordered lexically (a-z), arrow visible 3, click the name column -> ordered lexically (z-a), arrow visible 4, click again -> back to "code order" sorting, arrow disappears Glen, can you provide more info? What is your OS? Why are you using Metal? Is it the default l&f or do you use --laf switch? Thank you
Glen, can you provide more info? What is your OS? Ubuntu 8.04.1 with GNOME Why are you using Metal? 0) I like Metal L&F 1) I don't like GTK L&F 2) ctrl-PgUp/ctrl-PgDn editor shortcuts don't work in Nimbus L&F Is it the default l&f or do you use --laf switch? I use "--laf javax.swing.plaf.metal.MetalLookAndFeel"
I should mention that I'm using 6u10, which is not in the dropdown here: http://qa.netbeans.org/processes/cat/65/bug_form.html
you wrote that three clicks were need to get correct sort order. does the order change at all on the first and second clicks? what happens on fourth and next clicks? what about sorting other table columns, is the same behavior?
Everything you're asking worked when I filed the issue, i.e. after clicking once, it cycled through normally. However, I just tried now (attaching to an external copy of GlassFish), and the ordering was correct and consistent with the arrow on first entering the debugger, so I cycled through a few times... and ended up with what's in the attached screenshot. Something's clearly wrong here (there is not a "division" class variable).
Created attachment 70905 [details] screenshot, using 0930 build
debugger guys, can you pls look at this one? the last screenshot shows two rows for the same variable with different values
I have no idea what the two variables with the same name mean and how can this be reproduced. IMHO this is irrelevant to this problem. I can reproduce the bad sorting and have all variables unique. Is there anything I can check to help you with this? So far I've just found that SortedNodeTreeModel.sortChildren() is simply not called.
Still seeing this in 200904270201; sorting works, but variables revert to unsorted at each debugging session even if column header was clicked on to sort the last time.
Created attachment 81007 [details] screen shot
According to the last comment I think the problem is not in sorting of variable but make a sorting mode persistent between sessions. Reassigning back to debugger as a client OV API.
Not just persistent, but default as well. It makes no sense to show a pane full of unsorted variables by default.
By default, the variables are listed in the order in which they appear (order which debugger provides seems to correspond with the order in the source code). In any case, persistent sorting seems to be a regression caused by rewrite from TreeTableView to Outline.
Moving back to Outline. Persistence is implemented in debugger, we use ETableColumn.setSorted(). Header is marked with the arrow as expected, but the sorting algorithm does not care at all. The rows remain unsorted. Please fix in Outline. Debugger part is fixed in changeset: 131803:f4159899de5d http://hg.netbeans.org/main/rev/f4159899de5d
Moving version back to 6.5, it seems the buggy behavior of Outline is consistent with old TreeTableView, according to the description. It's necessary to click on the sorting arrow to get desired sorting order.
Integrated into 'main-golden', will be available in build *200905160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f4159899de5d User: mentlicher@netbeans.org Log: #148389 - Remember the sorting of columns.
Created attachment 82322 [details] unsorted variables
The above screenshot was taken on build 200905180201 right after starting a debug session. The sort arrow in the header indicates that the variables are in ascending order by name, but they are not. After clicking the header, it remains the same, but the variables are now sorted. This should not require a click. The variables should be presented in sorted order by default.
*** Issue 166253 has been marked as a duplicate of this issue. ***
Created attachment 83589 [details] screen shot showing sort arrow but unsorted variables
Added another screenshot since the previous one was apparently uploaded with the wrong MIME type.
*** Issue 167869 has been marked as a duplicate of this issue. ***
If I get it right, ETableColumn.setSorted() should NOT be made public in the fix of issue #151294. The changeset http://hg.netbeans.org/main/rev/13b0821dda4a correctly made public ETableColumnModel.setColumnSorted() which seems to work fine, but ETableColumn.setSorted() has no effect, since the model does not have the column in "sortedColumns" list. Since we can not simply revert the fix of issue #151294 - that would be an incompatible API change, I'll mark the method as deprecated.
Fixed in changeset: 139950:d2cf4c0d56fd http://hg.netbeans.org/main/rev/d2cf4c0d56fd
Integrated into 'main-golden', will be available in build *200908010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d2cf4c0d56fd User: mentlicher@netbeans.org Log: #148389 - ETableColumn.setSorted() is deprecated since it does not made the column actually sorted. ETableColumnModel.setColumnSorted() needs to be used instead.