Skip to main content

[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?

I tried making a call to AbstractTreeViewer.reveal() and it doesn't do anything on a collapsed node that has never been expanded yet.  If I manually expand the node by clicking on the + icon, collapse it by clicking on the - icon, and then call reveal() on the collapsed node, the node expands.

Stepping through the source code, I see that reveal() just expands and shows the node, whereas expandToLevel() expands the node and creates/updates the children of the node.  I need the latter case since the registers under the collapsed group node need to be lazily updated.

--- On Fri, 3/25/11, Lai, Winnie <wlai@xxxxxx> wrote:

> From: Lai, Winnie <wlai@xxxxxx>
> Subject: Re: [cdt-dev] Selecting a register/bit field under a collapsed node in the Registers View?
> To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
> Date: Friday, March 25, 2011, 12:39 PM
> 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
> 





Back to the top