Browse Source

- NestedNodeViewModel and PropertyNodeViewModel for displaying in PositionedGraphNodeControl

- Almost completely rewritten TreeLayouter to support trees of properties

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4376 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Martin Koníček 17 years ago
parent
commit
2f992ad798
  1. 23
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Drawing/NodeControl.xaml.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Drawing/PositionedGraphNodeControl.xaml.cs
  3. 69
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/NestedNodeViewModel.cs
  4. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedGraph.cs
  5. 125
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedGraphNode.cs
  6. 22
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PropertyNodeViewModel.cs
  7. 10
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs
  8. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/TreeEdge.cs
  9. 113
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/TreeLayouter.cs
  10. 1
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs
  11. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs
  12. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/VisualizerWPFWindow.xaml.cs

23
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Drawing/NodeControl.xaml.cs

@ -29,20 +29,21 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing @@ -29,20 +29,21 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
/// <summary>
/// Creates new NodeControl displaying PositionedNode.
/// </summary>
/// <param name="graphNode">PositionedNode displayed by the control.</param>
public NodeControl(PositionedGraphNode graphNode) : this()
/*public NodeControl() : this()
{
//this.initializeWithGraphNode(graphNode);
this.GraphNode = graphNode;
}
//this.GraphNode = graphNode;
}*/
/// <summary>
/// Creates new NodeControl displaying PositionedNode.
/// </summary>
public NodeControl()
{
InitializeComponent();
}
public event EventHandler<PositionedPropertyEventArgs> Expanded;
public event EventHandler<PositionedPropertyEventArgs> Collapsed;
public event EventHandler<PositionedPropertyEventArgs> PropertyExpanded;
public event EventHandler<PositionedPropertyEventArgs> PropertyCollapsed;
private PositionedGraphNode node;
/// <summary>
@ -135,17 +136,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing @@ -135,17 +136,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
#region event helpers
protected virtual void OnPropertyExpanded(PositionedNodeProperty property)
{
if (this.Expanded != null)
if (this.PropertyExpanded != null)
{
this.Expanded(this, new PositionedPropertyEventArgs(property));
this.PropertyExpanded(this, new PositionedPropertyEventArgs(property));
}
}
protected virtual void OnPropertyCollapsed(PositionedNodeProperty property)
{
if (this.Collapsed != null)
if (this.PropertyCollapsed != null)
{
this.Collapsed(this, new PositionedPropertyEventArgs(property));
this.PropertyCollapsed(this, new PositionedPropertyEventArgs(property));
}
}
#endregion

4
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Drawing/PositionedGraphNodeControl.xaml.cs

@ -124,8 +124,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing @@ -124,8 +124,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
colName.Width = double.NaN;
colValue.Width = 300;
colValue.Width = double.NaN;
this.view.Insert(0, new NestedNodeViewModel());
this.view.RemoveAt(0);
//this.view.Insert(0, new NestedNodeViewModel());
//this.view.RemoveAt(0);
this.listView.UpdateLayout();
this.listView.Width = colName.ActualWidth + colValue.ActualWidth + 30;
this.listView.Width = double.NaN;

69
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/NestedNodeViewModel.cs

@ -14,21 +14,48 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -14,21 +14,48 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
/// </summary>
public class NestedNodeViewModel
{
public string Name { get; set; }
public string Text { get; set; }
public NestedNodeViewModel(PositionedGraphNode containingNode)
{
if (containingNode == null)
throw new ArgumentNullException("containingNode");
this.containingNode = containingNode;
}
private List<NestedNodeViewModel> children = new List<NestedNodeViewModel>();
public List<NestedNodeViewModel> Children { get { return this.children; } }
/// <summary>
/// Name displayed in GUI.
/// </summary>
public string Name { get; protected set; }
/// <summary>
/// Text displayed in GUI.
/// </summary>
public string Text { get; protected set; }
/// <summary>
/// Is this expandable node?
/// </summary>
public bool IsNested { get; set; }
public bool IsNested { get; protected set; }
/// <summary>
/// Does this node have any children?
/// </summary>
public bool HasChildren { get { return this.Children.Count > 0; } }
// if we bound this ViewModel to a TreeView, this would not be needed,
// it is added "artificially" to support PositionedGraphNodeControl
public bool IsExpanded { get; set; }
private List<NestedNodeViewModel> children = new List<NestedNodeViewModel>();
public List<NestedNodeViewModel> Children { get { return this.children; } }
PositionedGraphNode containingNode;
/// <summary>
/// PositionedGraphNode that contains this PropertyNodeViewModel.
/// </summary>
public PositionedGraphNode ContainingNode
{
get { return this.containingNode; }
}
/// <summary>
/// Show a button to expand property associated with this node?
/// </summary>
@ -51,12 +78,32 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -51,12 +78,32 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
}
}
// if we bound this ViewModel to a TreeView, this would not be needed,
// it is added "artificially", to support PositionedGraphNodeControl
public bool IsExpanded { get; set; }
public NestedNodeViewModel()
public virtual void InitFrom(AbstractNode source)
{
if (!(source is NestedNode))
throw new InvalidOperationException("NestedNodeViewModel must initialize from NestedNode");
NestedNode nestedSource = (NestedNode)source;
this.Name = "base"; // TODO
this.Text = "";
this.IsNested = true;
this.IsExpanded = false; // TODO remember expanded nodes
foreach (AbstractNode child in nestedSource.Children)
{
if (child is NestedNode)
{
var newChild = new NestedNodeViewModel(this.ContainingNode);
newChild.InitFrom(child);
this.Children.Add(newChild);
}
else if (child is PropertyNode)
{
var newChild = new PropertyNodeViewModel(this.ContainingNode);
newChild.InitFrom(child);
this.Children.Add(newChild);
}
}
}
}
}

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedGraph.cs

@ -18,6 +18,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -18,6 +18,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
{
private List<PositionedGraphNode> nodes = new List<PositionedGraphNode>();
public PositionedGraphNode Root { get; set; }
public System.Windows.Rect BoundingRect
{
get

125
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedGraphNode.cs

@ -16,6 +16,15 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -16,6 +16,15 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
/// </summary>
public class PositionedGraphNode
{
/// <summary>
/// Creates new PositionedNode.
/// </summary>
/// <param name="objectNode">Underlying ObjectNode.</param>
public PositionedGraphNode(ObjectGraphNode objectNode)
{
this.objectNode = objectNode;
}
private ObjectGraphNode objectNode;
/// <summary>
/// Underlying ObjectNode.
@ -28,50 +37,86 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -28,50 +37,86 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
public event EventHandler<PositionedPropertyEventArgs> PropertyExpanded;
public event EventHandler<PositionedPropertyEventArgs> PropertyCollapsed;
private List<PositionedNodeProperty> properties = new List<PositionedNodeProperty>();
public List<PositionedNodeProperty> Properties
// TODO posNodeForObjectGraphNode will be a service, that will return existing posNodes or create empty new
public void InitContentFromObjectNode()
{
get
{
return this.properties;
}
this.Content = new NestedNodeViewModel(this);
this.Content.InitFrom(this.ObjectNode.Content);
}
public PositionedNodeProperty AddProperty(ObjectGraphProperty objectProperty, bool isExpanded)
public void InitView()
{
var newProperty = new PositionedNodeProperty(objectProperty, this);
newProperty.IsExpanded = isExpanded;
this.Properties.Add(newProperty);
this.nodeVisualControl.AddProperty(newProperty);
this.nodeVisualControl = new NodeControl();
return newProperty;
this.nodeVisualControl.PropertyExpanded += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_Expanded);
this.nodeVisualControl.PropertyCollapsed += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_Collapsed);
}
public void FillView()
{
//this.nodeVisualControl.Root = this.Content;
foreach (var property in this.Properties)
{
property.Evaluate();
this.nodeVisualControl.AddProperty(property);
}
}
/// <summary>
/// Creates new PositionedNode.
/// Tree-of-properties content of this node.
/// </summary>
/// <param name="objectNode">Underlying ObjectNode.</param>
public PositionedGraphNode(ObjectGraphNode objectNode)
public NestedNodeViewModel Content
{
get; set;
}
// TODO do proper tree iteration
public IEnumerable<PositionedNodeProperty> Properties
{
this.objectNode = objectNode;
this.nodeVisualControl = new NodeControl(this); // display
this.nodeVisualControl.Expanded += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_Expanded);
this.nodeVisualControl.Collapsed += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_Collapsed);
get
{
foreach (var child in this.Content.Children)
{
var property = ((PropertyNodeViewModel)child).Property;
yield return property;
}
}
}
private void NodeVisualControl_Expanded(object sender, PositionedPropertyEventArgs e)
private NodeControl nodeVisualControl;
/// <summary>
/// Visual control to be shown for this node.
/// </summary>
public NodeControl NodeVisualControl
{
// propagage event
OnPropertyExpanded(this, e);
get
{
return this.nodeVisualControl;
}
}
private void NodeVisualControl_Collapsed(object sender, PositionedPropertyEventArgs e)
public virtual IEnumerable<PositionedEdge> Edges
{
// propagate event
OnPropertyCollapsed(this, e);
get
{
foreach (PositionedNodeProperty property in this.Properties)
{
if (property.Edge != null)
yield return property.Edge;
}
}
}
/*public PositionedNodeProperty AddProperty(ObjectGraphProperty objectProperty, bool isExpanded)
{
var newProperty = new PositionedNodeProperty(objectProperty, this);
newProperty.IsExpanded = isExpanded;
this.Properties.Add(newProperty);
this.nodeVisualControl.AddProperty(newProperty);
return newProperty;
}*/
public void Measure()
{
this.nodeVisualControl.Measure(new Size(500, 500));
@ -100,31 +145,19 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -100,31 +145,19 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
public Rect Rect { get { return new Rect(Left, Top, Width, Height); } }
private NodeControl nodeVisualControl;
/// <summary>
/// Visual control to be shown for this node.
/// </summary>
public NodeControl NodeVisualControl
#region event helpers
private void NodeVisualControl_Expanded(object sender, PositionedPropertyEventArgs e)
{
get
{
return this.nodeVisualControl;
}
// propagage event
OnPropertyExpanded(this, e);
}
public virtual IEnumerable<PositionedEdge> Edges
private void NodeVisualControl_Collapsed(object sender, PositionedPropertyEventArgs e)
{
get
{
foreach (PositionedNodeProperty property in this.Properties)
{
if (property.Edge != null)
yield return property.Edge;
}
}
// propagate event
OnPropertyCollapsed(this, e);
}
#region event helpers
protected virtual void OnPropertyExpanded(object sender, PositionedPropertyEventArgs propertyArgs)
{
if (this.PropertyExpanded != null)

22
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PropertyNodeViewModel.cs

@ -15,12 +15,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -15,12 +15,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
{
PositionedNodeProperty positionedProperty;
public PropertyNodeViewModel(PositionedNodeProperty positionedNodeProperty)
public PropertyNodeViewModel(PositionedGraphNode containingNode) : base(containingNode)
{
if (positionedNodeProperty == null)
throw new ArgumentNullException("positionedNodeProperty");
this.positionedProperty = positionedNodeProperty;
}
/// <summary>
@ -39,6 +35,22 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -39,6 +35,22 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
public void Evaluate()
{
this.positionedProperty.Evaluate();
this.Text = this.positionedProperty.Value;
}
public override void InitFrom(AbstractNode source)
{
if (!(source is PropertyNode))
throw new InvalidOperationException("PropertyNodeViewModel must initialize from PropertyNode");
PropertyNode sourcePropertyNode = source as PropertyNode;
this.Name = sourcePropertyNode.Property.Name;
this.Text = ""; // lazy evaluated
this.IsNested = false;
this.IsExpanded = false;
this.Name = sourcePropertyNode.Property.Name;
this.positionedProperty = new PositionedNodeProperty(sourcePropertyNode.Property, this.ContainingNode);
}
}
}

10
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs

@ -36,15 +36,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -36,15 +36,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
Rect neatoInput = transform.NodeToNeatoInput(node);
StringBuilder recordLabel = new StringBuilder();
for (int i = 0; i < node.Properties.Count; i++)
bool first = true;
foreach (var prop in node.Properties)
{
string propertyId = "f" + genId.GetNextId().ToString();
propertyIds[node.Properties[i]] = propertyId;
recordLabel.Append(string.Format("<{0}> l", propertyId));
if (i < node.Properties.Count - 1)
propertyIds[prop] = propertyId;
if (!first)
{
recordLabel.Append("|");
}
recordLabel.Append(string.Format("<{0}> l", propertyId));
first = false;
}
string dotFormatNode =

3
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/TreeEdge.cs

@ -8,6 +8,9 @@ using System; @@ -8,6 +8,9 @@ using System;
namespace Debugger.AddIn.Visualizers.Graph.Layout
{
// TODO this class is almost not necessary, is used only for TreeLayouter purposes.
// TreeLayouter could remember the additional information in a Dictionary PositionedEdge -> bool
/// <summary>
/// Edge in the tree-layouted <see cref="PositionedGraph"/>.
/// </summary>

113
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/TreeLayouter.cs

@ -24,8 +24,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -24,8 +24,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
PositionedGraph resultGraph = null;
Dictionary<ObjectGraphNode, TreeGraphNode> treeNodeFor = new Dictionary<ObjectGraphNode, TreeGraphNode>();
Dictionary<ObjectGraphNode, object> seenNodes = new Dictionary<ObjectGraphNode, object>();
HashSet<PositionedGraphNode> seenNodes = new HashSet<PositionedGraphNode>();
Dictionary<ObjectGraphNode, PositionedGraphNode> treeNodeFor = new Dictionary<ObjectGraphNode, PositionedGraphNode>();
public TreeLayouter()
{
@ -40,12 +40,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -40,12 +40,17 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
{
layoutDirection = direction;
resultGraph = new PositionedGraph();
treeNodeFor = new Dictionary<ObjectGraphNode, TreeGraphNode>();
seenNodes = new Dictionary<ObjectGraphNode, object>();
treeNodeFor = new Dictionary<ObjectGraphNode, PositionedGraphNode>();
seenNodes = new HashSet<PositionedGraphNode>();
TreeGraphNode tree = buildTreeRecursive(objectGraph.Root, expandedNodes);
calculateNodePosRecursive(tree, 0, 0);
//TreeGraphNode tree = buildTreeRecursive(objectGraph.Root, expandedNodes);
// convert ObjectGraph to PositionedGraph with TreeEdges
PositionedGraph tree = buildTreeGraph(objectGraph, expandedNodes);
// first pass
calculateSubtreeSizes((TreeGraphNode)tree.Root);
// second pass
calculateNodePosRecursive((TreeGraphNode)tree.Root, 0, 0);
var neatoRouter = new NeatoEdgeRouter();
resultGraph = neatoRouter.CalculateEdges(resultGraph);
@ -53,19 +58,99 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -53,19 +58,99 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
return resultGraph;
}
private TreeGraphNode buildTreeRecursive(ObjectGraphNode objectGraphNode, ExpandedNodes expandedNodes)
private PositionedGraph buildTreeGraph(ObjectGraph objectGraph, ExpandedNodes expandedNodes)
{
resultGraph = new PositionedGraph();
// create empty PosNodes
foreach (ObjectGraphNode objectGraphNode in objectGraph.Nodes)
{
TreeGraphNode posNode = createNewTreeGraphNode(objectGraphNode);
resultGraph.AddNode(posNode);
treeNodeFor[objectGraphNode] = posNode;
posNode.InitView();
}
// copy Content for each node
foreach (PositionedGraphNode posNode in resultGraph.Nodes)
{
posNode.InitContentFromObjectNode();
posNode.FillView();
}
// create edges
foreach (PositionedGraphNode posNode in resultGraph.Nodes)
{
// create edges outgoing from this posNode
foreach (PositionedNodeProperty property in posNode.Properties)
{
property.IsExpanded = expandedNodes.IsExpanded(property.Expression.Code);
if (property.ObjectGraphProperty.TargetNode != null)
{
ObjectGraphNode targetObjectNode = property.ObjectGraphProperty.TargetNode;
PositionedGraphNode edgeTarget = treeNodeFor[targetObjectNode];
property.Edge = new TreeGraphEdge
{ IsTreeEdge = false, Name = property.Name, Source = property, Target = edgeTarget };
}
}
}
resultGraph.Root = treeNodeFor[objectGraph.Root];
return resultGraph;
}
private void calculateSubtreeSizes(TreeGraphNode root)
{
seenNodes.Add(root);
double subtreeSize = 0;
foreach (PositionedNodeProperty property in root.Properties)
{
var edge = property.Edge as TreeGraphEdge; // we know that these egdes are TreeEdges
if (edge != null)
{
var neigborNode = (TreeGraphNode)edge.Target;
if (seenNodes.Contains(neigborNode))
{
edge.IsTreeEdge = false;
}
else
{
edge.IsTreeEdge = true;
calculateSubtreeSizes(neigborNode);
subtreeSize += neigborNode.SubtreeSize;
}
}
}
root.Measure();
root.SubtreeSize = Math.Max(root.LateralSizeWithMargin, subtreeSize);
}
private TreeGraphNode createNewTreeGraphNode(ObjectGraphNode objectGraphNode)
{
var newGraphNode = TreeGraphNode.Create(this.layoutDirection, objectGraphNode);
newGraphNode.HorizontalMargin = horizNodeMargin;
newGraphNode.VerticalMargin = vertNodeMargin;
return newGraphNode;
}
/*private TreeGraphNode buildTreeRecursive(ObjectGraphNode objectGraphNode, ExpandedNodes expandedNodes)
{
seenNodes.Add(objectGraphNode, null);
TreeGraphNode newTreeNode = TreeGraphNode.Create(this.layoutDirection, objectGraphNode);
newTreeNode.HorizontalMargin = horizNodeMargin;
newTreeNode.VerticalMargin = vertNodeMargin;
TreeGraphNode newTreeNode = createNewTreeGraphNode();
resultGraph.AddNode(newTreeNode);
treeNodeFor[objectGraphNode] = newTreeNode;
double subtreeSize = 0;
foreach (AbstractNode absNode in objectGraphNode.Content.Children)
{
var newTreeNodeContent = new NestedNodeViewModel();
ObjectGraphProperty property = ((PropertyNode)absNode).Property;
if (property.TargetNode != null)
@ -93,12 +178,12 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout @@ -93,12 +178,12 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
newTreeNode.AddProperty(property, expandedNodes.IsExpanded(property.Expression.Code));
}
}
newTreeNode.Measure();
subtreeSize = Math.Max(newTreeNode.LateralSizeWithMargin, subtreeSize);
newTreeNode.SubtreeSize = subtreeSize;
newTreeNode.SubtreeSize = Math.Max(newTreeNode.LateralSizeWithMargin, subtreeSize);
return newTreeNode;
}
}*/
/// <summary>
/// Given SubtreeSize for each node, positions the nodes, in a left-to-right or top-to-bottom fashion.

1
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs

@ -187,6 +187,7 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -187,6 +187,7 @@ namespace Debugger.AddIn.Visualizers.Graph
{
targetNode = null;
}
// connect property to target ObjectGraphNode
complexProperty.TargetNode = targetNode;
}
}

3
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs

@ -34,7 +34,8 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -34,7 +34,8 @@ namespace Debugger.AddIn.Visualizers.Graph
{
throw new DebuggerVisualizerException("Cannot evaluate property with missing Expression");
}
this.Value = this.Expression.Evaluate(WindowsDebugger.CurrentProcess).InvokeToString();
Value debuggerVal = this.Expression.Evaluate(WindowsDebugger.CurrentProcess);
this.Value = debuggerVal.IsNull ? string.Empty : debuggerVal.InvokeToString();
this.evaluateCalled = true;
}
}

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/VisualizerWPFWindow.xaml.cs

@ -127,9 +127,9 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -127,9 +127,9 @@ namespace Debugger.AddIn.Visualizers.Graph
this.currentPosGraph = layouter.CalculateLayout(graph, layoutViewModel.SelectedEnumValue, this.expandedNodes);
registerExpandCollapseEvents(this.currentPosGraph);
var graphDiff = new GraphMatcher().MatchGraphs(oldPosGraph, currentPosGraph);
this.graphDrawer.StartAnimation(oldPosGraph, currentPosGraph, graphDiff);
//this.graphDrawer.Draw(currentGraph);
//var graphDiff = new GraphMatcher().MatchGraphs(oldPosGraph, currentPosGraph);
//this.graphDrawer.StartAnimation(oldPosGraph, currentPosGraph, graphDiff);
this.graphDrawer.Draw(this.currentPosGraph);
}
void guiHandleException(System.Exception ex)

Loading…
Cancel
Save