Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF (GDB only?) question: Can an IExpressionDMC be aparent of another IExpressionDMC

Hi Jens,
(comments below)

Elmenthaler, Jens wrote:
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Marc Khouzam
Sent: Montag, 12. April 2010 14:56
To: 'CDT General developers list.'
Subject: RE: [cdt-dev] DSF (GDB only?) question: Can an IExpressionDMC be
aparent of another IExpressionDMC

As you point out above, you can't have IExpressionDMContext be
a child of another IExpressionDMContext, at least not with
DSF-GDB.  Each _expression_ is independent if its parent.
For example for

The expressions are

where f.a and f.b don't know they are children of f, except
from their _expression_ string.
The reason for this design is that when we tried to keep the parents of expressions in the data model we ran into issues in the expressions view.  In the expressions view the user can type in an _expression_ such as "f.a" and we were not able to re-create the parents of this _expression_ they way we did when user expanded the elements in the tree. 
Yes, I can understand this.

I there something like a parent-child relationship on the view model side? I started looking at the IVMContext, but couldn't find something. It must be somewhere, otherwise the views wouldn't show trees, right?

In the view model the tree itself holds the parent-child relationships.  During the content update you can examine the parents of an element by looking at IViewUpdate.getTreePath().  When building a delta you can do the same thing by looking at the parent delta and its parents.

The reason why I ask is I'm trying to implement IVMNode.buildDelta in GDBVariableNode for an event that requests more children for a variable/_expression_ provided by a pretty printer.

cdt-dev mailing list

Back to the top