Browse Source

working on #553 - Select All menu item

pull/703/head
Siegfried Pammer 9 years ago
parent
commit
2e04f295a2
  1. 28
      ILSpy/TextView/EditorCommands.cs

28
ILSpy/TextView/EditorCommands.cs

@ -16,15 +16,10 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ICSharpCode.ILSpy.TextView namespace ICSharpCode.ILSpy.TextView
{ {
[ExportContextMenuEntryAttribute(Header = "Copy", Category = "Editor")] [ExportContextMenuEntry(Header = "Copy", Category = "Editor")]
internal sealed class CopyContextMenuEntry : IContextMenuEntry sealed class CopyContextMenuEntry : IContextMenuEntry
{ {
public bool IsVisible(TextViewContext context) public bool IsVisible(TextViewContext context)
{ {
@ -41,4 +36,23 @@ namespace ICSharpCode.ILSpy.TextView
context.TextView.textEditor.Copy(); context.TextView.textEditor.Copy();
} }
} }
[ExportContextMenuEntry(Header = "Select All", Category = "Editor")]
sealed class SelectAllContextMenuEntry : IContextMenuEntry
{
public bool IsVisible(TextViewContext context)
{
return context.TextView != null;
}
public bool IsEnabled(TextViewContext context)
{
return context.TextView != null;
}
public void Execute(TextViewContext context)
{
context.TextView.textEditor.SelectAll();
}
}
} }

Loading…
Cancel
Save