[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Selecting a register/bit field under a collapsed node in the Registers View?

Either way, you'll have to deal with the async. events.
For my preferred solution to this problem take a look at BreakpointsView.expandAllElementsInViewer(). The only problem with that solution is that it doesn't have progress monitor support. That's something which should be added if we're to use it in the find dialog.


Cheer,
Pawel

On 03/25/2011 09:39 AM, Lai, Winnie wrote:
Instead of "making calls to expandToLevel followed by setSelection", have you tried just making call to AbstractTreeViewr.reveal(objectOrTreePath)?

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Norman Yee
Sent: Friday, March 25, 2011 11:44 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Selecting a register/bit field under a collapsed node in the Registers View?

I'm working on a fix for Bug 340891 (Find dialog doesn't show registers under collapsed nodes).  After the user chooses a register/bit field in the Find dialog, I want to show and select the register/bit field under a collapsed node in the Registers View.

Is there a way to show and select an item under a collapsed node?  It looks like it's not possible because the collapsed node has to be expanded first with a call to AbstractTreeViewer.expandToLevel(), which updates the node's children asynchronously and doesn't notify the caller when it's done.  After I call expandToLevel(), I try looking at the child nodes under the newly expanded node and there are no child nodes because it hasn't expanded the node yet.




_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev _______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev