[Monodevelop-patches-list] r2416 - in trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn: . Visualizers
Chris Toshok
toshok at mono-cvs.ximian.com
Fri Apr 1 22:49:31 EST 2005
Author: toshok
Date: 2005-04-01 22:49:31 -0500 (Fri, 01 Apr 2005)
New Revision: 2416
Added:
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/DialogDebuggerVisualizer.cs
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IDialogVisualizerService.cs
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IVisualizerObjectProvider.cs
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/Makefile.am
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/TargetObjectProvider.cs
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerDevelopmentHost.cs
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerObjectSource.cs
Modified:
trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
Log:
2005-04-01 Chris Toshok <toshok at ximian.com>
* Visualizers/*: Start of debug visualizer support.
Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog 2005-04-02 03:49:31 UTC (rev 2416)
@@ -1,5 +1,9 @@
2005-04-01 Chris Toshok <toshok at ximian.com>
+ * Visualizers/*: Start of debug visualizer support.
+
+2005-04-01 Chris Toshok <toshok at ximian.com>
+
* Gui/Debugger*Pad.cs: rename to Gui/*Pad.cs (drop the
"Debugger").
Property changes on: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Makefile
*.dll
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/DialogDebuggerVisualizer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/DialogDebuggerVisualizer.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/DialogDebuggerVisualizer.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,14 @@
+using System;
+using Mono.Debugger;
+
+namespace MonoDevelop.DebuggerVisualizers {
+
+ public abstract class DialogDebuggerVisualizer {
+ protected DialogDebuggerVisualizer ()
+ {
+ }
+
+ protected internal abstract void Show (IDialogVisualizerService visualizerService,
+ IVisualizerObjectProvider objectProvider);
+ }
+}
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IDialogVisualizerService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IDialogVisualizerService.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IDialogVisualizerService.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,25 @@
+#if WITH_SWF
+using System.Windows.Forms;
+#endif
+#if WITH_GTK
+using Gtk;
+#endif
+
+namespace MonoDevelop.DebuggerVisualizers
+{
+ public interface IDialogVisualizerService
+ {
+#if WITH_SWF
+ DialogResult ShowDialog (CommonDialog dialog);
+
+ DialogResult ShowDialog (Control control);
+
+ DialogResult ShowDialog (Form form);
+#endif
+#if WITH_GTK
+ int ShowDialog (Dialog dialog);
+
+ int ShowDialog (Widget w);
+#endif
+ }
+}
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IVisualizerObjectProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IVisualizerObjectProvider.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/IVisualizerObjectProvider.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,19 @@
+using System;
+using System.IO;
+
+namespace MonoDevelop.DebuggerVisualizers
+{
+ public interface IVisualizerObjectProvider {
+ bool IsObjectReplaceable { get; }
+
+ Stream GetData();
+ // causes the debuggee to serialize the object, then we
+ // deserialize it into the debugger's address space.
+ object GetObject();
+ void ReplaceData (Stream newObjectData);
+ void ReplaceObject (object newObject);
+ Stream TransferData (Stream outgoingData);
+ object TransferObject (object outgoingObject);
+ }
+}
+
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/Makefile.am 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/Makefile.am 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,38 @@
+
+ASSEMBLY = $(ADDIN_BUILD)/MonoDevelop.Visualizers.dll
+
+DLLS = $(GTK_SHARP_LIBS) \
+ $(MONO_DEBUGGER_LIBS) \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Base.dll \
+ /r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ /r:$(top_builddir)/build/bin/ICSharpCode.SharpRefactory.dll \
+ /pkg:gtk-sharp
+
+
+FILES = \
+ DialogDebuggerVisualizer.cs \
+ IDialogVisualizerService.cs \
+ IVisualizerObjectProvider.cs \
+ TargetObjectProvider.cs \
+ VisualizerDevelopmentHost.cs \
+ VisualizerObjectSource.cs
+
+
+EXTRA_DIST = $(FILES)
+
+if ENABLE_DEBUGGER
+
+all: $(ASSEMBLY)
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+$(ASSEMBLY): $(build_sources)
+ $(CSC) -define:NET_2_0 -define:WITH_GTK -out:$@ -target:library \
+ $(build_sources) $(DLLS)
+
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb
+
+else
+all:
+
+endif
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/TargetObjectProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/TargetObjectProvider.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/TargetObjectProvider.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,67 @@
+using System;
+using System.IO;
+using Mono.Debugger;
+using Mono.Debugger.Languages;
+
+namespace MonoDevelop.DebuggerVisualizers
+{
+
+ public class TargetObjectProvider : IVisualizerObjectProvider
+ {
+ public TargetObjectProvider (ITargetObject obj)
+ {
+ this.obj = obj;
+ throw new NotImplementedException ();
+ }
+
+#region IVisualizerObjectProvider implementation
+
+ public bool IsObjectReplaceable
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+
+ public Stream GetData()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public object GetObject ()
+ {
+ /* first we cause the target object to serialize itself */
+
+ /* then we transfer the data to the debugger process */
+
+ /* and deserialize it */
+
+ throw new NotImplementedException ();
+ }
+
+ public void ReplaceData (Stream newObjectData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ReplaceObject (object newObject)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public Stream TransferData (Stream outgoingData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public object TransferObject (object outgoingObject)
+ {
+ throw new NotImplementedException ();
+ }
+#endregion
+
+ ITargetObject obj;
+ }
+
+}
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerDevelopmentHost.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerDevelopmentHost.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerDevelopmentHost.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,139 @@
+using System;
+using System.IO;
+
+#if WITH_SWF
+using System.Windows.Forms;
+#endif
+#if WITH_GTK
+using Gtk;
+#endif
+
+namespace MonoDevelop.DebuggerVisualizers
+{
+ public class VisualizerDevelopmentHost
+ {
+ class HostObjectProvider : IVisualizerObjectProvider
+ {
+ object obj;
+
+ public HostObjectProvider (object obj)
+ {
+ this.obj = obj;
+ }
+
+ public bool IsObjectReplaceable
+ {
+ get { return false; }
+ }
+
+ public Stream GetData()
+ {
+ return null;
+ }
+
+ public object GetObject()
+ {
+ return obj;
+ }
+
+ public void ReplaceData (Stream newObjectData)
+ {
+ }
+
+ public void ReplaceObject (object newObject)
+ {
+ }
+
+ public Stream TransferData (Stream outgoingData)
+ {
+ return null;
+ }
+
+ public object TransferObject (object outgoingObject)
+ {
+ throw new InvalidOperationException ();
+ }
+
+ }
+
+ object objectToVisualize;
+ Type visualizerType;
+ Type proxyType;
+ bool replacementOK;
+
+ public VisualizerDevelopmentHost (object objectToVisualize, Type visualizerType, Type proxyType, bool replacementOK)
+ {
+ this.objectToVisualize = objectToVisualize;
+ this.visualizerType = visualizerType;
+ this.proxyType = proxyType;
+ this.replacementOK = replacementOK;
+ }
+
+ public VisualizerDevelopmentHost (object objectToVisualize, Type visualizerType, Type proxyType)
+ : this (objectToVisualize, visualizerType, proxyType, false)
+ {
+ }
+
+ public VisualizerDevelopmentHost (object objectToVisualize, Type visualizerType)
+ : this (objectToVisualize, visualizerType, null, false)
+ {
+ }
+
+ public object DebuggeeObject {
+ set {
+ objectToVisualize = value;
+ }
+
+ get {
+ return objectToVisualize;
+ }
+ }
+
+#if WITH_SWF
+ public void ShowVisualizer(IWin32Window parentWindow)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ShowVisualizer(Control parentControl)
+ {
+ throw new NotImplementedException ();
+ }
+
+#endif
+#if WITH_GTK
+ public void ShowVisualizer (Window parentWindow)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ShowVisualizer (Widget parentWidget)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
+
+#if WITH_GTK
+ public bool IdleShow ()
+ {
+ DialogDebuggerVisualizer vis = (DialogDebuggerVisualizer)Activator.CreateInstance (visualizerType);
+
+ vis.Show (null, new HostObjectProvider (objectToVisualize));
+
+ Application.Quit ();
+
+ return false;
+ }
+#endif
+ public void ShowVisualizer()
+ {
+#if WITH_GTK
+ Gtk.Application.Init ();
+
+ GLib.Idle.Add (new GLib.IdleHandler (IdleShow));
+
+ Gtk.Application.Run ();
+#endif
+ }
+ }
+}
Added: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerObjectSource.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerObjectSource.cs 2005-04-02 03:34:43 UTC (rev 2415)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Visualizers/VisualizerObjectSource.cs 2005-04-02 03:49:31 UTC (rev 2416)
@@ -0,0 +1,38 @@
+using System;
+using System.IO;
+
+namespace MonoDevelop.DebuggerVisualizers
+{
+ public class VisualizerObjectSource
+ {
+ public VisualizerObjectSource ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual object CreateReplacementObject (object target, Stream incomingData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static object Deserialize (Stream serializationStream)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GetData (object target, Stream outgoingData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static void Serialize (Stream serializationStream, object target)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static void TransferData (object target, Stream incomingData, Stream outgoingData)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
More information about the Monodevelop-patches-list
mailing list