Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 104029 - Provide API for selection/iteration of viewmodel nodes
Provide API for selection/iteration of viewmodel nodes
Status: NEW
Product: debugger
Classification: Unclassified
Component: Code
All All
: P2 (vote)
Assigned To: issues@debugger
Depends on:
  Show dependency treegraph
Reported: 2007-05-15 23:40 UTC by rcauble
Modified: 2007-05-15 23:40 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description rcauble 2007-05-15 23:40:28 UTC
The use case is as follows:

-I have a debugger local variables view and I want to implement "find"/"find 
next"/"find previous" actions for searching for some variable name/value

-In order to do this I need the following:
a)A way to iterate over all nodes in the variables view in the order in which 
they are currently sorted. This is so that find next/previous find in the order 
they are currently sorted in the tree.

b)A way to select the Node which is found.

Additional use cases can be envisioned outside the scope of the debugger. The 
viewmodel package is a nice general-purpose tree table component and so it 
would be very nice to have control over selection and iteration.

I have an implementation which does this with the current APIs, but it's a bit 
of a hack and also doesn't handle all cases. Basically what I am doing is 
digging out the ExplorerManager from the TreeTable component and I am doing my 
own sorting based on the current state of the column model. This works 
reasonable well, but in certain edge cases, the sort order I compute is not the 
same as that used by the treetable. (Namely, for elements which compare equal, 
they preserve the previous sort order in the tree, rather than the unsorted 
order in the node's children array.)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo