diff --git a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs index 5a86dfd53..4f8915a13 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs @@ -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); - } } } diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs index f15e77806..eb2e62540 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs @@ -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", @@ -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{2}", 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 {