[Monodevelop-patches-list] r2495 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Commands Gui/Workbench Services/DebuggerService Services/Project

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Sat Apr 30 10:22:53 EDT 2005


Author: lluis
Date: 2005-04-30 10:22:53 -0400 (Sat, 30 Apr 2005)
New Revision: 2495

Added:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/DebugCommands.cs
Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectCommands.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Workbench/DefaultWorkbench.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DebuggerService/IDebuggerService.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/ProjectService.cs
Log:
2005-04-30  Lluis Sanchez Gual  <lluis at novell.com> 

	* Commands/ProjectCommands.cs: Added new build and run commands.
	* Services/DebuggerService/IDebuggerService.cs: Added some methods.
	* Services/Project/ProjectService.cs: Allow building a project even
	if there isn't an open combine.
	* Gui/Workbench/DefaultWorkbench.cs: Gui safe subscription to debugger
	events.
	* Makefile.am: added DebugCommands.
	* MonoDevelopCore.addin.xml: Added some missing descriptions. Registered
	new project and debug commands.



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-04-30 14:22:53 UTC (rev 2495)
@@ -1,3 +1,15 @@
+2005-04-30  Lluis Sanchez Gual  <lluis at novell.com> 
+
+	* Commands/ProjectCommands.cs: Added new build and run commands.
+	* Services/DebuggerService/IDebuggerService.cs: Added some methods.
+	* Services/Project/ProjectService.cs: Allow building a project even
+	if there isn't an open combine.
+	* Gui/Workbench/DefaultWorkbench.cs: Gui safe subscription to debugger
+	events.
+	* Makefile.am: added DebugCommands.
+	* MonoDevelopCore.addin.xml: Added some missing descriptions. Registered
+	new project and debug commands.
+
 2005-04-27  Lluis Sanchez Gual  <lluis at novell.com> 
 
 	* Commands/ViewCommands.cs: Use markup for the view list menu.

Added: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/DebugCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/DebugCommands.cs	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/DebugCommands.cs	2005-04-30 14:22:53 UTC (rev 2495)
@@ -0,0 +1,119 @@
+
+using System;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns;
+using MonoDevelop.Gui.Widgets;
+
+namespace MonoDevelop.Commands
+{
+	public enum DebugCommands
+	{
+		DebugApplication,
+		ToggleBreakpoint,
+		StepOver,
+		StepInto,
+		StepOut,
+		Pause,
+		ClearAllBreakpoints
+	}
+	
+	public class DebugApplicationHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			using (FileSelector fs = new FileSelector (GettextCatalog.GetString ("Application to Debug"))) {
+				int response = fs.Run ();
+				string name = fs.Filename;
+				fs.Hide ();
+				if (response == (int)Gtk.ResponseType.Ok)
+					Runtime.ProjectService.DebugApplication (name);
+			}
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			info.Enabled = Runtime.DebuggingService != null &&
+							Runtime.ProjectService.CurrentRunOperation.IsCompleted;
+		}
+	}
+	
+	public class StepOverHandler : CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.DebuggingService.StepOver();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.DebuggingService == null)
+				info.Visible = false;
+			else
+				info.Enabled = Runtime.DebuggingService.IsDebugging;
+		}
+	}
+
+	public class StepIntoHandler : CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.DebuggingService.StepInto();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.DebuggingService == null)
+				info.Visible = false;
+			else
+				info.Enabled = Runtime.DebuggingService.IsDebugging;
+		}
+	}
+	
+	public class StepOutHandler : CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.DebuggingService.StepOut ();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.DebuggingService == null)
+				info.Visible = false;
+			else
+				info.Enabled = Runtime.DebuggingService.IsDebugging;
+		}
+	}
+	
+	public class PauseDebugHandler : CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.DebuggingService.Pause ();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.DebuggingService == null)
+				info.Visible = false;
+			else
+				info.Enabled = Runtime.DebuggingService.IsRunning;
+		}
+	}
+	
+	public class ClearAllBreakpointsHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.DebuggingService.ClearAllBreakpoints ();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.DebuggingService == null)
+				info.Visible = false;
+		}
+	}
+}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectCommands.cs	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectCommands.cs	2005-04-30 14:22:53 UTC (rev 2495)
@@ -17,7 +17,6 @@
 {
 	public enum ProjectCommands
 	{
-		Compile,
 		AddNewProject,
 		AddNewCombine,
 		AddProject,
@@ -31,49 +30,34 @@
 		NewFolder,
 		IncludeToProject,
 		Build,
+		BuildSolution,
 		Rebuild,
+		RebuildSolution,
 		SetAsStartupProject,
 		GenerateMakefiles,
+		RunEntry,
 		Run,
 		IncludeInBuild,
 		IncludeInDeploy,
 		Deploy,
 		ConfigurationSelector,
 		Debug,
+		DebugEntry,
 		DebugApplication,
-		Stop
+		Stop,
+		Clean,
+		CleanSolution
 	}
 	
-	public class CompileHandler: CommandHandler
-	{
-		protected override void Run ()
-		{
-			IProjectService projectService = Runtime.ProjectService;
-			if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
-				Runtime.FileService.SaveFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow);
-				projectService.BuildFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
-			}
-		}
-		
-		protected override void Update (CommandInfo info)
-		{
-			info.Enabled = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null;
-		}
-	}
-	
 	public class RunHandler: CommandHandler
 	{
-		CombineEntry entry;
 		string file;
 		
 		protected override void Run ()
 		{
 			if (Runtime.ProjectService.CurrentOpenCombine != null) {
-				entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
-				if (entry != null) {
-					IAsyncOperation op = Runtime.ProjectService.Build (entry);
-					op.Completed += new OperationHandler (ExecuteCombine);
-				}
+				IAsyncOperation op = Runtime.ProjectService.Build (Runtime.ProjectService.CurrentOpenCombine);
+				op.Completed += new OperationHandler (ExecuteCombine);
 			} else {
 				if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
 					file = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName;
@@ -86,8 +70,7 @@
 		protected override void Update (CommandInfo info)
 		{
 			if (Runtime.ProjectService.CurrentOpenCombine != null) {
-				info.Enabled = Runtime.ProjectService.CurrentSelectedCombineEntry != null && 
-								Runtime.ProjectService.CurrentRunOperation.IsCompleted;
+				info.Enabled = Runtime.ProjectService.CurrentRunOperation.IsCompleted;
 			} else {
 				info.Enabled = (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null);
 			}
@@ -96,7 +79,7 @@
 		void ExecuteCombine (IAsyncOperation op)
 		{
 			if (op.Success)
-				Runtime.ProjectService.Execute (entry);
+				Runtime.ProjectService.Execute (Runtime.ProjectService.CurrentOpenCombine);
 		}
 		
 		void ExecuteFile (IAsyncOperation op)
@@ -106,19 +89,46 @@
 		}
 	}
 	
+	
+	public class RunEntryHandler: CommandHandler
+	{
+		CombineEntry entry;
+		
+		protected override void Run ()
+		{
+			entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
+			IAsyncOperation op = Runtime.ProjectService.Build (entry);
+			op.Completed += new OperationHandler (ExecuteCombine);
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			info.Enabled = Runtime.ProjectService.CurrentSelectedCombineEntry != null && 
+							Runtime.ProjectService.CurrentRunOperation.IsCompleted;
+		}
+		
+		void ExecuteCombine (IAsyncOperation op)
+		{
+			if (op.Success)
+				Runtime.ProjectService.Execute (entry);
+		}
+	}
+	
+	
 	public class DebugHandler: CommandHandler
 	{
-		CombineEntry entry;
 		string file;
 		
 		protected override void Run ()
 		{
+			if (Runtime.DebuggingService != null && Runtime.DebuggingService.IsDebugging && !Runtime.DebuggingService.IsRunning) {
+				Runtime.DebuggingService.Resume ();
+				return;
+			}
+			
 			if (Runtime.ProjectService.CurrentOpenCombine != null) {
-				entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
-				if (entry != null) {
-					IAsyncOperation op = Runtime.ProjectService.Build (entry);
-					op.Completed += new OperationHandler (ExecuteCombine);
-				}
+				IAsyncOperation op = Runtime.ProjectService.Build (Runtime.ProjectService.CurrentOpenCombine);
+				op.Completed += new OperationHandler (ExecuteCombine);
 			} else {
 				if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
 					file = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName;
@@ -130,13 +140,18 @@
 		
 		protected override void Update (CommandInfo info)
 		{
+			if (Runtime.DebuggingService != null && Runtime.DebuggingService.IsDebugging && !Runtime.DebuggingService.IsRunning) {
+				info.Enabled = true;
+				info.Text = GettextCatalog.GetString ("Resume");
+				return;
+			}
+
 			if (Runtime.DebuggingService == null) {
 				info.Enabled = false;
 				return;
 			}
 			if (Runtime.ProjectService.CurrentOpenCombine != null) {
-				info.Enabled = Runtime.ProjectService.CurrentSelectedCombineEntry != null && 
-								Runtime.ProjectService.CurrentRunOperation.IsCompleted;
+				info.Enabled = Runtime.ProjectService.CurrentRunOperation.IsCompleted;
 			} else {
 				info.Enabled = (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null);
 			}
@@ -145,7 +160,7 @@
 		void ExecuteCombine (IAsyncOperation op)
 		{
 			if (op.Success)
-				Runtime.ProjectService.Debug (entry);
+				Runtime.ProjectService.Debug (Runtime.ProjectService.CurrentOpenCombine);
 		}
 		
 		void ExecuteFile (IAsyncOperation op)
@@ -155,56 +170,174 @@
 		}
 	}
 	
-	public class DebugApplicationHandler: CommandHandler
+	public class DebugEntryHandler: CommandHandler
 	{
+		CombineEntry entry;
+		string file;
+		
 		protected override void Run ()
 		{
-			using (FileSelector fs = new FileSelector (GettextCatalog.GetString ("Application to Debug"))) {
-				int response = fs.Run ();
-				string name = fs.Filename;
-				fs.Hide ();
-				if (response == (int)Gtk.ResponseType.Ok)
-					Runtime.ProjectService.DebugApplication (name);
-			}
+			entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
+			IAsyncOperation op = Runtime.ProjectService.Build (entry);
+			op.Completed += new OperationHandler (ExecuteCombine);
 		}
 		
 		protected override void Update (CommandInfo info)
 		{
-			info.Enabled = Runtime.DebuggingService != null &&
+			if (Runtime.DebuggingService == null) {
+				info.Enabled = false;
+				return;
+			}
+
+			info.Enabled = Runtime.ProjectService.CurrentSelectedCombineEntry != null && 
 							Runtime.ProjectService.CurrentRunOperation.IsCompleted;
 		}
+		
+		void ExecuteCombine (IAsyncOperation op)
+		{
+			if (op.Success)
+				Runtime.ProjectService.Debug (entry);
+		}
 	}
-
+	
 	public class BuildHandler: CommandHandler
 	{
 		protected override void Run ()
 		{
-			if (Runtime.ProjectService.CurrentSelectedCombineEntry != null)
-				Runtime.ProjectService.Build (Runtime.ProjectService.CurrentSelectedCombineEntry);
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				if (Runtime.ProjectService.CurrentSelectedCombineEntry != null)
+					Runtime.ProjectService.Build (Runtime.ProjectService.CurrentSelectedCombineEntry);
+			}
+			else if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
+				Runtime.FileService.SaveFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow);
+				Runtime.ProjectService.BuildFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+			}
 		}
 		
 		protected override void Update (CommandInfo info)
 		{
-			info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted &&
-							(Runtime.ProjectService.CurrentSelectedCombineEntry != null);
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				CombineEntry entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
+				if (entry != null) {
+					info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted;
+					info.Text = string.Format (GettextCatalog.GetString ("Build {0}"), entry.Name);
+					if (entry is Combine)
+						info.Description = string.Format (GettextCatalog.GetString ("Build Solution {0}"), entry.Name);
+					else if (entry is Project)
+						info.Description = string.Format (GettextCatalog.GetString ("Build Project {0}"), entry.Name);
+					else
+						info.Description = info.Text;
+				} else {
+					info.Enabled = false;
+				}
+			} else {
+				if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
+					info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted;
+					string file = Path.GetFileName (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+					info.Text = string.Format (GettextCatalog.GetString ("Build {0}"), file);
+				} else {
+					info.Enabled = false;
+				}
+			}
 		}
 	}
 	
+	
 	public class RebuildHandler: CommandHandler
 	{
 		protected override void Run ()
 		{
-			if (Runtime.ProjectService.CurrentSelectedCombineEntry != null)
-				Runtime.ProjectService.Rebuild (Runtime.ProjectService.CurrentSelectedCombineEntry);
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				if (Runtime.ProjectService.CurrentSelectedCombineEntry != null)
+					Runtime.ProjectService.Rebuild (Runtime.ProjectService.CurrentSelectedCombineEntry);
+			}
+			else if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
+				Runtime.FileService.SaveFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow);
+				Runtime.ProjectService.BuildFile (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+			}
 		}
 		
 		protected override void Update (CommandInfo info)
 		{
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				CombineEntry entry = Runtime.ProjectService.CurrentSelectedCombineEntry;
+				if (entry != null) {
+					info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted;
+					info.Text = info.Description = string.Format (GettextCatalog.GetString ("Rebuild {0}"), entry.Name);
+				} else {
+					info.Enabled = false;
+				}
+			} else {
+				if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
+					info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted;
+					string file = Path.GetFileName (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+					info.Text = info.Description = string.Format (GettextCatalog.GetString ("Rebuild {0}"), file);
+				} else {
+					info.Enabled = false;
+				}
+			}
+		}
+	}
+	
+	public class BuildSolutionHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.ProjectService.Build (Runtime.ProjectService.CurrentOpenCombine);
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
 			info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted &&
-							(Runtime.ProjectService.CurrentSelectedCombineEntry != null);
+							(Runtime.ProjectService.CurrentOpenCombine != null);
 		}
 	}
 	
+	public class RebuildSolutionHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.ProjectService.Rebuild (Runtime.ProjectService.CurrentOpenCombine);
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			info.Enabled = Runtime.ProjectService.CurrentBuildOperation.IsCompleted &&
+							(Runtime.ProjectService.CurrentOpenCombine != null);
+		}
+	}
+	
+	public class CleanSolutionHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.ProjectService.CurrentOpenCombine.Clean ();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			info.Enabled = Runtime.ProjectService.CurrentOpenCombine != null;
+		}
+	}
+	
+	public class CleanHandler: CommandHandler
+	{
+		protected override void Run ()
+		{
+			Runtime.ProjectService.CurrentSelectedCombineEntry.Clean ();
+		}
+		
+		protected override void Update (CommandInfo info)
+		{
+			if (Runtime.ProjectService.CurrentSelectedCombineEntry != null) {
+				info.Enabled = Runtime.ProjectService.CurrentSelectedCombineEntry != null;
+				info.Text = info.Description = string.Format (GettextCatalog.GetString ("Clean {0}"), Runtime.ProjectService.CurrentSelectedCombineEntry.Name);
+			} else {
+				info.Enabled = false;
+			}
+		}
+	}
+	
 	public class StopHandler: CommandHandler
 	{
 		protected override void Run ()

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Workbench/DefaultWorkbench.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Workbench/DefaultWorkbench.cs	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Workbench/DefaultWorkbench.cs	2005-04-30 14:22:53 UTC (rev 2495)
@@ -146,7 +146,7 @@
 
 			IDebuggingService dbgr = Runtime.DebuggingService;
 			if (dbgr != null) {
-				dbgr.PausedEvent += new EventHandler (onDebuggerPaused);
+				dbgr.PausedEvent += (EventHandler) Runtime.DispatchService.GuiDispatch (new EventHandler (onDebuggerPaused));
 			}
 
 			Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy);

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-04-30 14:22:53 UTC (rev 2495)
@@ -165,6 +165,7 @@
 Commands/FileCommands.cs \
 Commands/HelpCommands.cs \
 Commands/CustomStringTagProvider.cs \
+Commands/DebugCommands.cs \
 Commands/ProjectCommands.cs \
 Commands/VBConverter/ConvertProject.cs \
 Commands/VBConverter/ConvertBuffer.cs \

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml	2005-04-30 14:22:53 UTC (rev 2495)
@@ -103,64 +103,65 @@
 		<Command id = "MonoDevelop.Commands.EditCommands.Copy"
 				_label = "_Copy"
 				icon = "Icons.16x16.CopyIcon" 
-				description = "${res:XML.MainMenu.EditMenu.Copy.Description}" 
+				description = "Copy the selection" 
 				shortcut = "Control|C"/>
 		<Command id = "MonoDevelop.Commands.EditCommands.Cut"
 				_label = "Cu_t"
 				icon = "Icons.16x16.CutIcon" 
-				description = "${res:XML.MainMenu.EditMenu.Cut.Description}" 
+				description = "Cut the selection" 
 				shortcut = "Control|X"/>
 		<Command id = "MonoDevelop.Commands.EditCommands.Paste"
 				_label = "_Paste" 
 				icon = "Icons.16x16.PasteIcon"
+				description = "Paste" 
 				shortcut = "Control|V"/>
 		<Command id = "MonoDevelop.Commands.EditCommands.Delete"
 				_label = "_Delete" 
-				description = "${res:XML.MainMenu.EditMenu.Delete.Description}"
+				description = "Delete the selection"
 				icon  = "Icons.16x16.DeleteIcon" />
 		<Command id = "MonoDevelop.Commands.EditCommands.Rename"
 				_label    = "Re_name" />
 		<Command id = "MonoDevelop.Commands.EditCommands.Undo"
 				_label = "_Undo" 
 				icon = "Icons.16x16.UndoIcon" 
-				description = "${res:XML.MainMenu.EditMenu.Undo.Description}" 
+				description = "Undo last action" 
 				shortcut = "Control|Z" />
 		<Command id = "MonoDevelop.Commands.EditCommands.Redo" 
 				_label = "_Redo" 
 				icon = "Icons.16x16.RedoIcon" 
-				description = "${res:XML.MainMenu.EditMenu.Redo.Description}" 
+				description = "Redo last undone action" 
 				shortcut = "Control|Y" />
 		<Command id = "MonoDevelop.Commands.EditCommands.SelectAll" 
 				_label = "Select _All" 
-				description = "${res:XML.MainMenu.EditMenu.SelectAll.Description}" 
+				description = "Select all text" 
 				shortcut = "Control|A" />
 		<Command id = "MonoDevelop.Commands.EditCommands.CommentCode"
 				shortcut = "Control|Alt|C"
+				description = "Comment selected lines of code" 
 				_label = "C_omment Line(s)" />
 		<Command id = "MonoDevelop.Commands.EditCommands.UncommentCode"
 				shortcut = "Control|Alt|U"
+				description = "Uncomment selected lines of code" 
 				_label = "_Uncomment Line(s)" />
 		<Command id = "MonoDevelop.Commands.EditCommands.IndentSelection"
 				shortcut = "Control|Alt|Home"
+				description = "Indent selected lines of code" 
 				_label = "_Indent Selection" />
 		<Command id = "MonoDevelop.Commands.EditCommands.UnIndentSelection"
 				shortcut = "Control|Alt|End"
+				description = "Unindent selected lines of code" 
 				_label = "_Unindent Selection" />
 		<Command id = "MonoDevelop.Commands.EditCommands.WordCount"
 				_label = "_Word Count..." 
-				description = "${res:XML.MainMenu.EditMenu.WordCount.Description}"/>
+				description = "Count words in a text file"/>
 		<Command id = "MonoDevelop.Commands.EditCommands.MonodevelopPreferences"
 				defaultHandler = "MonoDevelop.Commands.MonodevelopPreferencesHandler"
 				_label = "_Preferences"
 				icon = "Icons.16x16.Options"
-				description = "${res:XML.MainMenu.ToolMenu.Options.Description}" />
+				description = "Show MonoDevelop preferences window" />
 				
 		<!-- ProjectCommands -->
 				
-		<Command id = "MonoDevelop.Commands.ProjectCommands.Compile"
-				defaultHandler = "MonoDevelop.Commands.CompileHandler"
-				description = "Compile"
-				_label = "_Compile" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.AddNewProject"
 				_label = "Add New Project..."
 				description = "Add a new project to the selected solution"
@@ -177,33 +178,48 @@
 				_label = "Add existing Solution" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.RemoveFromProject"
 				_label = "_Remove From Project" 
+				description = "Remove an item from the project"
 				icon  = "Icons.16x16.DeleteIcon" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.Options"
 				_label = "Options" 
 				description = "Show options window"
 				icon  = "Icons.16x16.PropertiesIcon" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.AddResource"
+				description = "Add a resource to the project"
 				_label = "Add Resource" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.AddReference"
+				description = "Edit project references"
 				_label = "Edit References" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.AddNewFiles"
 				_label = "New _File" 
+				description = "Create a new file"
 				icon  = "Icons.16x16.NewDocumentIcon" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.AddFiles"
 				_label = "Add Files" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.NewFolder"
 				_label = "New Folder" 
+				description = "Create a new folder"
 				icon  = "Icons.16x16.NewFolderIcon" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.IncludeToProject"
 				_label = "Include To Project" />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.BuildSolution"
+				defaultHandler = "MonoDevelop.Commands.BuildSolutionHandler"
+				_label = "Buil_d Solution"
+				shortcut = "F8"
+				description = "Build the solution"
+				icon  = "Icons.16x16.BuildCombine" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.Build"
 				defaultHandler = "MonoDevelop.Commands.BuildHandler"
 				_label = "Buil_d" 
-				shortcut = "F8"
-				description = "Build the selected project"
+				shortcut = "F7"
 				icon  = "Icons.16x16.BuildCurrentSelectedProject" />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.RebuildSolution"
+				defaultHandler = "MonoDevelop.Commands.RebuildSolutionHandler"
+				shortcut = "Control|F8"
+				_label = "Rebuild Solution" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.Rebuild"
 				defaultHandler = "MonoDevelop.Commands.RebuildHandler"
+				shortcut = "Control|F7"
 				_label = "Rebuild" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.SetAsStartupProject"
 				_label = "Set As Startup Project" />
@@ -211,15 +227,30 @@
 				defaultHandler = "MonoDevelop.Commands.RunHandler"
 				icon = "Icons.16x16.RunProgramIcon"
 				shortcut = "F5"
+				description = "Run"
 				_label = "Run" />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.RunEntry"
+				defaultHandler = "MonoDevelop.Commands.RunEntryHandler"
+				icon = "Icons.16x16.RunProgramIcon"
+				description = "Run"
+				_label = "Run" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.Debug"
 				defaultHandler = "MonoDevelop.Commands.DebugHandler"
 				icon = "Icons.16x16.RunProgramIcon"
 				shortcut = "Control|F5"
+				description = "Debug"
 				_label = "Debug" />
-		<Command id = "MonoDevelop.Commands.ProjectCommands.DebugApplication"
-				defaultHandler = "MonoDevelop.Commands.DebugApplicationHandler"
-				_label = "Debug Application..." />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.DebugEntry"
+				defaultHandler = "MonoDevelop.Commands.DebugEntryHandler"
+				icon = "Icons.16x16.RunProgramIcon"
+				description = "Debug"
+				_label = "Debug" />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.Clean"
+				defaultHandler = "MonoDevelop.Commands.CleanHandler"
+				_label = "Clean" />
+		<Command id = "MonoDevelop.Commands.ProjectCommands.CleanSolution"
+				defaultHandler = "MonoDevelop.Commands.CleanSolutionHandler"
+				_label = "Clean Solution" />
 		<Command id = "MonoDevelop.Commands.ProjectCommands.IncludeInBuild"
 				type="check"
 				_label = "Build" />
@@ -244,30 +275,33 @@
 				defaultHandler = "MonoDevelop.Commands.OpenFileHandler"
 				_label = "O_pen" 
 				shortcut = "Control|O"
+				description = "Open file or solution"
 				icon  = "Icons.16x16.OpenFileIcon" />
 		<Command id = "MonoDevelop.Commands.FileCommands.NewFile" 
 				defaultHandler = "MonoDevelop.Commands.NewFileHandler"
 				_label = "New File"
 				shortcut = "Control|N"
-				description = "${res:XML.MainMenu.FileMenu.New.File.Description}" 
+				description = "Create a new file"
 				icon = "Icons.16x16.NewDocumentIcon" />
 		<Command id = "MonoDevelop.Commands.FileCommands.Save" 
 				icon = "Icons.16x16.SaveIcon" 
 				shortcut = "Control|S"
+				description = "Save the active document"
 				_label = "Save" />
 		<Command id = "MonoDevelop.Commands.FileCommands.SaveAll"
 				defaultHandler = "MonoDevelop.Commands.SaveAllHandler"
 				icon = "Icons.16x16.SaveAllIcon" 
+				description = "Save all open files"
 				_label = "Save All" />
 		<Command id = "MonoDevelop.Commands.FileCommands.NewProject" 
 				defaultHandler = "MonoDevelop.Commands.NewProjectHandler"
 				_label = "N_ew Solution/Project..." 
 				icon = "Icons.16x16.NewProjectIcon" 
-				description = "${res:XML.MainMenu.FileMenu.New.Project.Description}" 
+				description = "Create a new project" 
 				shortcut = "Control|Shift|N"  />
 		<Command id = "MonoDevelop.Commands.FileCommands.CloseFile"
 				_label = "_Close File" 
-				description = "${res:XML.MainMenu.FileMenu.Close.File.Desription}"
+				description = "Close active file"
 				icon = "Icons.16x16.CloseIcon"
 				shortcut = "Control|W"/>
 		<Command id = "MonoDevelop.Commands.FileCommands.CloseAllFiles"
@@ -279,17 +313,17 @@
 		<Command id = "MonoDevelop.Commands.FileCommands.CloseCombine"
 				defaultHandler = "MonoDevelop.Commands.CloseCombineHandler"
 				_label = "Close Sol_ution" 
-				description = "${res:XML.MainMenu.FileMenu.Close.Project.Desription}"
+				description = "Close solution"
 				icon = "Icons.16x16.CloseCombineIcon" />
 		<Command id = "MonoDevelop.Commands.FileCommands.ReloadFile"
 				_label = "_Reload File" 
 				shortcut = "Control|U"
-				description = "${res:XML.MainMenu.FileMenu.Reload.Description}" />
+				description = "Reload the file" />
 		<Command id = "MonoDevelop.Commands.FileCommands.SaveAs"
 				_label = "Save _As..."
 				icon = "Icons.16x16.SaveAsIcon"
 				shortcut = "Control|Shift|S" 
-				description = "${res:XML.MainMenu.FileMenu.SaveAs.Description}" />
+				description = "Save file as" />
 		<Command id = "MonoDevelop.Commands.FileCommands.RecentFileList"
 				defaultHandler = "MonoDevelop.Commands.RecentFileListHandler"
 				type="array"
@@ -297,7 +331,7 @@
 		<Command id = "MonoDevelop.Commands.FileCommands.ClearRecentFiles" 
 				defaultHandler = "MonoDevelop.Commands.ClearRecentFilesHandler"
 				_label = "_Clear Recent Files" 
-				description = "${res:XML.MainMenu.FileMenu.ClearRecentFiles.Description}" />
+				description = "Clear recent files" />
 		<Command id = "MonoDevelop.Commands.FileCommands.RecentProjectList"
 				defaultHandler = "MonoDevelop.Commands.RecentProjectListHandler"
 				type="array"
@@ -305,12 +339,12 @@
 		<Command id = "MonoDevelop.Commands.FileCommands.ClearRecentProjects"
 				defaultHandler = "MonoDevelop.Commands.ClearRecentProjectsHandler"
 				_label = "_Clear Recent Solutions" 
-				description = "${res:XML.MainMenu.FileMenu.ClearRecentProjects.Description}" />
+				description = "Clear recent solutions" />
 		<Command id = "MonoDevelop.Commands.FileCommands.Exit"
 				defaultHandler = "MonoDevelop.Commands.ExitHandler"
 				_label = "_Quit" 
 				icon = "Icons.16x16.QuitIcon" 
-				description = "${res:XML.MainMenu.FileMenu.Exit.Description}"
+				description = "Quit MonoDevelop"
 				shortcut = "Control|Q" />
 				
 		<!-- ViewCommands -->
@@ -330,7 +364,7 @@
 				defaultHandler = "MonoDevelop.Commands.FullScreenHandler"
 				_label = "_Full Screen" 
 				icon = "Icons.16x16.FullScreen" 
-				description = "${res:XML.MainMenu.ViewMenu.FullScreen.Description}" />
+				description = "Full Screen" />
 		<Command id = "MonoDevelop.Commands.ViewCommands.Open"
 				_label = "Open" />
 		<Command id = "MonoDevelop.Commands.ViewCommands.TreeDisplayOptionList"
@@ -352,13 +386,13 @@
 				defaultHandler = "MonoDevelop.Commands.NextWindowHandler"
 				_label = "_Next Window"
 				icon = "Icons.16x16.NextWindowIcon"
-				description = "${res:XML.MainMenu.WindowMenu.NxtWindow.Description}" 
+				description = "Show next window" 
 				shortcut = "Control|Page_Down" />
 		<Command id = "MonoDevelop.Commands.WindowCommands.PrevWindow"
 				defaultHandler = "MonoDevelop.Commands.PrevWindowHandler"
 				_label = "_Previous Window"
 				icon = "Icons.16x16.PrevWindowIcon"
-				description = "${res:XML.MainMenu.WindowMenu.PrvWindow.Description}"
+				description = "Show previous window"
 				shortcut = "Control|Page_Up" />
 		<Command id = "MonoDevelop.Commands.WindowCommands.OpenWindowList"
 				defaultHandler = "MonoDevelop.Commands.OpenWindowListHandler"
@@ -371,17 +405,49 @@
 				defaultHandler = "MonoDevelop.Commands.TipOfTheDayHandler"
 				_label = "_Tip of the Day..." 
 				icon = "Icons.16x16.TipOfTheDay" 
-				description = "${res:XML.MainMenu.HelpMenu.Tips.Description}" />
+				description = "Show tip of the day" />
 		<Command id = "MonoDevelop.Commands.HelpCommands.About"
 				defaultHandler = "MonoDevelop.Commands.AboutHandler"
 				_label = "_About" 
 				icon = "Icons.16x16.AboutIcon" 
-				description = "${res:XML.MainMenu.HelpMenu.About.Description}" />
+				description = "Show about dialog" />
+				
+		<!-- DebugCommands -->
+		
+		<Command id = "MonoDevelop.Commands.DebugCommands.DebugApplication"
+				defaultHandler = "MonoDevelop.Commands.DebugApplicationHandler"
+				_label = "Debug Application..." />
+		<Command id = "MonoDevelop.Commands.DebugCommands.Pause"
+				defaultHandler = "MonoDevelop.Commands.PauseDebugHandler"
+				_label = "Pause"
+				shortcut = "Control|F8" />
+		<Command id = "MonoDevelop.Commands.DebugCommands.StepOver"
+				defaultHandler = "MonoDevelop.Commands.StepOverHandler"
+				_label = "Step Over"
+				shortcut = "F11" />
+		<Command id = "MonoDevelop.Commands.DebugCommands.StepInto"
+				defaultHandler = "MonoDevelop.Commands.StepIntoHandler"
+				_label = "Step Into"
+				shortcut = "Control|F11" />
+		<Command id = "MonoDevelop.Commands.DebugCommands.StepOut"
+				defaultHandler = "MonoDevelop.Commands.StepOutHandler"
+				_label = "Step Out"
+				shortcut = "Shift|F11" />
+		<Command id = "MonoDevelop.Commands.DebugCommands.ToggleBreakpoint"
+				_label = "Toggle Breakpoint"
+				shortcut = "F9" />
+		<Command id = "MonoDevelop.Commands.DebugCommands.ClearAllBreakpoints"
+				defaultHandler = "MonoDevelop.Commands.ClearAllBreakpointsHandler"
+				_label = "Clear All Breakpoints" />
 	</Extension>
 
 	<Extension path = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/CombineBrowserNode">
 		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Build" />
 		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Rebuild" />
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Clean" />
+		<SeparatorItem id = "RunSeparator" />
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.RunEntry" />
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.DebugEntry" />
 		<SeparatorItem id = "CombineBuildGroupSeparator" />
 		<ItemSet id = "CombineAddMenu" _label = "Add" >
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.AddNewProject" />
@@ -473,6 +539,10 @@
 	<Extension path = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectBrowserNode">
 		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Build" />
 		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Rebuild"/>
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Clean" />
+		<SeparatorItem id = "RunSeparator" />
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.RunEntry" />
+		<CommandItem id = "MonoDevelop.Commands.ProjectCommands.DebugEntry" />
 		<SeparatorItem id = "BuildGroupSeparator" />
 		<ItemSet id = "Add" _label = "Add">
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.AddNewFiles" />
@@ -723,6 +793,7 @@
 			<SeparatorItem id = "CompileSeparator" />
 <!--			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.ConfigurationSelector" />-->
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Build" />
+			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.BuildSolution" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Run" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Stop" />
 		</ItemSet>
@@ -802,15 +873,27 @@
 		</ItemSet>
 		
 		<ItemSet id = "Run" _label = "_Run">
-			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Compile" />
+			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.BuildSolution" />
+			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.RebuildSolution" />
+			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.CleanSolution" />
+			<SeparatorItem id = "Separator0" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Build" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Rebuild" />
+			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Clean" />
 			<SeparatorItem id = "Separator1" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Run" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Debug" />
-			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.DebugApplication" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.DebugApplication" />
 			<SeparatorItem id = "Separator2" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.Pause" />
 			<CommandItem id = "MonoDevelop.Commands.ProjectCommands.Stop" />
+			<SeparatorItem id = "Separator3" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.StepOver" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.StepInto" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.StepOut" />
+			<SeparatorItem id = "Separator4" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.ToggleBreakpoint" />
+			<CommandItem id = "MonoDevelop.Commands.DebugCommands.ClearAllBreakpoints" />
 		</ItemSet>
         
 		<ItemSet id = "Tools" _label = "Tools">

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DebuggerService/IDebuggerService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DebuggerService/IDebuggerService.cs	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DebuggerService/IDebuggerService.cs	2005-04-30 14:22:53 UTC (rev 2495)
@@ -17,6 +17,7 @@
 
 	public interface IDebuggingService {
 		bool IsRunning { get; }
+		bool IsDebugging { get; }
 		bool AddBreakpoint (string filename, int linenum);
 		void RemoveBreakpoint (string filename, int linenum);
 		bool ToggleBreakpoint (string filename, int linenum);
@@ -38,6 +39,7 @@
 
 		void StepInto ();
 		void StepOver ();
+		void StepOut ();
 
 		string[] Backtrace { get; }
 
@@ -48,5 +50,7 @@
 		
 		IBreakpoint[] Breakpoints { get; }
 		IBreakpoint[] GetBreakpointsAtFile (string sourceFile);
+		
+		void ClearAllBreakpoints ();
 	}
 }

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/ProjectService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/ProjectService.cs	2005-04-29 03:00:42 UTC (rev 2494)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/ProjectService.cs	2005-04-30 14:22:53 UTC (rev 2495)
@@ -336,7 +336,6 @@
 
 		public IAsyncOperation Execute (CombineEntry entry)
 		{
-			if (openCombine == null) return NullAsyncOperation.Success;
 			if (currentRunOperation != null && !currentRunOperation.IsCompleted) return currentRunOperation;
 
 			IProgressMonitor monitor = new NullProgressMonitor ();
@@ -362,7 +361,6 @@
 		
 		public IAsyncOperation Debug (CombineEntry entry)
 		{
-			if (openCombine == null) return NullAsyncOperation.Success;
 			if (currentRunOperation != null && !currentRunOperation.IsCompleted) return currentRunOperation;
 			
 			guiHelper.SetWorkbenchContext (WorkbenchContext.Debug);
@@ -442,7 +440,7 @@
 				aop.Completed += new OperationHandler (h.Run);
 				return aop;
 			} else {
-				Runtime.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The current file {0} can't be compiled."), file));
+				Runtime.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The file {0} can't be compiled."), file));
 				return NullAsyncOperation.Failure;
 			}
 		}
@@ -464,7 +462,6 @@
 	
 		public IAsyncOperation Rebuild (CombineEntry entry)
 		{
-			if (openCombine == null) return NullAsyncOperation.Success;
 			if (currentBuildOperation != null && !currentBuildOperation.IsCompleted) return currentBuildOperation;
 
 			entry.Clean ();
@@ -473,7 +470,6 @@
 		
 		public IAsyncOperation Build (CombineEntry entry)
 		{
-			if (openCombine == null) return NullAsyncOperation.Success;
 			if (currentBuildOperation != null && !currentBuildOperation.IsCompleted) return currentBuildOperation;
 			
 			BeforeCompile (entry);




More information about the Monodevelop-patches-list mailing list