Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul van Brenk committed Aug 25, 2017
1 parent 01771c5 commit e074e55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions Nodejs/Product/Nodejs/NodejsTools.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
</Strings>
</Button>

<!-- This button is invoked by code in the Import Wizard. So it's invisible, but still very much needed. -->
<Button guid="guidNodeToolsCmdSet" id="cmdidImportWizard" priority="0x010" type="Button">
<CommandFlag>DefaultInvisible</CommandFlag>
<Strings>
Expand Down
9 changes: 4 additions & 5 deletions Nodejs/Product/ProjectWizard/ImportWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ public void RunStarted(object automationObject, Dictionary<string, string> repla
var hr = EnsurePackageLoaded(serviceProvider);
if (ErrorHandler.Failed(hr))
{
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartFailedToLoadPackage, hr), "Visual Studio");
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartFailedToLoadPackage, hr), SR.ProductName);
throw new WizardBackoutException();
}
var uiShell = (IVsUIShell)serviceProvider.GetService(typeof(SVsUIShell));

var projName = replacementsDictionary["$projectname$"];
replacementsDictionary.TryGetValue("$specifiedsolutionname$", out var solnName);
string directory;
if (string.IsNullOrWhiteSpace(solnName))
var projName = replacementsDictionary["$projectname$"];
if (!replacementsDictionary.TryGetValue("$specifiedsolutionname$", out var solnName) || string.IsNullOrWhiteSpace(solnName))
{
// Create directory is unchecked, destinationdirectory is the
// directory name the user entered plus the project name, we want
Expand All @@ -64,7 +63,7 @@ public void RunStarted(object automationObject, Dictionary<string, string> repla
hr = uiShell.PostExecCommand(ref guid, (uint)PkgCmdId.cmdidImportWizard, 0, ref inObj);
if (ErrorHandler.Failed(hr))
{
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartUnexpectedError, hr), "Visual Studio");
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartUnexpectedError, hr), SR.ProductName);
}
}

Expand Down

0 comments on commit e074e55

Please sign in to comment.