Skip to content

Commit 4df84ae

Browse files
author
Paul van Brenk
committed
PR feedback
1 parent 00711be commit 4df84ae

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,11 @@ internal override int IncludeInProject(bool includeChildren)
3535
var nodeModulesPath = Path.Combine(this._project.FullPathToChildren, "node_modules");
3636
if (CommonUtils.IsSameDirectory(nodeModulesPath, this.ItemNode.Url))
3737
{
38-
ShouldIncludeNodeModulesFolderInProject();
38+
Utilities.ShowMessageBox(
39+
this._project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
3940
return VSConstants.S_OK;
4041
}
4142
return base.IncludeInProject(includeChildren);
4243
}
43-
44-
private void ShouldIncludeNodeModulesFolderInProject()
45-
{
46-
Utilities.ShowMessageBox(
47-
this._project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
48-
}
4944
}
5045
}

Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void NodeModules_FinishedRefresh(object sender, EventArgs e)
7373
}
7474
}
7575

76-
private static string[] _excludedAvailableItems = new[] {
76+
private readonly static string[] _excludedAvailableItems = new[] {
7777
"ApplicationDefinition",
7878
"Page",
7979
"Resource",
@@ -584,18 +584,17 @@ public async Task CheckForLongPaths(string npmArguments = null)
584584
{
585585
this._isCheckingForLongPaths = true;
586586

587-
Utilities.ShowMessageBox(
588-
this.Site, Resources.LongPathWarningText, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
589-
590587
var longPaths = await Task.Factory.StartNew(() =>
591588
GetLongSubPaths(this.ProjectHome)
592589
.Concat(GetLongSubPaths(this._intermediateOutputPath))
593-
.Select(lpi => string.Format(CultureInfo.InvariantCulture, "\u2022 {1}\u00A0<a href=\"{0}\">{2}</a>", lpi.FullPath, lpi.RelativePath, Resources.LongPathClickToCopy))
594-
.ToArray());
595-
if (longPaths.Length == 0)
590+
.Any());
591+
if (!longPaths)
596592
{
597593
return;
598594
}
595+
596+
Utilities.ShowMessageBox(
597+
this.Site, Resources.LongPathWarningText, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
599598
}
600599
finally
601600
{

0 commit comments

Comments
 (0)