Index: /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers.sln
===================================================================
--- /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers.sln (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers.sln (revision 6374)
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestDebuggerVisualizers", "TestDebuggerVisualizers\TestDebuggerVisualizers.csproj", "{7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.DebuggerVisualizers", "HeuristicLab.DebuggerVisualizers\HeuristicLab.DebuggerVisualizers.csproj", "{81995D7A-E5ED-4A5D-87DE-EF2B259997FE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|x86.ActiveCfg = Debug|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Debug|x86.Build.0 = Debug|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Release|Any CPU.ActiveCfg = Release|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Release|Mixed Platforms.Build.0 = Release|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Release|x86.ActiveCfg = Release|x86
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}.Release|x86.Build.0 = Release|x86
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|x86.ActiveCfg = Debug|x86
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Debug|x86.Build.0 = Debug|x86
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Index: /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLab.DebuggerVisualizers.csproj
===================================================================
--- /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLab.DebuggerVisualizers.csproj (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLab.DebuggerVisualizers.csproj (revision 6374)
@@ -0,0 +1,113 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}
+ Library
+ Properties
+ HeuristicLab.DebuggerVisualizers
+ HeuristicLab.DebuggerVisualizers
+ v4.0
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ bin\Debug\HeuristicLab.DebuggerVisualizers.dll.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+ false
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ pdbonly
+ x86
+ bin\Release\HeuristicLab.DebuggerVisualizers.dll.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ false
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ false
+ false
+
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+
+xcopy "$(SolutionDir)$(ProjectName)\$(OutDir)$(TargetFileName)" "$(USERPROFILE)\Documents\Visual Studio 2010\Visualizers" /y
+xcopy "$(SolutionDir)$(ProjectName)\$(OutDir)HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll" "$(USERPROFILE)\Documents\Visual Studio 2010\Visualizers" /y
+
+
+
Index: /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLabVisualizerObjectSource.cs
===================================================================
--- /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLabVisualizerObjectSource.cs (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/HeuristicLabVisualizerObjectSource.cs (revision 6374)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see .
+ */
+#endregion
+
+using System.IO;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.Xml;
+using Microsoft.VisualStudio.DebuggerVisualizers;
+
+namespace HeuristicLab.DebuggerVisualizers {
+ public class HeuristicLabVisualizerObjectSource : VisualizerObjectSource {
+ private static Configuration config;
+ public HeuristicLabVisualizerObjectSource()
+ : base() {
+ config = ConfigurationService.Instance.GetConfiguration(new XmlFormat());
+ }
+
+ public override void GetData(object target, Stream outgoingData) {
+ //XmlGenerator.Serialize(target, outgoingData);
+ byte[] serializedObjectByteArray;
+ using (MemoryStream memStream = new MemoryStream()) {
+ XmlGenerator.Serialize(target, memStream, config);
+ serializedObjectByteArray = memStream.ToArray();
+ }
+
+ base.GetData(serializedObjectByteArray, outgoingData);
+ }
+ }
+}
Index: /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/Properties/AssemblyInfo.cs (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/Properties/AssemblyInfo.cs (revision 6374)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.DebuggerVisualizers")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("HeuristicLab.DebuggerVisualizers")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5cf2855d-4ba8-470f-a432-bbf2b9c3a4b0")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/SymbolicExpressionTreeVisualizer.cs
===================================================================
--- /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/SymbolicExpressionTreeVisualizer.cs (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/HeuristicLab.DebuggerVisualizers/SymbolicExpressionTreeVisualizer.cs (revision 6374)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see .
+ */
+#endregion
+
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.Persistence.Default.Xml;
+using Microsoft.VisualStudio.DebuggerVisualizers;
+
+[assembly: DebuggerVisualizer(
+typeof(HeuristicLab.DebuggerVisualizers.SymbolicExpressionTreeVisualizer),
+typeof(HeuristicLab.DebuggerVisualizers.HeuristicLabVisualizerObjectSource),
+Target = typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SymbolicExpressionTreeNode),
+Description = "Visual Symbolic Expression Tree Node Debugger")]
+
+namespace HeuristicLab.DebuggerVisualizers {
+ public class SymbolicExpressionTreeVisualizer : DialogDebuggerVisualizer {
+ public SymbolicExpressionTreeVisualizer() : base() { }
+
+ protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) {
+ if (windowService == null)
+ throw new ArgumentNullException("windowService");
+ if (objectProvider == null)
+ throw new ArgumentNullException("objectProvider");
+
+ ISymbolicExpressionTreeNode treeNode;
+ byte[] serializedObjectByteArray = objectProvider.GetObject() as byte[];
+ using (MemoryStream memStream = new MemoryStream(serializedObjectByteArray)) {
+ treeNode = XmlParser.Deserialize(memStream);
+ }
+
+ using (Form displayForm = new Form()) {
+ var graphicalSymbolicExpressionTreeChart = new SymbolicExpressionTreeChart();
+ graphicalSymbolicExpressionTreeChart.Tree = new SymbolicExpressionTree(treeNode);
+ graphicalSymbolicExpressionTreeChart.Dock = DockStyle.Fill;
+
+ displayForm.Controls.Add(graphicalSymbolicExpressionTreeChart);
+ displayForm.Text = treeNode.ToString();
+
+ windowService.ShowDialog(displayForm);
+ }
+ }
+
+ public static void TestShowVisualizer(object objectToVisualize) {
+ VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(SymbolicExpressionTreeVisualizer), typeof(HeuristicLabVisualizerObjectSource));
+ visualizerHost.ShowVisualizer();
+ }
+ }
+}
Index: /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Program.cs
===================================================================
--- /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Program.cs (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Program.cs (revision 6374)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see .
+ */
+#endregion
+
+using HeuristicLab.DebuggerVisualizers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace TestDebuggerVisualizers {
+ public class Program {
+ public static void Main(string[] args) {
+ var rootSymbol = new ProgramRootSymbol().CreateTreeNode();
+ var startSymbol = new StartSymbol().CreateTreeNode();
+ var defunSymbol = new Defun().CreateTreeNode();
+ var invokeSymbol = new InvokeFunction("ADF 1").CreateTreeNode();
+
+ rootSymbol.AddSubtree(startSymbol);
+ rootSymbol.AddSubtree(defunSymbol);
+ startSymbol.AddSubtree(invokeSymbol);
+
+ SymbolicExpressionTreeVisualizer.TestShowVisualizer(rootSymbol);
+ }
+ }
+}
Index: /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Properties/AssemblyInfo.cs (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/Properties/AssemblyInfo.cs (revision 6374)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("TestDebuggerVisualizers")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("TestDebuggerVisualizers")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d6f3d01e-9598-4398-a839-22265e492c8c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/TestDebuggerVisualizers.csproj
===================================================================
--- /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/TestDebuggerVisualizers.csproj (revision 6374)
+++ /trunk/tools/DebuggerVisualizer/TestDebuggerVisualizers/TestDebuggerVisualizers.csproj (revision 6374)
@@ -0,0 +1,104 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {7F822D16-43E5-46DD-AD6C-BD92FF1FEDB6}
+ Exe
+ Properties
+ TestDebuggerVisualizers
+ TestDebuggerVisualizers
+ v4.0
+ 512
+
+
+
+ x86
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ bin\Debug\TestDebuggerVisualizers.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\TestDebuggerVisualizers.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll
+
+
+ ..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {81995D7A-E5ED-4A5D-87DE-EF2B259997FE}
+ HeuristicLab.DebuggerVisualizers
+
+
+
+
+