mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
working on #553 - Select All menu item
This commit is contained in:
@@ -16,15 +16,10 @@
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ICSharpCode.ILSpy.TextView
|
||||
{
|
||||
[ExportContextMenuEntryAttribute(Header = "Copy", Category = "Editor")]
|
||||
internal sealed class CopyContextMenuEntry : IContextMenuEntry
|
||||
[ExportContextMenuEntry(Header = "Copy", Category = "Editor")]
|
||||
sealed class CopyContextMenuEntry : IContextMenuEntry
|
||||
{
|
||||
public bool IsVisible(TextViewContext context)
|
||||
{
|
||||
@@ -41,4 +36,23 @@ namespace ICSharpCode.ILSpy.TextView
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user