Author: mkrueger
Date: 2008-02-19 16:56:39 -0500 (Tue, 19 Feb 2008)
New Revision: 96197
Modified:
trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
Log:
* MonoDevelop.Ide.Commands/ProjectCommands.cs,
MonoDevelop.Ide.addin.xml: Implemented run again command.
Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-02-19
21:49:22 UTC (rev 96196)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-02-19
21:56:39 UTC (rev 96197)
@@ -1,5 +1,10 @@
2008-02-19 Mike Krüger <[EMAIL PROTECTED]>
+ * MonoDevelop.Ide.Commands/ProjectCommands.cs,
MonoDevelop.Ide.addin.xml:
+ Implemented run again command.
+
+2008-02-19 Mike Krüger <[EMAIL PROTECTED]>
+
* options/KeyBindingSchemeEmacs.xml,
options/KeyBindingSchemeMonoDevelop1.xml,
options/KeyBindingSchemeVisualStudio.xml,
Modified:
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
===================================================================
---
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
2008-02-19 21:49:22 UTC (rev 96196)
+++
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
2008-02-19 21:56:39 UTC (rev 96197)
@@ -79,6 +79,10 @@
protected override void Run ()
{
+ if
(!IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) {
+ StopHandler.StopBuildOperations ();
+
IdeApp.ProjectOperations.CurrentRunOperation.WaitForCompleted ();
+ }
if (IdeApp.ProjectOperations.CurrentOpenCombine !=
null) {
IAsyncOperation op =
IdeApp.ProjectOperations.Build (IdeApp.ProjectOperations.CurrentOpenCombine);
op.Completed += new OperationHandler
(ExecuteCombine);
@@ -93,8 +97,13 @@
protected override void Update (CommandInfo info)
{
+ info.Text = GettextCatalog.GetString ("_Run");
if (IdeApp.ProjectOperations.CurrentOpenCombine !=
null) {
- info.Enabled =
IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted;
+ if
(!IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) {
+ info.Text = GettextCatalog.GetString
("_Run again");
+ }
+
+ info.Enabled = true;
} else {
info.Enabled = (IdeApp.Workbench.ActiveDocument
!= null && IdeApp.Workbench.ActiveDocument.IsBuildTarget);
}
@@ -365,7 +374,7 @@
internal class StopHandler: CommandHandler
{
- protected override void Run ()
+ public static void StopBuildOperations ()
{
if
(!IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted)
IdeApp.ProjectOperations.CurrentBuildOperation.Cancel ();
@@ -373,13 +382,18 @@
IdeApp.ProjectOperations.CurrentRunOperation.Cancel ();
}
+ protected override void Run ()
+ {
+ StopBuildOperations ();
+ }
+
protected override void Update (CommandInfo info)
{
info.Enabled =
!IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted ||
!IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted;
}
}
-
+
internal class CombineEntryOptionsHandler: CommandHandler
{
protected override void Run ()
Modified:
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
2008-02-19 21:49:22 UTC (rev 96196)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
2008-02-19 21:56:39 UTC (rev 96197)
@@ -397,12 +397,12 @@
icon = "gtk-execute"
shortcut = "F5"
_description = "Run"
- _label = "Run" />
+ _label = "_Run" />
<Command id =
"MonoDevelop.Ide.Commands.ProjectCommands.RunEntry"
defaultHandler =
"MonoDevelop.Ide.Commands.RunEntryHandler"
icon = "gtk-execute"
description = "Run"
- _label = "Run" />
+ _label = "_Run" />
<Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Debug"
defaultHandler =
"MonoDevelop.Ide.Commands.DebugHandler"
icon = "gtk-execute"
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches