public ReorderParametersPresenterFactory(IVBE vbe, ReorderParametersDialog view, RubberduckParserState state, IMessageBox messageBox) { _vbe = vbe; _view = view; _state = state; _messageBox = messageBox; }
private void ReorderParameters(QualifiedSelection selection) { var progress = new ParsingProgressPresenter(); var result = progress.Parse(_parser, IDE.ActiveVBProject); using (var view = new ReorderParametersDialog()) { var factory = new ReorderParametersPresenterFactory(_editor, view, result); var refactoring = new ReorderParametersRefactoring(factory); refactoring.Refactor(selection); } }
protected override void OnExecute(object parameter) { var selection = Vbe.GetActiveSelection(); if (selection == null) { return; } using (var view = new ReorderParametersDialog(new ReorderParametersViewModel(_state))) { var factory = new ReorderParametersPresenterFactory(Vbe, view, _state, _msgbox); var refactoring = new ReorderParametersRefactoring(Vbe, factory, _msgbox, _state.ProjectsProvider); refactoring.Refactor(selection.Value); } }
public override void Execute(object parameter) { if (Vbe.ActiveCodePane == null) { return; } var codePane = _wrapperWrapperFactory.Create(Vbe.ActiveCodePane); var selection = new QualifiedSelection(new QualifiedModuleName(codePane.CodeModule.Parent), codePane.Selection); using (var view = new ReorderParametersDialog()) { var factory = new ReorderParametersPresenterFactory(Editor, view, _state, new MessageBox()); var refactoring = new ReorderParametersRefactoring(factory, Editor, new MessageBox()); refactoring.Refactor(selection); } }
protected override void OnExecute(object parameter) { var pane = Vbe.ActiveCodePane; var module = pane.CodeModule; { if (pane.IsWrappingNullReference) { return; } var selection = new QualifiedSelection(new QualifiedModuleName(module.Parent), pane.Selection); using (var view = new ReorderParametersDialog(new ReorderParametersViewModel(_state))) { var factory = new ReorderParametersPresenterFactory(Vbe, view, _state, _msgbox); var refactoring = new ReorderParametersRefactoring(Vbe, factory, _msgbox); refactoring.Refactor(selection); } } }
public ReorderParametersPresenter(ReorderParametersDialog view, ReorderParametersModel model, IMessageBox messageBox) { _view = view; _model = model; _messageBox = messageBox; }