Beispiel #1
0
        void Execute(IList <MethodSourceStatement> list)
        {
            if (list == null)
            {
                return;
            }

            var method     = list[0].Method;
            var methodNode = appService.DocumentTreeView.FindNode(method);

            if (methodNode == null)
            {
                MsgBox.Instance.Show(string.Format(dnSpy_AsmEditor_Resources.Error_CouldNotFindMethod, method));
                return;
            }

            EditClassCommand.Execute(editCodeVMCreator, addUpdatedNodesHelperProvider, undoCommandService, appService, new DocumentTreeNodeData[] { methodNode }, list);
        }
Beispiel #2
0
 public override void Execute(AsmEditorContext context) => EditClassCommand.Execute(editCodeVMCreator, addUpdatedNodesHelperProvider, undoCommandService, appService, context.Nodes);
Beispiel #3
0
 public override bool IsVisible(AsmEditorContext context) => EditClassCommand.CanExecute(editCodeVMCreator, context.Nodes);
Beispiel #4
0
 public override bool IsEnabled(CodeContext context) => !EditClass2Command.IsVisibleInternal(editCodeVMCreator, context.MenuItemContextOrNull) && EditClassCommand.CanExecute(editCodeVMCreator, context.Nodes);