Browse Source

Fixed LocalVariablesPas updating.

Less debug output to the console.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2807 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
c1d6e7dcdb
  1. 19
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewNode.cs
  2. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Evaluate.cs

19
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/Adapters/TreeViewNode.cs

@ -22,7 +22,7 @@ namespace Debugger.AddIn.TreeModel
AbstractNode content; AbstractNode content;
bool loadChildsWhenExpanding; bool childsLoaded;
public AbstractNode Content { public AbstractNode Content {
get { return content; } get { return content; }
@ -47,13 +47,15 @@ namespace Debugger.AddIn.TreeModel
{ {
this.content = content; this.content = content;
this.IsLeaf = (content.ChildNodes == null); this.IsLeaf = (content.ChildNodes == null);
loadChildsWhenExpanding = true; childsLoaded = false;
if (content.ChildNodes != null && expandedNodes.ContainsKey(this.FullName) && expandedNodes[this.FullName]) { if (content.ChildNodes != null && expandedNodes.ContainsKey(this.FullName) && expandedNodes[this.FullName]) {
LoadChilds();
this.Expand(); this.Expand();
} else { } else {
this.Collapse();
this.Children.Clear(); this.Children.Clear();
this.Collapse();
} }
this.Tree.Invalidate();
} }
public static void SetContentRecursive(TreeViewAdv tree, IList<TreeNodeAdv> childNodes, IEnumerable<AbstractNode> contentEnum) public static void SetContentRecursive(TreeViewAdv tree, IList<TreeNodeAdv> childNodes, IEnumerable<AbstractNode> contentEnum)
@ -85,8 +87,13 @@ namespace Debugger.AddIn.TreeModel
protected override void OnExpanding() protected override void OnExpanding()
{ {
base.OnExpanding(); base.OnExpanding();
if (loadChildsWhenExpanding) { LoadChilds();
loadChildsWhenExpanding = false; }
void LoadChilds()
{
if (!childsLoaded) {
childsLoaded = true;
SetContentRecursive(this.Tree, this.Children, this.Content.ChildNodes); SetContentRecursive(this.Tree, this.Children, this.Content.ChildNodes);
this.IsExpandedOnce = true; this.IsExpandedOnce = true;
} }
@ -127,7 +134,7 @@ namespace Debugger.AddIn.TreeModel
workTime = Math.Max(minWorkTime, Math.Min(maxWorkTime, workTime)); // Clamp workTime = Math.Max(minWorkTime, Math.Min(maxWorkTime, workTime)); // Clamp
nextDoEventsTime = end.AddMilliseconds(workTime); nextDoEventsTime = end.AddMilliseconds(workTime);
double fps = 1000 / (doEventsDuration + workTime); double fps = 1000 / (doEventsDuration + workTime);
LoggingService.InfoFormatted("Rendering: {0} ms => work budget: {1} ms ({2:f1} FPS)", doEventsDuration, workTime, fps); // LoggingService.InfoFormatted("Rendering: {0} ms => work budget: {1} ms ({2:f1} FPS)", doEventsDuration, workTime, fps);
} }
} }
} }

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Evaluate.cs

@ -19,7 +19,7 @@ namespace Debugger
{ {
public Value Evaluate(StackFrame context) public Value Evaluate(StackFrame context)
{ {
context.Process.TraceMessage("Evaluating " + this.Code); // context.Process.TraceMessage("Evaluating " + this.Code);
EvaluateAstVisitor astVisitor = new EvaluateAstVisitor(context); EvaluateAstVisitor astVisitor = new EvaluateAstVisitor(context);
Value result = (Value)this.AbstractSynatxTree.AcceptVisitor(astVisitor, null); Value result = (Value)this.AbstractSynatxTree.AcceptVisitor(astVisitor, null);
context.Process.TraceMessage("Evaluated " + this.Code); context.Process.TraceMessage("Evaluated " + this.Code);

Loading…
Cancel
Save