void LayoutGraph(ObjectGraph graph) { this.oldPosGraph = this.currentPosGraph; Log.Debug("Debugger visualizer: Calculating graph layout"); var layoutDirection = layoutViewModel.SelectedEnumValue; this.currentPosGraph = new TreeLayout(layoutDirection).CalculateLayout(graph, expanded); Log.Debug("Debugger visualizer: Graph layout done"); RegisterExpandCollapseEvents(this.currentPosGraph); var graphDiff = new GraphMatcher().MatchGraphs(oldPosGraph, currentPosGraph); Log.Debug("Debugger visualizer: starting graph animation"); this.graphDrawer.StartAnimation(oldPosGraph, currentPosGraph, graphDiff); }
void LayoutGraph(ObjectGraph graph) { if (this.oldPosGraph != null) { foreach (var oldNode in this.oldPosGraph.Nodes) { // controls from old graph would be garbage collected, reuse them NodeControlCache.Instance.ReturnForReuse(oldNode.NodeVisualControl); } } this.oldPosGraph = this.currentPosGraph; Log.Debug("Debugger visualizer: Calculating graph layout"); var layoutDirection = layoutViewModel.SelectedEnumValue; this.currentPosGraph = new TreeLayout(layoutDirection).CalculateLayout(graph, expanded); Log.Debug("Debugger visualizer: Graph layout done"); RegisterExpandCollapseEvents(this.currentPosGraph); var graphDiff = new GraphMatcher().MatchGraphs(oldPosGraph, currentPosGraph); Log.Debug("Debugger visualizer: starting graph animation"); this.graphDrawer.StartAnimation(oldPosGraph, currentPosGraph, graphDiff); }
ObjectGraph RebuildGraph(string expression) { this.objectGraphBuilder = new ObjectGraphBuilder(debuggerService); Log.Debug("Debugger visualizer: Building graph for expression: " + txtExpression.Text); return(this.objectGraphBuilder.BuildGraphForExpression(expression, expanded.Expressions)); }