[Monodevelop-patches-list] r1085 - in trunk/MonoDevelop: . build/AddIns src/AddIns/BackendBindings/CSharpBinding src/Main/Base src/Main/Base/Commands src/Main/Base/Internal/Codons/LanguageBinding src/Main/Base/Internal/Project/Combine
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Mar 3 01:29:43 EST 2004
Author: tberman
Date: 2004-03-03 01:29:43 -0500 (Wed, 03 Mar 2004)
New Revision: 1085
Added:
trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
trunk/MonoDevelop/src/Main/Base/Makefile.am
Log:
added some debugger love. i get a bt from the debugger (woo).
i cant run mdb either, im gonna talk to martin tomorrow and see what the deal is.
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/ChangeLog 2004-03-03 06:29:43 UTC (rev 1085)
@@ -1,3 +1,7 @@
+2004-03-03 Todd Berman <tberman at sevenl.net>
+
+ * bunch o' files: Added first pass debugger support.
+
2004-03-03 John BouAntoun <jba-mono at optusnet.com.au>
* src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs : Changed ShowDialog() to do a Dialog.Run() instead of Dialog.ShowAll().
* src/Main/Base/Internal/Project/Project/AbstractProject.cs : removed comment that said to fix the IncludeFilesDialog
Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-03 06:29:43 UTC (rev 1085)
@@ -54,6 +54,8 @@
class = "ICSharpCode.SharpDevelop.Services.AmbienceService"/>
<Class id = "MenuService"
class = "ICSharpCode.SharpDevelop.Services.MenuService"/>
+ <Class id = "DebuggingService"
+ class = "MonoDevelop.Services.DebuggingService"/>
</Extension>
<Extension path = "/SharpDevelop/Workbench/DisplayBindings">
@@ -744,7 +746,7 @@
<MenuItem id = "Run" label = "${res:XML.MainMenu.RunMenu}">
<Conditional action="Disable">
<Or>
- <Condition activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextAreaControlProvider"/>
+ <Condition activewindow="MonoDevelop.SourceEditor.Gui.SourceEditorDisplayBindingWrapper"/>
<Condition iscombineopen="True"/>
</Or>
@@ -780,7 +782,11 @@
description = "${res:XML.MainMenu.RunMenu.Run.Description}"
shortcut = "F5"
class = "ICSharpCode.SharpDevelop.Commands.RunCommand"/>
- </Conditional>
+
+ <MenuItem id = "DebugProject"
+ label = "Debug Project"
+ class = "MonoDevelop.Commands.DebugProject"/>
+ </Conditional>
</MenuItem>
<MenuItem id = "Tools"
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -19,6 +19,7 @@
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core.Services;
+using MonoDevelop.Services;
namespace CSharpBinding
{
@@ -27,6 +28,16 @@
/// </summary>
public class CSharpBindingExecutionManager
{
+ public void Debug (IProject project)
+ {
+ FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.Services.GetService (typeof (FileUtilityService));
+ string directory = fileUtilityService.GetDirectoryNameWithSeparator(((CSharpCompilerParameters)project.ActiveConfiguration).OutputDirectory);
+ string exe = ((CSharpCompilerParameters)project.ActiveConfiguration).OutputAssembly + ".exe";
+
+ DebuggingService dbgr = (DebuggingService) ServiceManager.Services.GetService (typeof (DebuggingService));
+ dbgr.Run (new string[] { Path.Combine (directory, exe) } );
+ }
+
public void Execute(string filename)
{
string exe = Path.ChangeExtension(filename, ".exe");
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -45,6 +45,11 @@
Debug.Assert(executionManager != null);
executionManager.Execute(project);
}
+
+ public void DebugProject (IProject project)
+ {
+ executionManager.Debug (project);
+ }
public string GetCompiledOutputName(string fileName)
{
Added: trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -0,0 +1,37 @@
+using System;
+
+using MonoDevelop.Services;
+
+using ICSharpCode.Core.AddIns.Codons;
+using ICSharpCode.SharpDevelop.Services;
+using ICSharpCode.Core.Services;
+
+namespace MonoDevelop.Commands
+{
+
+ public class DebugProject : AbstractMenuCommand
+ {
+
+ public override void Run ()
+ {
+
+ IProjectService projServ = (IProjectService)ServiceManager.Services.GetService (typeof (IProjectService));
+
+ if (projServ.CurrentOpenCombine != null) {
+ //try {
+ if (projServ.NeedsCompiling) {
+ projServ.CompileCombine ();
+ }
+ projServ.OnBeforeStartProject ();
+ projServ.CurrentOpenCombine.Debug ();
+ //} catch {
+ IMessageService msgServ = (IMessageService)ServiceManager.Services.GetService (typeof (IMessageService));
+ msgServ.ShowError ("Can't execute the debugger");
+ //}
+ }
+
+ }
+
+ }
+
+}
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -32,6 +32,8 @@
/// the file was compiled by the compiler object before.
/// </summary>
void Execute(string fileName);
+
+ void DebugProject (IProject project);
/// <summary>
/// This function executes a project, the project is given as a parameter,
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -408,6 +408,12 @@
StartProject(entrynum);
}
+ public void Debug ()
+ {
+ CombineEntry entry = (CombineEntry)entries[GetEntryNumber (startProject)];
+ entry.Debug ();
+ }
+
public void Execute()
{
if (singleStartup) {
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -19,6 +19,8 @@
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.SharpDevelop.Services;
+using MonoDevelop.Services;
+
namespace ICSharpCode.SharpDevelop.Internal.Project
{
public abstract class CombineEntry : IDisposable
@@ -66,6 +68,7 @@
public abstract void Build(bool doBuildAll);
public abstract void Execute();
public abstract void Save();
+ public abstract void Debug ();
}
public class ProjectCombineEntry : CombineEntry
@@ -190,6 +193,20 @@
}
}
+
+ public override void Debug ()
+ {
+ LanguageBindingService langBindingServ = (LanguageBindingService)ICSharpCode.Core.Services.ServiceManager.Services.GetService (typeof (LanguageBindingService));
+ ILanguageBinding binding = langBindingServ.GetBindingPerLanguageName (project.ProjectType);
+ if (binding == null) {
+ Console.WriteLine ("Language binding unknown");
+ return;
+ }
+ TaskService taskService = (TaskService)ICSharpCode.Core.Services.ServiceManager.Services.GetService (typeof (TaskService));
+
+ if (taskService.Errors == 0)
+ binding.DebugProject (project);
+ }
public override void Save()
{
@@ -232,5 +249,10 @@
combine.SaveCombine(System.IO.Path.GetFullPath (Filename));
combine.SaveAllProjects();
}
+
+ public override void Debug ()
+ {
+ combine.Debug ();
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-03 06:29:43 UTC (rev 1085)
@@ -163,6 +163,7 @@
./Commands/AutostartCommands.cs \
./Commands/ToolsCommands.cs \
./Commands/MenuItemBuilders.cs \
+./Commands/DebuggerCommands.cs \
./Services/File/IFileService.cs \
./Services/File/DefaultFileService.cs \
./Services/File/FileEventArgs.cs \
More information about the Monodevelop-patches-list
mailing list