Skip to content

Commit

Permalink
Don't show window for 1- variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Hosch250 committed May 18, 2015
1 parent fce1c2b commit 82e1051
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RetailCoder.VBE/UI/RefactorMenu.cs
Expand Up @@ -226,7 +226,7 @@ public void ReorderParameters(QualifiedSelection selection)
using (var view = new ReorderParametersDialog())
{
var parseResult = _parser.Parse(IDE.ActiveVBProject);
var presenter = new ReorderParametersPresenter(IDE, view, parseResult, selection);
var presenter = new ReorderParametersPresenter(view, parseResult, selection);
presenter.Show();
}
}
Expand Down
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Microsoft.Vbe.Interop;
Expand Down Expand Up @@ -32,6 +33,8 @@ public void Show()
{
LoadParams();

if (_view.Parameters.Count < 2) { return; }

_view.InitializeParameterGrid();
_view.ShowDialog();
}
Expand Down Expand Up @@ -90,6 +93,11 @@ private void AdjustReferences()
}

var argList = (VBAParser.ArgsCallContext)proc.argsCall();

if (argList == null)
{
continue;
}
var paramNames = argList.argCall().Select(arg => arg.GetText()).ToList();

var module = reference.QualifiedModuleName.Component.CodeModule;
Expand Down

0 comments on commit 82e1051

Please sign in to comment.