protected override void OnExecute(object parameter) { if (!CanExecute(parameter) || !(parameter is CodeExplorerItemViewModel node)) { return; } if (node is CodeExplorerCustomFolderViewModel folderNode) { _renameFolderCommand.Execute(folderNode); return; } if (node.Declaration == null) { return; } try { _refactoring.Refactor(node.Declaration); } catch (RefactoringAbortedException) { } catch (RefactoringException exception) { _failureNotifier.Notify(exception); } }
protected override void OnExecute(object parameter) { if (!CanExecute(parameter) || !(parameter is CodeExplorerItemViewModel node) || node.Declaration == null) { return; } try { _refactoring.Refactor(node.Declaration); } catch (RefactoringAbortedException) { } catch (RefactoringException exception) { _failureNotifier.Notify(exception); } }