diff --git a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj
index 7dc236c257..638ef25ee4 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj
+++ b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj
@@ -158,10 +158,10 @@
-
-
-
-
+
+
+
+
@@ -294,7 +294,7 @@
-
+
@@ -314,8 +314,8 @@
-
-
+
+
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/GraphEdgeRouter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/GraphEdgeRouter.cs
index 471870cb1b..3e130f1cb8 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/GraphEdgeRouter.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/GraphEdgeRouter.cs
@@ -17,10 +17,6 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
{
EdgeRouter router = new EdgeRouter();
- public GraphEdgeRouter()
- {
- }
-
public void RouteEdges(PositionedGraph posGraph)
{
Dictionary routedEdges = router.RouteEdges(posGraph.Nodes, posGraph.Edges);
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNode.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNode.cs
index 2c885c2088..17fda87962 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNode.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNode.cs
@@ -145,8 +145,9 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
SplineRouting.Box box;
public SplineRouting.IRect Inflated(double padding)
{
- if (box == null)
+ if (box == null) {
box = new SplineRouting.Box(this);
+ }
return box.Inflated(padding);
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNodeProperty.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNodeProperty.cs
index c691a05509..7e4f4eef64 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNodeProperty.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/PositionedNodeProperty.cs
@@ -18,11 +18,8 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
/// Underlying
public PositionedNodeProperty(ObjectGraphProperty objectProperty, PositionedNode containingNode, bool isPropertyExpanded)
{
- if (containingNode == null)
- throw new ArgumentNullException("containingNode");
- if (objectProperty == null)
- throw new ArgumentNullException("objectProperty");
-
+ if (containingNode == null) throw new ArgumentNullException("containingNode");
+ if (objectProperty == null) throw new ArgumentNullException("objectProperty");
this.objectGraphProperty = objectProperty;
this.containingNode = containingNode;
this.IsPropertyExpanded = isPropertyExpanded;
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Box.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Box.cs
index 5f53386bed..0dab51f1d6 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Box.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Box.cs
@@ -44,8 +44,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
public IRect Inflated(double padding)
{
//if (inflatedCache.ContainsKey(padding))
- if (inflatedCache == null)
- {
+ if (inflatedCache == null) {
inflatedCache = GeomUtils.InflateRect(this, padding);
}
return inflatedCache;
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Edge.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Edge.cs
index 173f88294e..04050cfe0f 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Edge.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/Edge.cs
@@ -13,10 +13,6 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
///
public class Edge : IEdge
{
- public Edge()
- {
- }
-
public IRect From { get; set; }
public IRect To { get; set; }
public IPoint StartPoint { get; set; }
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/EdgeRouter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/EdgeRouter.cs
index 935af7c39a..ae72773729 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/EdgeRouter.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/EdgeRouter.cs
@@ -12,10 +12,6 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
///
public class EdgeRouter
{
- public EdgeRouter()
- {
- }
-
///
/// Calculates routes for edges in a graph, so that they avoid nodes.
///
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/GeomUtils.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/GeomUtils.cs
index ce62e31e7d..6256aca7f7 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/GeomUtils.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/GeomUtils.cs
@@ -8,17 +8,10 @@ using System.Windows;
namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
{
- ///
- /// Description of GeomUtils.
- ///
- public class GeomUtils
+ public static class GeomUtils
{
static readonly double eps = 1e-8;
- public GeomUtils()
- {
- }
-
public static IPoint RectCenter(IRect rect)
{
return new Point2D(rect.Left + rect.Width / 2, rect.Top + rect.Height / 2);
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/IRect.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/IRect.cs
index 1141f9584f..71d0f4d9ae 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/IRect.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/IRect.cs
@@ -9,7 +9,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
{
///
/// The node in a graph.
- /// Enables passing generic graphs .
///
public interface IRect
{
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs
index 52c3a27ba0..c029637d39 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs
@@ -18,8 +18,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
public override bool Equals(object obj)
{
var other = obj as EdgeStartEnd;
- if (other == null)
- return false;
+ if (other == null) return false;
return (this.From == other.From && this.To == other.To) || (this.From == other.To && this.To == other.From);
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/RouteGraph.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/RouteGraph.cs
index 605e30c14c..f5b169c5fe 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/RouteGraph.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/RouteGraph/RouteGraph.cs
@@ -145,8 +145,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
for (int j = i + 1; j < this.Vertices.Count; j++) {
var vertex = this.Vertices[i];
var vertex2 = this.Vertices[j];
- if (Visible(vertex, vertex2))
- {
+ if (Visible(vertex, vertex2)) {
// bidirectional edge
vertex.AddNeighbor(vertex2);
vertex2.AddNeighbor(vertex);
@@ -159,8 +158,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
{
// test for intersection with every box
foreach (var rect in this.Boxes) {
- if (GeomUtils.LineRectIntersection(vertex, vertex2, rect) != null)
- return false;
+ if (GeomUtils.LineRectIntersection(vertex, vertex2, rect) != null) return false;
}
return true;
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/ShortestPath/DijkstraShortestPathFinder.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/ShortestPath/DijkstraShortestPathFinder.cs
index 1cfca51123..77a7acee61 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/ShortestPath/DijkstraShortestPathFinder.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/SplineRouting/ShortestPath/DijkstraShortestPathFinder.cs
@@ -28,8 +28,7 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
}
start.Distance = 0;
bool reached = false;
- while (!reached)
- {
+ while (!reached) {
RouteVertex minVertex = null;
foreach (var minCandidate in graph.Vertices.Where(v => !v.IsPermanent && v.IsAvailable)) {
if (minVertex == null || minCandidate.Distance < minVertex.Distance) {
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/TreeModel/ContentNode.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/TreeModel/ContentNode.cs
index d465a5fa5b..ebd1c4b47b 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/TreeModel/ContentNode.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Layout/TreeModel/ContentNode.cs
@@ -21,7 +21,6 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
{
if (containingNode == null)
throw new ArgumentNullException("containingNode");
-
this.containingNode = containingNode;
this.parent = parent;
}
@@ -163,12 +162,9 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
this.IsExpanded = (source is ThisNode) || expanded.ContentNodes.IsExpanded(this);
foreach (AbstractNode child in source.Children) {
- ContentNode newChild = null;
- if (child is PropertyNode) {
- newChild = new ContentPropertyNode(this.ContainingNode, this);
- } else {
- newChild = new ContentNode(this.ContainingNode, this);
- }
+ ContentNode newChild = child is PropertyNode ?
+ new ContentPropertyNode(this.ContainingNode, this) :
+ new ContentNode(this.ContainingNode, this);
newChild.InitOverride(child, expanded);
this.Children.Add(newChild);
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/BoolToBoldConverter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/BoolToBoldConverter.cs
similarity index 100%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/BoolToBoldConverter.cs
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/BoolToBoldConverter.cs
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/CanvasLocationAdapter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/CanvasLocationAdapter.cs
similarity index 100%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/CanvasLocationAdapter.cs
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/CanvasLocationAdapter.cs
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/GraphDrawer.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/GraphDrawer.cs
similarity index 100%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/GraphDrawer.cs
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/GraphDrawer.cs
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/NodeControlResources.xaml b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/NodeControlResources.xaml
similarity index 100%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/NodeControlResources.xaml
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/NodeControlResources.xaml
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/PositionedGraphNodeControl.xaml b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/PositionedGraphNodeControl.xaml
similarity index 100%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/PositionedGraphNodeControl.xaml
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/PositionedGraphNodeControl.xaml
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/PositionedGraphNodeControl.xaml.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/PositionedGraphNodeControl.xaml.cs
similarity index 96%
rename from src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/PositionedGraphNodeControl.xaml.cs
rename to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/PositionedGraphNodeControl.xaml.cs
index 543fe24fde..c558a78abf 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Drawing/PositionedGraphNodeControl.xaml.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GraphVisualizer/Presentation/PositionedGraphNodeControl.xaml.cs
@@ -93,7 +93,7 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
}
PositionedNodeProperty property = clickedNode.Property;
- clickedButton.Content = property.IsPropertyExpanded ? "-" : "+"; // could be done with a converter
+ clickedButton.Content = property.IsPropertyExpanded ? "-" : "+"; // could be done using a converter
if (property.IsPropertyExpanded) {
OnPropertyExpanded(property);
@@ -108,25 +108,20 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
var clickedNode = clickedButton.DataContext as ContentNode;
if (clickedNode == null) return;
int clickedIndex = this.items.IndexOf(clickedNode);
- clickedButton.Content = clickedNode.IsExpanded ? "-" : "+"; // could be done by a converter
+ clickedButton.Content = clickedNode.IsExpanded ? "-" : "+"; // could be done using a converter
- if (clickedNode.IsExpanded)
- {
+ if (clickedNode.IsExpanded) {
// insert children
int i = 1;
- foreach (var childNode in clickedNode.Children)
- {
+ foreach (var childNode in clickedNode.Children) {
this.items.Insert(clickedIndex + i, childNode);
i++;
}
OnContentNodeExpanded(clickedNode);
- }
- else
- {
+ } else {
// remove whole subtree
int size = SubtreeSize(clickedNode) - 1;
- for (int i = 0; i < size; i++)
- {
+ for (int i = 0; i < size; i++) {
this.items.RemoveAt(clickedIndex + 1);
}
OnContentNodeCollapsed(clickedNode);