|
|
|
@ -40,6 +40,17 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
@@ -40,6 +40,17 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool IsVisible { |
|
|
|
|
get { |
|
|
|
|
foreach(TreeListViewItem parent in this.ParentsInHierarch) { |
|
|
|
|
if (!parent.IsExpanded) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public TreeListViewDebuggerItem(Variable variable) |
|
|
|
|
{ |
|
|
|
|
this.variable = variable; |
|
|
|
@ -54,20 +65,37 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
@@ -54,20 +65,37 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
|
|
|
|
|
SubItems.Add(""); |
|
|
|
|
SubItems.Add(""); |
|
|
|
|
|
|
|
|
|
Update(); |
|
|
|
|
Update(this, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool waitingForParentToExpand = false; |
|
|
|
|
|
|
|
|
|
void Update(object sender, DebuggerEventArgs e) |
|
|
|
|
{ |
|
|
|
|
if (this.TreeListView is DebuggerTreeListView) { |
|
|
|
|
if (waitingForParentToExpand) return; |
|
|
|
|
|
|
|
|
|
if (this.Parent != null && !IsVisible) { |
|
|
|
|
// Delay the update until the parent is expanded
|
|
|
|
|
TreeListViewItemHanlder update = null; |
|
|
|
|
update = delegate { |
|
|
|
|
waitingForParentToExpand = false; |
|
|
|
|
Update(this, null); |
|
|
|
|
foreach(TreeListViewItem parent in this.ParentsInHierarch) { |
|
|
|
|
parent.AfterExpand -= update; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
foreach(TreeListViewItem parent in this.ParentsInHierarch) { |
|
|
|
|
parent.AfterExpand += update; |
|
|
|
|
} |
|
|
|
|
waitingForParentToExpand = true; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.TreeListView != null) { |
|
|
|
|
((DebuggerTreeListView)this.TreeListView).DelayRefresh(); |
|
|
|
|
Highlight = (Variable.Value.AsString != SubItems[1].Text); |
|
|
|
|
} |
|
|
|
|
Highlight = (Variable.Value.AsString != SubItems[1].Text); |
|
|
|
|
Update(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Update() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
this.SubItems[0].Text = Variable.Name; |
|
|
|
|
this.SubItems[1].Text = Variable.Value.AsString; |
|
|
|
|
this.SubItems[2].Text = Variable.Value.Type; |
|
|
|
|