Browse Source

- added Grid visualizer window

- refactored ObjectProperty - will be used in both Grid and Graph visualizers

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4318 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Martin Koníček 17 years ago
parent
commit
000009056b
  1. 12
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin
  2. 14
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj
  3. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedNode.cs
  4. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedNodeProperty.cs
  5. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/Tree/TreeLayouter.cs
  6. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs
  7. 23
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs
  8. 14
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectNode.cs
  9. 1
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ShowObjectGraphVisualizerCommand.cs
  10. 120
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/WinFormsControl.resx
  11. 40
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/GridVisualizerWindow.xaml
  12. 29
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/GridVisualizerWindow.xaml.cs
  13. 32
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ObjectValue.cs
  14. 24
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ShowGridVisualizerCommand.cs
  15. 38
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs
  16. 37
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ValueProviders/ListValuesProvider.cs
  17. 23
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/ObjectProperty.cs

12
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin

@ -153,10 +153,18 @@
<Path name = "/Workspace/Tools"> <Path name = "/Workspace/Tools">
<Condition name="SolutionOpen" action="disable"> <Condition name="SolutionOpen" action="disable">
<MenuItem id = "DebuggerVisualizerCommandShow" <MenuItem id = "DebuggerObjectGraphVisualizerShowCommand"
label = "Show object graph visualizer" label = "Object graph visualizer"
class = "Debugger.AddIn.Visualizers.Graph.ShowObjectGraphVisualizerCommand"/> class = "Debugger.AddIn.Visualizers.Graph.ShowObjectGraphVisualizerCommand"/>
</Condition> </Condition>
</Path> </Path>
<Path name = "/Workspace/Tools">
<Condition name="SolutionOpen" action="disable">
<MenuItem id = "DebuggerGridVisualizerShowCommand"
label = "Grid visualizer"
class = "Debugger.AddIn.Visualizers.GridVisualizer.ShowGridVisualizerCommand"/>
</Condition>
</Path>
</AddIn> </AddIn>

14
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj

@ -146,7 +146,6 @@
<EmbeddedResource Include="Src\Service\EditBreakpointScriptForm.resx"> <EmbeddedResource Include="Src\Service\EditBreakpointScriptForm.resx">
<DependentUpon>EditBreakpointScriptForm.cs</DependentUpon> <DependentUpon>EditBreakpointScriptForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Src\Visualizers\Graph\WinFormsControl.resx" />
<Compile Include="Src\Service\SetCurrentStatementCommand.cs" /> <Compile Include="Src\Service\SetCurrentStatementCommand.cs" />
<Compile Include="..\..\..\..\..\Main\GlobalAssemblyInfo.cs"> <Compile Include="..\..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link> <Link>Configuration\GlobalAssemblyInfo.cs</Link>
@ -200,8 +199,17 @@
<Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectGraph.cs" /> <Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectGraph.cs" />
<Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectGraphBuilder.cs" /> <Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectGraphBuilder.cs" />
<Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectNode.cs" /> <Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectNode.cs" />
<Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectProperty.cs" /> <Compile Include="Src\Visualizers\Graph\ObjectGraph\ObjectGraphProperty.cs" />
<Compile Include="Src\Visualizers\Graph\ShowObjectGraphVisualizerCommand.cs" /> <Compile Include="Src\Visualizers\Graph\ShowObjectGraphVisualizerCommand.cs" />
<Compile Include="Src\Visualizers\GridVisualizer\GridVisualizerWindow.xaml.cs">
<DependentUpon>GridVisualizerWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Visualizers\GridVisualizer\ObjectValue.cs" />
<Compile Include="Src\Visualizers\GridVisualizer\ShowGridVisualizerCommand.cs" />
<Compile Include="Src\Visualizers\GridVisualizer\ValueProviders\EnumerableValuesProvider.cs" />
<Compile Include="Src\Visualizers\GridVisualizer\ValueProviders\ListValuesProvider.cs" />
<Compile Include="Src\Visualizers\ObjectProperty.cs" />
<Compile Include="Src\Visualizers\Utils\DebuggerHelpers.cs" /> <Compile Include="Src\Visualizers\Utils\DebuggerHelpers.cs" />
<Compile Include="Src\Visualizers\Utils\DictionaryExtensions.cs" /> <Compile Include="Src\Visualizers\Utils\DictionaryExtensions.cs" />
<Compile Include="Src\Visualizers\Utils\Lookup.cs" /> <Compile Include="Src\Visualizers\Utils\Lookup.cs" />
@ -275,6 +283,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Src\Visualizers\GridVisualizer\GridVisualizerWindow.xaml" />
<ProjectReference Include="..\..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj"> <ProjectReference Include="..\..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj">
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project> <Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project>
<Name>NRefactory</Name> <Name>NRefactory</Name>
@ -296,6 +305,7 @@
<Folder Include="Src\Visualizers\Graph\Layout\Tree" /> <Folder Include="Src\Visualizers\Graph\Layout\Tree" />
<Folder Include="Src\Visualizers\Graph\Graphviz" /> <Folder Include="Src\Visualizers\Graph\Graphviz" />
<Folder Include="Src\Visualizers\Graph\ObjectGraph" /> <Folder Include="Src\Visualizers\Graph\ObjectGraph" />
<Folder Include="Src\Visualizers\GridVisualizer\ValueProviders" />
<Folder Include="Src\Visualizers\Utils" /> <Folder Include="Src\Visualizers\Utils" />
<Folder Include="Src\Visualizers\GridVisualizer" /> <Folder Include="Src\Visualizers\GridVisualizer" />
<Folder Include="Src\Visualizers\PresentationBindings" /> <Folder Include="Src\Visualizers\PresentationBindings" />

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

@ -37,7 +37,7 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
} }
} }
public PositionedNodeProperty AddProperty(ObjectProperty objectProperty, bool isExpanded) public PositionedNodeProperty AddProperty(ObjectGraphProperty objectProperty, bool isExpanded)
{ {
var newProperty = new PositionedNodeProperty(objectProperty, this); var newProperty = new PositionedNodeProperty(objectProperty, this);
newProperty.IsExpanded = isExpanded; newProperty.IsExpanded = isExpanded;

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/Layout/PositionedNodeProperty.cs

@ -17,7 +17,7 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
/// Creates new PositionedNodeProperty. /// Creates new PositionedNodeProperty.
/// </summary> /// </summary>
/// <param name="objectProperty">Underlying <see cref="ObjectProperty"/></param> /// <param name="objectProperty">Underlying <see cref="ObjectProperty"/></param>
public PositionedNodeProperty(ObjectProperty objectProperty, PositionedNode containingNode) public PositionedNodeProperty(ObjectGraphProperty objectProperty, PositionedNode containingNode)
{ {
this.objectProperty = objectProperty; this.objectProperty = objectProperty;
this.containingNode = containingNode; this.containingNode = containingNode;
@ -25,11 +25,11 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
public bool IsExpanded { get; set; } public bool IsExpanded { get; set; }
private ObjectProperty objectProperty; private ObjectGraphProperty objectProperty;
/// <summary> /// <summary>
/// Underlying <see cref="ObjectProperty"/>. /// Underlying <see cref="ObjectProperty"/>.
/// </summary> /// </summary>
public ObjectProperty ObjectProperty public ObjectGraphProperty ObjectProperty
{ {
get { return this.objectProperty; } get { return this.objectProperty; }
} }

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

@ -64,7 +64,7 @@ namespace Debugger.AddIn.Visualizers.Graph.Layout
treeNodeFor[objectGraphNode] = newTreeNode; treeNodeFor[objectGraphNode] = newTreeNode;
double subtreeSize = 0; double subtreeSize = 0;
foreach (ObjectProperty property in objectGraphNode.Properties) foreach (ObjectGraphProperty property in objectGraphNode.Properties)
{ {
if (property.TargetNode != null) if (property.TargetNode != null)
{ {

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

@ -168,7 +168,7 @@ namespace Debugger.AddIn.Visualizers.Graph
/// <param name="expandedNodes"></param> /// <param name="expandedNodes"></param>
private void loadChildrenRecursive(ObjectNode thisNode, ExpandedNodes expandedNodes) private void loadChildrenRecursive(ObjectNode thisNode, ExpandedNodes expandedNodes)
{ {
foreach(ObjectProperty complexProperty in thisNode.ComplexProperties) foreach(ObjectGraphProperty complexProperty in thisNode.ComplexProperties)
{ {
Expression memberExpr = complexProperty.Expression; Expression memberExpr = complexProperty.Expression;
ObjectNode targetNode = null; ObjectNode targetNode = null;

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

@ -0,0 +1,23 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníček" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.Text;
namespace Debugger.AddIn.Visualizers.Graph
{
/// <summary>
/// ObjectProperty used in ObjectGraph. Has TargetNode.
/// </summary>
public class ObjectGraphProperty : ObjectProperty
{
/// <summary>
/// Node that this property points to. Can be null. Always null if <see cref="IsAtomic"/> is true.
/// </summary>
public ObjectNode TargetNode { get; set; }
}
}

14
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectNode.cs

@ -46,9 +46,9 @@ namespace Debugger.AddIn.Visualizers.Graph
_edges.Add(new ObjectEdge { Name = edgeName, SourceNode = this, TargetNode = targetNode }); _edges.Add(new ObjectEdge { Name = edgeName, SourceNode = this, TargetNode = targetNode });
}*/ }*/
class PropertyComparer : IComparer<ObjectProperty> class PropertyComparer : IComparer<ObjectGraphProperty>
{ {
public int Compare(ObjectProperty prop1, ObjectProperty prop2) public int Compare(ObjectGraphProperty prop1, ObjectGraphProperty prop2)
{ {
// order by IsAtomic, Name // order by IsAtomic, Name
int atomic = prop2.IsAtomic.CompareTo(prop1.IsAtomic); int atomic = prop2.IsAtomic.CompareTo(prop1.IsAtomic);
@ -67,11 +67,11 @@ namespace Debugger.AddIn.Visualizers.Graph
private bool sorted = false; private bool sorted = false;
private List<ObjectProperty> properties = new List<ObjectProperty>(); private List<ObjectGraphProperty> properties = new List<ObjectGraphProperty>();
/// <summary> /// <summary>
/// Properties (either atomic or complex) of the object this node represents. /// Properties (either atomic or complex) of the object this node represents.
/// </summary> /// </summary>
public List<ObjectProperty> Properties public List<ObjectGraphProperty> Properties
{ {
get get
{ {
@ -86,7 +86,7 @@ namespace Debugger.AddIn.Visualizers.Graph
/// <summary> /// <summary>
/// Only complex properties filtered out of <see cref="Properties"/> /// Only complex properties filtered out of <see cref="Properties"/>
/// </summary> /// </summary>
public IEnumerable<ObjectProperty> ComplexProperties public IEnumerable<ObjectGraphProperty> ComplexProperties
{ {
get get
{ {
@ -103,7 +103,7 @@ namespace Debugger.AddIn.Visualizers.Graph
/// </summary> /// </summary>
internal void AddAtomicProperty(string name, string value, Expression expression) internal void AddAtomicProperty(string name, string value, Expression expression)
{ {
properties.Add(new ObjectProperty properties.Add(new ObjectGraphProperty
{ Name = name, Value = value, Expression = expression, IsAtomic = true, TargetNode = null }); { Name = name, Value = value, Expression = expression, IsAtomic = true, TargetNode = null });
} }
@ -112,7 +112,7 @@ namespace Debugger.AddIn.Visualizers.Graph
/// </summary> /// </summary>
internal void AddComplexProperty(string name, string value, Expression expression, ObjectNode targetNode, bool isNull) internal void AddComplexProperty(string name, string value, Expression expression, ObjectNode targetNode, bool isNull)
{ {
properties.Add(new ObjectProperty properties.Add(new ObjectGraphProperty
{ Name = name, Value = value, Expression = expression, IsAtomic = false, TargetNode = targetNode, IsNull = isNull }); { Name = name, Value = value, Expression = expression, IsAtomic = false, TargetNode = targetNode, IsNull = isNull });
} }
} }

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

@ -6,7 +6,6 @@
// </file> // </file>
using System; using System;
using System.Text; using System.Text;
using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;

120
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/WinFormsControl.resx

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

40
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/GridVisualizerWindow.xaml

@ -0,0 +1,40 @@
<Window x:Class="Debugger.AddIn.Visualizers.GridVisualizer.GridVisualizerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dv="clr-namespace:Debugger.AddIn.Visualizers.Graph"
Title="Grid visualizer" Height="350" Width="600">
<StackPanel>
<StackPanel Orientation="Vertical" Background="AliceBlue">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0 0 8 0" />
</Style>
<Style TargetType="Button">
<Setter Property="Margin" Value="8 0 0 0" />
<Setter Property="Padding" Value="8 0 8 0" />
</Style>
</StackPanel.Resources>
<Border Margin="3" Padding="3">
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center">Expression:</TextBlock>
<TextBox Name="txtExpression" VerticalAlignment="Center" Width="100"></TextBox>
<Button>Inspect</Button>
</StackPanel>
</Border>
<ListView Height="280" Name="listView">
<ListView.View>
<GridView>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
<Canvas Name="canvas" Margin="4">
</Canvas>
</StackPanel>
</Window>

29
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/GridVisualizerWindow.xaml.cs

@ -0,0 +1,29 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníček" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
namespace Debugger.AddIn.Visualizers.GridVisualizer
{
/// <summary>
/// Interaction logic for GridVisualizerWindow.xaml
/// </summary>
public partial class GridVisualizerWindow : Window
{
public GridVisualizerWindow()
{
InitializeComponent();
}
}
}

32
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ObjectValue.cs

@ -0,0 +1,32 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníček" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using Debugger.AddIn.Visualizers.Utils;
namespace Debugger.AddIn.Visualizers.GridVisualizer
{
/// <summary>
/// Description of ObjectValue.
/// </summary>
public class ObjectValue
{
private Dictionary<string, ObjectProperty> properties = new Dictionary<string, ObjectProperty>();
public ObjectProperty this[string key]
{
get
{
return properties.GetValue(key);
}
set
{
properties[key] = value;
}
}
}
}

24
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ShowGridVisualizerCommand.cs

@ -0,0 +1,24 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníèek" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using ICSharpCode.Core;
using System;
namespace Debugger.AddIn.Visualizers.GridVisualizer
{
/// <summary>
/// Description of ShowGridVisualizerCommand.
/// </summary>
public class ShowGridVisualizerCommand : AbstractMenuCommand
{
public override void Run()
{
GridVisualizerWindow window = new GridVisualizerWindow();
window.Topmost = true;
window.Show();
}
}
}

38
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs

@ -0,0 +1,38 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníček" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using Debugger.Expressions;
using ICSharpCode.SharpDevelop.Services;
using System.Collections.Generic;
namespace Debugger.AddIn.Visualizers.GridVisualizer.ValueProviders
{
/// <summary>
/// Provides <see cref="ObjectValue"/>s for debugee objects implementing IEnumerable.
/// </summary>
public class EnumerableValuesProvider
{
private WindowsDebugger debugger;
public EnumerableValuesProvider(WindowsDebugger debuggerService, Expression targetObject)
{
this.debugger = debuggerService;
this.itemsSource = enumerateItems(targetObject);
}
private IEnumerable<ObjectValue> itemsSource;
public IEnumerable<ObjectValue> ItemsSource
{
get { return this.itemsSource; }
}
private IEnumerable<ObjectValue> enumerateItems(Expression targetObject)
{
return null;
}
}
}

37
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ValueProviders/ListValuesProvider.cs

@ -0,0 +1,37 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Martin Koníček" email="martin.konicek@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.SharpDevelop.Services;
using Debugger.Expressions;
namespace Debugger.AddIn.Visualizers.GridVisualizer.ValueProviders
{
/// <summary>
/// Provides <see cref="ObjectValue"/>s for debugee objects implementing IList.
/// </summary>
public class ListValuesProvider
{
private WindowsDebugger debugger;
private Expression targetObject;
public ListValuesProvider(WindowsDebugger debuggerService, Expression targetObject)
{
this.debugger = debuggerService;
this.targetObject = targetObject;
}
public int GetCount()
{
return -1;
}
public ObjectValue GetItemAt(int index)
{
return null;
}
}
}

23
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/Graph/ObjectGraph/ObjectProperty.cs → src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/ObjectProperty.cs

@ -5,17 +5,15 @@
// <version>$Revision$</version> // <version>$Revision$</version>
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Text;
namespace Debugger.AddIn.Visualizers.Graph namespace Debugger.AddIn.Visualizers
{ {
/// <summary> /// <summary>
/// Primitive property of an object, in string form. /// Property of an object, in string form.
/// </summary> /// </summary>
public class ObjectProperty public class ObjectProperty
{ {
/// <summary> /// <summary>
/// e.g. "Age" /// e.g. "Age"
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; }
@ -35,14 +33,9 @@ namespace Debugger.AddIn.Visualizers.Graph
/// </summary> /// </summary>
public bool IsAtomic { get; set; } public bool IsAtomic { get; set; }
/// <summary>
/// Node that this property points to. Can be null. Always null if <see cref="IsAtomic"/> is true.
/// </summary>
public ObjectNode TargetNode { get; set; }
/// <summary> /// <summary>
/// Is this property value null? Only meaningful if <see cref="IsAtomic"/> is false. /// Is this property value null? Only meaningful if <see cref="IsAtomic"/> is false.
/// </summary> /// </summary>
public bool IsNull { get; set; } public bool IsNull { get; set; }
} }
} }
Loading…
Cancel
Save