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 24, 2017
1 parent 00711be commit 4df84ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
9 changes: 2 additions & 7 deletions Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ internal override int IncludeInProject(bool includeChildren)
var nodeModulesPath = Path.Combine(this._project.FullPathToChildren, "node_modules");
if (CommonUtils.IsSameDirectory(nodeModulesPath, this.ItemNode.Url))
{
ShouldIncludeNodeModulesFolderInProject();
Utilities.ShowMessageBox(
this._project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
return VSConstants.S_OK;
}
return base.IncludeInProject(includeChildren);
}

private void ShouldIncludeNodeModulesFolderInProject()
{
Utilities.ShowMessageBox(
this._project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
}
}
}
13 changes: 6 additions & 7 deletions Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void NodeModules_FinishedRefresh(object sender, EventArgs e)
}
}

private static string[] _excludedAvailableItems = new[] {
private readonly static string[] _excludedAvailableItems = new[] {
"ApplicationDefinition",
"Page",
"Resource",
Expand Down Expand Up @@ -584,18 +584,17 @@ public async Task CheckForLongPaths(string npmArguments = null)
{
this._isCheckingForLongPaths = true;

Utilities.ShowMessageBox(
this.Site, Resources.LongPathWarningText, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);

var longPaths = await Task.Factory.StartNew(() =>
GetLongSubPaths(this.ProjectHome)
.Concat(GetLongSubPaths(this._intermediateOutputPath))
.Select(lpi => string.Format(CultureInfo.InvariantCulture, "\u2022 {1}\u00A0<a href=\"{0}\">{2}</a>", lpi.FullPath, lpi.RelativePath, Resources.LongPathClickToCopy))
.ToArray());
if (longPaths.Length == 0)
.Any());
if (!longPaths)
{
return;
}

Utilities.ShowMessageBox(
this.Site, Resources.LongPathWarningText, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
}
finally
{
Expand Down

0 comments on commit 4df84ae

Please sign in to comment.