Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@novell.com>2009-07-21 12:01:06 +0400
committerMike Krüger <mkrueger@novell.com>2009-07-21 12:01:06 +0400
commit2cef6f52b0da9ebb0fda432f4b757169a935cbba (patch)
tree60e1317cd514b0acf6b19ddf51b22fc27ab5e688 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands
parent0b426e6a0bf444c24e84baee807f4b63b8d6f777 (diff)
* MonoDevelop.Ide.addin.xml:
* MonoDevelop.Ide.Commands/ViewCommands.cs: Implemented "Bug 445699 - key binding for focusing text editor from controls". svn path=/trunk/monodevelop/; revision=138266
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ViewCommands.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ViewCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ViewCommands.cs
index 86c3764a4d..8d416a98a4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ViewCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ViewCommands.cs
@@ -57,7 +57,8 @@ namespace MonoDevelop.Ide.Commands
ShowPrevious,
ZoomIn,
ZoomOut,
- ZoomReset
+ ZoomReset,
+ FocusCurrentDocument
}
// MonoDevelop.Ide.Commands.ViewCommands.ViewList
@@ -274,4 +275,17 @@ namespace MonoDevelop.Ide.Commands
zoom.ZoomReset ();
}
}
+
+ public class FocusCurrentDocumentHandler : CommandHandler
+ {
+ protected override void Update (CommandInfo info)
+ {
+ info.Enabled = IdeApp.Workbench.ActiveDocument != null && IdeApp.Workbench.ActiveDocument.TextEditor != null;
+ }
+
+ protected override void Run ()
+ {
+ IdeApp.Workbench.ActiveDocument.TextEditor.JumpTo (IdeApp.Workbench.ActiveDocument.TextEditor.CursorLine, IdeApp.Workbench.ActiveDocument.TextEditor.CursorColumn);
+ }
+ }
}