diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-02-08 08:32:46 +0300 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-02-08 08:41:49 +0300 |
commit | 1af5b020867abeffe15658982b3941b170900f49 (patch) | |
tree | e9dfbd8fb89e7c2f1c6e4b98940f4610af7cb58d /main | |
parent | bdc3ac6281d9a4bcf4e0bb5f412269ed5870ab30 (diff) |
[SourceEditor] Implement SortSelectedLines command
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs index f3c7302999..165ddd148b 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs @@ -1037,7 +1037,18 @@ namespace MonoDevelop.SourceEditor RunAction (Mono.TextEditor.Vi.ViActions.Join); } } - + + [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.SortSelectedLines)] + void SortSelectedLines () + { + RunAction (MiscActions.SortSelectedLines); + } + + [CommandUpdateHandler (MonoDevelop.Ide.Commands.EditCommands.SortSelectedLines)] + void UpdateSortSelectedLines (CommandInfo ci) + { + ci.Enabled = GetTextEditorData ().IsMultiLineSelection; + } #endregion } |