[haiku-commits] r42333 - in haiku/trunk/src/apps/debugger: user_interface/gui/team_window value

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 28 Jun 2011 02:20:33 +0200 (CEST)

Author: anevilyak
Date: 2011-06-28 02:20:32 +0200 (Tue, 28 Jun 2011)
New Revision: 42333
Changeset: https://dev.haiku-os.org/changeset/42333

Modified:
   
haiku/trunk/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
   haiku/trunk/src/apps/debugger/value/ValueNode.h
Log:
* Extend ValueNode to be able to indicate that a node needs child creation
  requests delayed until its location/value have been resolved. Update
  VariablesView to make use of that flag.



Modified: 
haiku/trunk/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
===================================================================
--- 
haiku/trunk/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp  
    2011-06-28 00:15:12 UTC (rev 42332)
+++ 
haiku/trunk/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp  
    2011-06-28 00:20:32 UTC (rev 42333)
@@ -853,6 +853,13 @@
        if (modelNode == NULL)
                return;
 
+       if (valueNode->ChildCreationNeedsValue()
+               && !valueNode->ChildrenCreated()) {
+               status_t error = valueNode->CreateChildren();
+               if (error != B_OK)
+                       return;
+       }
+
        // check whether the value actually changed
        Value* value = valueNode->GetValue();
        if (value == modelNode->GetValue())
@@ -1115,6 +1122,11 @@
                valueNode = nodeChild->Node();
        }
 
+       // check if this node requires child creation
+       // to be deferred until after its location/value have been resolved
+       if (valueNode->ChildCreationNeedsValue())
+               return B_OK;
+
        // create the children, if not done yet
        if (valueNode->ChildrenCreated())
                return B_OK;

Modified: haiku/trunk/src/apps/debugger/value/ValueNode.h
===================================================================
--- haiku/trunk/src/apps/debugger/value/ValueNode.h     2011-06-28 00:15:12 UTC 
(rev 42332)
+++ haiku/trunk/src/apps/debugger/value/ValueNode.h     2011-06-28 00:20:32 UTC 
(rev 42333)
@@ -47,6 +47,8 @@
                                                                        { 
return fContainer; }
                        void                            
SetContainer(ValueNodeContainer* container);
 
+                       virtual bool            ChildCreationNeedsValue() const
+                                                                       { 
return false; }
                        bool                            ChildrenCreated() const
                                                                        { 
return fChildrenCreated; }
        virtual status_t                        CreateChildren() = 0;


Other related posts:

  • » [haiku-commits] r42333 - in haiku/trunk/src/apps/debugger: user_interface/gui/team_window value - anevilyak