protected override void OnExecute(object parameter)
        {
            var activeSelection = SelectionProvider.ActiveSelection();

            if (!activeSelection.HasValue)
            {
                return;
            }

            try
            {
                Refactoring.Refactor(activeSelection.Value);
            }
            catch (RefactoringAbortedException)
            {}
            catch (RefactoringException exception)
            {
                FailureNotifier.Notify(exception);
            }
        }
        protected override void OnExecute(object parameter)
        {
            var target = GetTarget();

            if (target == null)
            {
                return;
            }

            try
            {
                Refactoring.Refactor(target);
            }
            catch (RefactoringAbortedException)
            {
            }
            catch (RefactoringException exception)
            {
                FailureNotifier.Notify(exception);
            }
        }
Example #3
0
 protected override void Refactor(IInspectionResult result)
 {
     Refactoring.Refactor(result.Target);
 }