author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
410,218
12.09.2017 14:36:55
25,200
c3dee4d9b278db5b9a6f0f405ed64c15ae6d61f3
Add task to run npm install if types packages are needed
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/Worker.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/Worker.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">README.md</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorkerRole/Worker.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorkerRole/Worker.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">README.md</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">Web.Debug.config</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptWebApp.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">Web.Debug.config</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">README.md</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">README.md</ProjectItem>\n</Project>\n</TemplateContent>\n+ <WizardExtension>\n+ <Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n+ <FullClassName>Microsoft.NodejsTools.ProjectWizard.NpmWizardExtension</FullClassName>\n+ </WizardExtension>\n<WizardExtension>\n<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>\n<FullClassName>Microsoft.NodejsTools.ProjectWizard.NodejsPackageParametersExtension</FullClassName>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add task to run npm install if types packages are needed
410,218
15.09.2017 18:21:27
25,200
5855fcd7183b885d65766fce5636f86fd926f09d
Added node nested folder
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.vstemplate", "diff": "</Folder>\n<Folder Name=\"node_modules\">\n<Folder Name=\"@types\">\n+ <Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n<ProjectItem TargetFileName=\"index.d.ts\">node.index.d.ts</ProjectItem>\n<ProjectItem TargetFileName=\"README.md\">node.README.md</ProjectItem>\n</Folder>\n</Folder>\n+ </Folder>\n<ProjectItem>tsconfig.json</ProjectItem>\n<ProjectItem OpenInEditor=\"true\">app.ts</ProjectItem>\n<ProjectItem ReplaceParameters=\"true\">package.json</ProjectItem>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "diff": "<ProjectItem>tsconfig.json</ProjectItem>\n<Folder Name=\"node_modules\">\n<Folder Name=\"@types\">\n+ <Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n<ProjectItem TargetFileName=\"index.d.ts\">node.index.d.ts</ProjectItem>\n<ProjectItem TargetFileName=\"README.md\">node.README.md</ProjectItem>\n</Folder>\n</Folder>\n+ </Folder>\n</Project>\n</TemplateContent>\n<WizardExtension>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Added node nested folder
410,218
15.09.2017 22:37:04
25,200
43bdf7244281aea4a3da87f5e7daca7db880dfcc
Tidied up the csproj items for easier validation
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<ZipProject Include=\"ProjectTemplates\\FromExistingCode\\FromExistingCode.vstemplate\">\n<SubType>Designer</SubType>\n</ZipProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\app.ts\" />\n+ <!-- Start of TypeScript templates -->\n+ <!-- Blank Node.js console application -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\NodejsConsoleApp.vstemplate\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\NodejsConsoleApp.njsproj\">\n<SubType>Designer</SubType>\n</TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\NodejsConsoleApp.vstemplate\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\Preview.png\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\tsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\app.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.index.d.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.package.json\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\node.README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\server.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptConsoleApp\\tsconfig.json\" />\n+ <!-- Blank Node.js web application -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\NodejsWebApp.vstemplate\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\NodejsWebApp.njsproj\">\n<SubType>Designer</SubType>\n</TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\NodejsWebApp.vstemplate\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.index.d.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.README.md\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\Preview.png\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\server.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\tsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.LICENSE\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.index.d.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptWebApp\\node.README.md\" />\n+ <!-- Blank Azure Node.js web application -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\TypeScriptWebApp.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\TypeScriptWebApp.njsproj\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.index.d.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\server.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\tsconfig.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Web.config\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Web.Debug.config\" />\n+ <!-- Basic Node.js Express 4 application -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\ExpressApp.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\ExpressApp.njsproj\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\app.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\error.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\index.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\index.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\layout.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\main.css\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.index.d.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\tsconfig.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\user.ts\" />\n+ <!-- Basic Azure Node.js Express 4 application -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\TypeScriptExpressApp.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\TypeScriptExpressApp.njsproj\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\app.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\error.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\index.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\index.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\layout.pug\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\main.css\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.index.d.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.LICENSE\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\tsconfig.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\user.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Web.config\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Web.Debug.config\" />\n+ <!-- Misc -->\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Worker.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Worker.njsproj\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\server.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\startup.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptFromExistingCode\\FromExistingCode.njsproj\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptFromExistingCode\\FromExistingCode.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </TypeScriptProject>\n+ <!-- End of TypeScript templates -->\n<Content Include=\"GeneratedHelpAboutVersion.tt\">\n<Generator>TextTemplatingFileGenerator</Generator>\n<LastGenOutput>GeneratedHelpAboutVersion.cs</LastGenOutput>\n<ZipProject Include=\"ProjectTemplates\\AzureExpress4App\\index.js\" />\n<ZipProject Include=\"ProjectTemplates\\AzureExpress4App\\Preview.png\" />\n<ZipProject Include=\"ProjectTemplates\\AzureExpress4App\\users.js\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\ExpressApp.vstemplate\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\ExpressApp.njsproj\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\app.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\error.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\index.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\index.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\layout.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\main.css\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\tsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.LICENSE\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.index.d.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\node.README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\Preview.png\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptExpressApp\\user.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptFromExistingCode\\FromExistingCode.njsproj\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptFromExistingCode\\FromExistingCode.vstemplate\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n<ZipProject Include=\"ProjectTemplates\\AzureNodejsWorker\\Worker.njsproj\">\n<SubType>Designer</SubType>\n</ZipProject>\n<ZipProject Include=\"ProjectTemplates\\NodejsConsoleApp\\app.js\" />\n<ZipProject Include=\"ProjectTemplates\\NodejsConsoleApp\\NodejsConsoleApp.njsproj\" />\n<ZipProject Include=\"ProjectTemplates\\NodejsConsoleApp\\NodejsConsoleApp.vstemplate\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\server.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\TypeScriptWebApp.vstemplate\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Preview.png\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\TypeScriptWebApp.njsproj\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Web.Debug.config\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\Web.config\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\tsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.LICENSE\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.index.d.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebApp\\node.README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\TypeScriptExpressApp.vstemplate\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\TypeScriptExpressApp.njsproj\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\app.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\error.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\index.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\index.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\layout.pug\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\main.css\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.index.d.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.LICENSE\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\node.README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Preview.png\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\tsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\user.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Web.config\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureExpressApp\\Web.Debug.config\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Preview.png\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\server.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\startup.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Worker.njsproj\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\Worker.vstemplate\">\n- <SubType>Designer</SubType>\n- </TypeScriptProject>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\package.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorker\\README.md\" />\n+\n<None Include=\"source.extension.vsixmanifest\">\n<SubType>Designer</SubType>\n</None>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Tidied up the csproj items for easier validation
410,218
17.09.2017 09:47:32
25,200
5aa7d4a1b16e440c846b5e1e5634036a7b1d50e2
Fixed escaping for in .vstemplate files
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/TypeScriptExpressApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/TypeScriptExpressApp.vstemplate", "diff": "<TemplateContent>\n<Project File=\"TypeScriptExpressApp.njsproj\" ReplaceParameters=\"true\">\n<Folder Name=\"node_modules\">\n- <Folder Name=\"@types\">\n+ <Folder Name=\"%40types\">\n<Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate", "diff": "<TemplateContent>\n<Project File=\"TypeScriptWebApp.njsproj\" ReplaceParameters=\"true\">\n<Folder Name=\"node_modules\">\n- <Folder Name=\"@types\">\n+ <Folder Name=\"%40types\">\n<Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.vstemplate", "diff": "<TemplateContent>\n<Project File=\"NodejsConsoleApp.njsproj\" ReplaceParameters=\"true\">\n<Folder Name=\"node_modules\">\n- <Folder Name=\"@types\">\n+ <Folder Name=\"%40types\">\n<Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.vstemplate", "diff": "<ProjectItem>error.pug</ProjectItem>\n</Folder>\n<Folder Name=\"node_modules\">\n- <Folder Name=\"@types\">\n+ <Folder Name=\"%40types\">\n<Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate", "diff": "<ProjectItem ReplaceParameters=\"true\">README.md</ProjectItem>\n<ProjectItem>tsconfig.json</ProjectItem>\n<Folder Name=\"node_modules\">\n- <Folder Name=\"@types\">\n+ <Folder Name=\"%40types\">\n<Folder Name=\"node\">\n<ProjectItem TargetFileName=\"package.json\">node.package.json</ProjectItem>\n<ProjectItem TargetFileName=\"LICENSE\">node.LICENSE</ProjectItem>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fixed escaping for @types in .vstemplate files
410,218
17.09.2017 20:20:18
25,200
7989dc49b6c40c5164a16acbedb23b477c6d1046
Create node_modules/@types after project creation
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/ProjectWizard/NpmWizardExtension.cs", "new_path": "Nodejs/Product/ProjectWizard/NpmWizardExtension.cs", "diff": "using System.Collections.Generic;\nusing System.Diagnostics;\n+using System.IO;\nusing Microsoft.VisualStudio.TemplateWizard;\nnamespace Microsoft.NodejsTools.ProjectWizard\n@@ -23,6 +24,14 @@ namespace Microsoft.NodejsTools.ProjectWizard\nDebug.Assert(project != null && project.Object != null);\nDebug.Assert(project.Object is INodePackageModulesCommands);\n+ // Create the \"node_modules/@types\" folder before opening any files (which creates the\n+ // context for the project). This allows tsserver to start watching for type definitions\n+ // before any are installed (which is needed as \"npm install\" runs async, so the modules\n+ // usually aren't installed before the project context is loaded).\n+ var fullname = project.FullName;\n+ var projectFolder = Path.GetDirectoryName(fullname);\n+ Directory.CreateDirectory(Path.Combine(projectFolder, @\"node_modules\\@types\"));\n+\n((INodePackageModulesCommands)project.Object).InstallMissingModulesAsync();\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Create node_modules/@types after project creation (cherry picked from commit 0be5a02f59e1aa93293352eefe9178160167855f)
410,218
20.09.2017 14:12:00
25,200
55d6c6fb873b69acbaf0190138da7cd4eba15bdc
Fix incremental builds not including the TypeScript project templates
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Target Name=\"AfterBuild\">\n</Target>\n-->\n- <Target Name=\"TransformTypeScriptProjects\" BeforeTargets=\"MainResourcesGeneration\">\n+ <Target Name=\"TransformTypeScriptProjects\" BeforeTargets=\"CalculateZipFiles\">\n<ItemGroup>\n<ZipProject Include=\"@(TypeScriptProject)\">\n<Language>TypeScript</Language>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix incremental builds not including the TypeScript project templates (cherry picked from commit 40e62c6e02164523633fbcb8c03000863773c3b6)
410,217
25.09.2017 16:28:50
25,200
dc84ac816b9c447bc716493a0dbbce230878a0ed
Make sure we query for single letter packages
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "diff": "@@ -106,11 +106,71 @@ namespace Microsoft.NodejsTools.NpmUI\nTelemetryHelper.LogSearchNpm();\n- var relativeUri = $\"/-/v1/search?text={WebUtility.UrlEncode(filterText)}\";\n- var searchUri = new Uri(defaultRegistryUri, relativeUri);\n+ string relativeUri;\n+ if (filterText.Length == 1)\n+ {\n+ // Special case since the search API won't retur results for\n+ // single chararcter queries.\n+ relativeUri = $\"/{WebUtility.UrlEncode(filterText)}/latest\";\n- var request = WebRequest.Create(searchUri);\n- using (var response = await request.GetResponseAsync())\n+ using (var response = await SearchNpmRegistry(relativeUri))\n+ {\n+ /* We expect the following response\n+ {\n+ \"name\": \"express\",\n+ \"scope\": \"unscoped\",\n+ \"version\": \"4.15.2\",\n+ \"description\": \"Fast, unopinionated, minimalist web framework\",\n+ \"keywords\": [ \"express\", \"framework\", \"sinatra\", \"web\", \"rest\", \"restful\", \"router\", \"app\", \"api\" ],\n+ \"date\": \"2017-03-06T13:42:44.853Z\",\n+ \"links\": {\n+ \"npm\": \"https://www.npmjs.com/package/express\",\n+ \"homepage\": \"http://expressjs.com/\",\n+ \"repository\": \"https://github.com/expressjs/express\",\n+ \"bugs\": \"https://github.com/expressjs/express/issues\"\n+ },\n+ \"author\": {\n+ \"name\": \"TJ Holowaychuk\",\n+ \"email\": \"tj@vision-media.ca\"\n+ },\n+ \"publisher\": {\n+ \"username\": \"dougwilson\",\n+ \"email\": \"doug@somethingdoug.com\"\n+ },\n+ \"maintainers\": [\n+ {\n+ \"username\": \"dougwilson\",\n+ \"email\": \"doug@somethingdoug.com\"\n+ }\n+ ]\n+ }*/\n+ var reader = new StreamReader(response.GetResponseStream());\n+ using (var jsonReader = new JsonTextReader(reader))\n+ {\n+ while (jsonReader.Read())\n+ {\n+ switch (jsonReader.TokenType)\n+ {\n+ case JsonToken.StartObject:\n+ var token = JToken.ReadFrom(jsonReader);\n+ var package = ReadPackage(token, new NodeModuleBuilder());\n+ if (package != null)\n+ {\n+ return new[] { package };\n+ }\n+ break;\n+ default:\n+ throw new InvalidOperationException(\"Unexpected json token.\");\n+ }\n+ }\n+ }\n+ }\n+ }\n+ else\n+ {\n+ relativeUri = $\"/-/v1/search?text={WebUtility.UrlEncode(filterText)}\";\n+\n+ using (var response = await SearchNpmRegistry(relativeUri))\n{\n/* We expect the following response:\n{\n@@ -178,11 +238,20 @@ namespace Microsoft.NodejsTools.NpmUI\n}\n}\n}\n+ }\n// should never get here\nthrow new InvalidOperationException(\"Unexpected json token.\");\n}\n+ private static Task<WebResponse> SearchNpmRegistry(string relativeUri)\n+ {\n+ var searchUri = new Uri(defaultRegistryUri, relativeUri);\n+\n+ var request = WebRequest.Create(searchUri);\n+ return request.GetResponseAsync();\n+ }\n+\nprivate IEnumerable<IPackage> ReadPackagesFromArray(JsonTextReader jsonReader)\n{\nvar pkgList = new List<IPackage>();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make sure we query for single letter packages
410,217
26.09.2017 12:50:57
25,200
b235347383d0652bf2b7fd643f77589d1979abde
Various minor changes to improve readability
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/AbstractNpmNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/AbstractNpmNode.cs", "diff": "@@ -131,7 +131,7 @@ namespace Microsoft.NodejsTools.Project\ncontinue;\n}\n- if (modules != null && modules.Contains(dep.Package, new PackageEqualityComparer()))\n+ if (modules != null && modules.Contains(dep.Package, PackageEqualityComparer.Instance))\n{\nrecycle[dep.Package.Name] = dep;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs", "diff": "@@ -29,7 +29,7 @@ namespace Microsoft.NodejsTools.Project\n// Include node_modules folder is generally unecessary and can cause VS to hang.\n// http://nodejstools.codeplex.com/workitem/1432\n// Check if the folder is node_modules, and warn the user to ensure they don't run into this issue or at least set expectations appropriately.\n- var nodeModulesPath = Path.Combine(this._project.FullPathToChildren, \"node_modules\");\n+ var nodeModulesPath = Path.Combine(this._project.FullPathToChildren, NodejsConstants.NodeModulesFolder);\nif (CommonUtils.IsSameDirectory(nodeModulesPath, this.ItemNode.Url))\n{\nUtilities.ShowMessageBox(\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Various minor changes to improve readability
410,217
26.09.2017 14:02:28
25,200
bd95e2542bd94edfd4f89d11c8f629b92e6cfcbf
Add missing string to be translated Fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/InteractiveWindow/Resources.resx", "new_path": "Nodejs/Product/InteractiveWindow/Resources.resx", "diff": "<value>text/microsoft-resx</value>\n</resheader>\n<resheader name=\"version\">\n- <value>0.5</value>\n+ <value>2.0</value>\n</resheader>\n<resheader name=\"reader\">\n<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n<resheader name=\"writer\">\n<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n</resheader>\n+ <data name=\"cancelDescription\" xml:space=\"preserve\">\n+ <value>Stops execution of the current command.</value>\n+ </data>\n<data name=\"CanNotCreateWindow\" xml:space=\"preserve\">\n- <value>Cannot create Interactive window</value>\n+ <value>Cannot create Interactive window.</value>\n+ </data>\n+ <data name=\"clearDescription\" xml:space=\"preserve\">\n+ <value>Clears the contents of the REPL editor window.</value>\n+ </data>\n+ <data name=\"echoDescription\" xml:space=\"preserve\">\n+ <value>Suppress or unsuppress output to the buffer.</value>\n+ </data>\n+ <data name=\"helpDescription\" xml:space=\"preserve\">\n+ <value>Show a list of REPL commands.</value>\n+ </data>\n+ <data name=\"resetDescription\" xml:space=\"preserve\">\n+ <value>Reset to an empty execution engine, but keep REPL history.</value>\n+ </data>\n+ <data name=\"waitDescription\" xml:space=\"preserve\">\n+ <value>Wait for at least the specified number of milliseconds.</value>\n+ </data>\n+ <data name=\"echoState\" xml:space=\"preserve\">\n+ <value>ECHO is {0}</value>\n+ <comment>ECHO is on\\off</comment>\n</data>\n</root>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -1477,6 +1477,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Resets the context object to an empty object and clears any multi-line expression..\n+ /// </summary>\n+ internal static string ReplClearDescription {\n+ get {\n+ return ResourceManager.GetString(\"ReplClearDescription\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Node.js interactive window. Type .help for a list of commands..\n/// </summary>\n@@ -1486,6 +1495,51 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Clears the contents of the REPL editor window..\n+ /// </summary>\n+ internal static string ReplSaveDescription {\n+ get {\n+ return ResourceManager.GetString(\"ReplSaveDescription\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Failed to save: &apos;{0}&apos;..\n+ /// </summary>\n+ internal static string ReplSaveFailed {\n+ get {\n+ return ResourceManager.GetString(\"ReplSaveFailed\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Invalid filename: &apos;{0}&apos;..\n+ /// </summary>\n+ internal static string ReplSaveInvalidFileName {\n+ get {\n+ return ResourceManager.GetString(\"ReplSaveInvalidFileName\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Save requires a filename..\n+ /// </summary>\n+ internal static string ReplSaveNoFileName {\n+ get {\n+ return ResourceManager.GetString(\"ReplSaveNoFileName\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Session saved to: &apos;{0}&apos;..\n+ /// </summary>\n+ internal static string ReplSaveSucces {\n+ get {\n+ return ResourceManager.GetString(\"ReplSaveSucces\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Please run &apos;.npm init -y&apos; to create a new package.json file..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -672,4 +672,22 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Could not find a Node.js runtime on your computer. Please download and install the current Node.js release from 'https://nodejs.org', or specify the location of your Node.exe in the '{0}' file.</value>\n<comment>Template contains a filename, like launch.json</comment>\n</data>\n+ <data name=\"ReplClearDescription\" xml:space=\"preserve\">\n+ <value>Resets the context object to an empty object and clears any multi-line expression.</value>\n+ </data>\n+ <data name=\"ReplSaveDescription\" xml:space=\"preserve\">\n+ <value>Clears the contents of the REPL editor window.</value>\n+ </data>\n+ <data name=\"ReplSaveFailed\" xml:space=\"preserve\">\n+ <value>Failed to save: '{0}'.</value>\n+ </data>\n+ <data name=\"ReplSaveInvalidFileName\" xml:space=\"preserve\">\n+ <value>Invalid filename: '{0}'.</value>\n+ </data>\n+ <data name=\"ReplSaveNoFileName\" xml:space=\"preserve\">\n+ <value>Save requires a filename.</value>\n+ </data>\n+ <data name=\"ReplSaveSucces\" xml:space=\"preserve\">\n+ <value>Session saved to: '{0}'.</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add missing string to be translated Fixes #1700
410,217
26.09.2017 14:10:59
25,200
05679ed4bd2f7abe52f663e53b6cfe5327c16ff3
ALlows the description in the attach to process dialog to be localized. This fixed
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -152,6 +152,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Allows attaching to Node.js processes running behind a remote debug proxy (RemoteDebug.js). Related documentation can be found under the &apos;Tools\\Node.js Tool\\Remote Debug Proxy&apos; menu. Specify the target hostname and debugger port in the &apos;Qualifier&apos; textbox, e.g. &apos;targethost: {0}&apos;. This transport is not secure, and should not be used on a network that might have hostile traffic..\n+ /// </summary>\n+ internal static string DebuggerAttachToDescription {\n+ get {\n+ return ResourceManager.GetString(\"DebuggerAttachToDescription\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Debugger connection was closed..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -690,4 +690,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"ReplSaveSucces\" xml:space=\"preserve\">\n<value>Session saved to: '{0}'.</value>\n</data>\n+ <data name=\"DebuggerAttachToDescription\" xml:space=\"preserve\">\n+ <value>Allows attaching to Node.js processes running behind a remote debug proxy (RemoteDebug.js). Related documentation can be found under the 'Tools\\Node.js Tool\\Remote Debug Proxy' menu. Specify the target hostname and debugger port in the 'Qualifier' textbox, e.g. 'targethost: {0}'. This transport is not secure, and should not be used on a network that might have hostile traffic.</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
ALlows the description in the attach to process dialog to be localized. This fixed #1699
410,217
26.09.2017 14:32:56
25,200
075e66bfe9e775282751a43e555a748cf4d9e049
Localize Jade Classification names This fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -400,6 +400,51 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Jade Class Literal.\n+ /// </summary>\n+ internal static string JadeClassLiteral {\n+ get {\n+ return ResourceManager.GetString(\"JadeClassLiteral\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Jade Filter.\n+ /// </summary>\n+ internal static string JadeFilter {\n+ get {\n+ return ResourceManager.GetString(\"JadeFilter\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Jade Id Literal.\n+ /// </summary>\n+ internal static string JadeIdLiteral {\n+ get {\n+ return ResourceManager.GetString(\"JadeIdLiteral\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Jade Keyword.\n+ /// </summary>\n+ internal static string JadeKeyword {\n+ get {\n+ return ResourceManager.GetString(\"JadeKeyword\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Jade Variable.\n+ /// </summary>\n+ internal static string JadeVariable {\n+ get {\n+ return ResourceManager.GetString(\"JadeVariable\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Specifies the URL to open in the browser. If unspecified http://localhost:port is used.\\r\\nIf a port is specified, it needs to be specified here as well..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -693,4 +693,19 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"DebuggerAttachToDescription\" xml:space=\"preserve\">\n<value>Allows attaching to Node.js processes running behind a remote debug proxy (RemoteDebug.js). Related documentation can be found under the 'Tools\\Node.js Tool\\Remote Debug Proxy' menu. Specify the target hostname and debugger port in the 'Qualifier' textbox, e.g. 'targethost: {0}'. This transport is not secure, and should not be used on a network that might have hostile traffic.</value>\n</data>\n+ <data name=\"JadeClassLiteral\" xml:space=\"preserve\">\n+ <value>Jade Class Literal</value>\n+ </data>\n+ <data name=\"JadeFilter\" xml:space=\"preserve\">\n+ <value>Jade Filter</value>\n+ </data>\n+ <data name=\"JadeIdLiteral\" xml:space=\"preserve\">\n+ <value>Jade Id Literal</value>\n+ </data>\n+ <data name=\"JadeKeyword\" xml:space=\"preserve\">\n+ <value>Jade Keyword</value>\n+ </data>\n+ <data name=\"JadeVariable\" xml:space=\"preserve\">\n+ <value>Jade Variable</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Localize Jade Classification names This fixes #1694
410,217
26.09.2017 14:52:28
25,200
b1291ee535dcedacecb5b5f16ca79f3f5d5ea718
Allow Interactive Windows classification names to be localized This fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/InteractiveWindow/Resources.Designer.cs", "new_path": "Nodejs/Product/InteractiveWindow/Resources.Designer.cs", "diff": "@@ -78,6 +78,159 @@ namespace Microsoft.NodejsTools.Repl {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Black.\n+ /// </summary>\n+ internal static string ClassificationBlack {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationBlack\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Blue.\n+ /// </summary>\n+ internal static string ClassificationBlue {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationBlue\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Cyan.\n+ /// </summary>\n+ internal static string ClassificationCyan {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationCyan\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Blue.\n+ /// </summary>\n+ internal static string ClassificationDarkBlue {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkBlue\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Cyan.\n+ /// </summary>\n+ internal static string ClassificationDarkCyan {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkCyan\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Gray.\n+ /// </summary>\n+ internal static string ClassificationDarkGray {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkGray\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Green.\n+ /// </summary>\n+ internal static string ClassificationDarkGreen {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkGreen\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Magenta.\n+ /// </summary>\n+ internal static string ClassificationDarkMagenta {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkMagenta\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Red.\n+ /// </summary>\n+ internal static string ClassificationDarkRed {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkRed\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Dark Yellow.\n+ /// </summary>\n+ internal static string ClassificationDarkYellow {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationDarkYellow\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Error.\n+ /// </summary>\n+ internal static string ClassificationError {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationError\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Gray.\n+ /// </summary>\n+ internal static string ClassificationGray {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationGray\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Green.\n+ /// </summary>\n+ internal static string ClassificationGreen {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationGreen\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Magenta.\n+ /// </summary>\n+ internal static string ClassificationMagenta {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationMagenta\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Red.\n+ /// </summary>\n+ internal static string ClassificationRed {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationRed\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - White.\n+ /// </summary>\n+ internal static string ClassificationWhite {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationWhite\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Interactive - Yellow.\n+ /// </summary>\n+ internal static string ClassificationYellow {\n+ get {\n+ return ResourceManager.GetString(\"ClassificationYellow\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Clears the contents of the REPL editor window..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/InteractiveWindow/Resources.resx", "new_path": "Nodejs/Product/InteractiveWindow/Resources.resx", "diff": "<value>ECHO is {0}</value>\n<comment>ECHO is on\\off</comment>\n</data>\n+ <data name=\"ClassificationBlack\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Black</value>\n+ </data>\n+ <data name=\"ClassificationBlue\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Blue</value>\n+ </data>\n+ <data name=\"ClassificationCyan\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Cyan</value>\n+ </data>\n+ <data name=\"ClassificationDarkBlue\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Blue</value>\n+ </data>\n+ <data name=\"ClassificationDarkCyan\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Cyan</value>\n+ </data>\n+ <data name=\"ClassificationDarkGray\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Gray</value>\n+ </data>\n+ <data name=\"ClassificationDarkGreen\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Green</value>\n+ </data>\n+ <data name=\"ClassificationDarkMagenta\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Magenta</value>\n+ </data>\n+ <data name=\"ClassificationDarkRed\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Red</value>\n+ </data>\n+ <data name=\"ClassificationDarkYellow\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Dark Yellow</value>\n+ </data>\n+ <data name=\"ClassificationError\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Error</value>\n+ </data>\n+ <data name=\"ClassificationGray\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Gray</value>\n+ </data>\n+ <data name=\"ClassificationGreen\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Green</value>\n+ </data>\n+ <data name=\"ClassificationMagenta\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Magenta</value>\n+ </data>\n+ <data name=\"ClassificationRed\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Red</value>\n+ </data>\n+ <data name=\"ClassificationWhite\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - White</value>\n+ </data>\n+ <data name=\"ClassificationYellow\" xml:space=\"preserve\">\n+ <value>Node.js Interactive - Yellow</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Allow Interactive Windows classification names to be localized This fixes #1693
410,217
26.09.2017 16:41:39
25,200
c299f15fd410b946d308703b9c64e4bd31870088
Show the correct message when the local package is missing Fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "diff": "x:Name=\"LocalInstallMissingMessage\"\nVisibility=\"Collapsed\"\nFontWeight=\"Bold\"\n+ Foreground=\"Red\"\nText=\"{x:Static resx:NpmInstallWindowResources.MissingLocallyMessage}\" />\n<TextBlock Grid.Column=\"1\"\n<DataTrigger Binding=\"{Binding IsInstalledLocally}\" Value=\"true\">\n<Setter TargetName=\"LocalInstallMessage\" Property=\"Visibility\" Value=\"Visible\" />\n</DataTrigger>\n+ <DataTrigger Binding=\"{Binding IsLocalInstallMissing}\" Value=\"true\">\n+ <Setter TargetName=\"LocalInstallMissingMessage\" Property=\"Visibility\" Value=\"Visible\" />\n+ </DataTrigger>\n<DataTrigger Binding=\"{Binding IsLocalInstallOutOfDate}\" Value=\"true\">\n<Setter TargetName=\"LocalInstallMessage\" Property=\"Visibility\" Value=\"Collapsed\" />\n<Setter TargetName=\"LocalInstallOutOfDateMessage\" Property=\"Visibility\" Value=\"Visible\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Show the correct message when the local package is missing Fixes #1043
410,217
28.09.2017 09:44:38
25,200
9a2c69cd42e0e8800688683309caca8a6ec2734d
Use SharedPropPage for project property pages. This way we can properly theme them in the future.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Reference Include=\"Microsoft.VisualStudio.Debugger.Interop.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"Microsoft.VisualStudio.Debugger.InteropA, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" />\n<Reference Include=\"Microsoft.VisualStudio.Designer.Interfaces, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n- <EmbedInteropTypes>True</EmbedInteropTypes>\n+ <EmbedInteropTypes>False</EmbedInteropTypes>\n</Reference>\n<Reference Include=\"Microsoft.VisualStudio.Editor, Version=$(VSTarget).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"Microsoft.VisualStudio.Language.Intellisense, Version=$(VSTarget).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<PackageReference Include=\"MicroBuild.Core\">\n<Version>0.2.0</Version>\n</PackageReference>\n+ <PackageReference Include=\"Microsoft.VisualStudio.AppDesigner\">\n+ <Version>15.3.0-rc-6162104</Version>\n+ </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n<Version>15.3.799-masterDDDBA9E4</Version>\n</PackageReference>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -6,11 +6,12 @@ using System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Windows.Forms;\n+using Microsoft.VisualStudio.Editors.PropertyPages;\nusing Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Project\n{\n- internal partial class NodejsGeneralPropertyPageControl : UserControl\n+ internal partial class NodejsGeneralPropertyPageControl : PropPageUserControlBase\n{\nprivate readonly NodejsGeneralPropertyPage _propPage;\nprivate const string _exeFilter = \"Executable Files (*.exe)|*.exe|All Files (*.*)|*.*\";\n@@ -66,6 +67,10 @@ namespace Microsoft.NodejsTools.Project\nthis._tooltip.SetToolTip(this._envVars, Resources.EnvironmentVariables);\n}\n+ protected override bool DisableOnBuild => false;\n+\n+ protected override bool DisableOnDebug => false;\n+\npublic string NodeExePath\n{\nget\n@@ -192,7 +197,7 @@ namespace Microsoft.NodejsTools.Project\nprivate void Changed(object sender, EventArgs e)\n{\n- this._propPage.IsDirty = true;\n+ this.IsDirty = true;\n}\nprivate void SetCueBanner()\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "diff": "@@ -396,7 +396,7 @@ namespace Microsoft.NodejsTools.Project\ndefault:\nif (propPage != null)\n{\n- this.PropertyPage.IsDirty = true;\n+ propPage.IsDirty = true;\n}\nbreak;\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Use SharedPropPage for project property pages. This way we can properly theme them in the future.
410,217
29.09.2017 16:10:05
25,200
266a9418ab290567ca7862f940a26db35278666b
Add Jasmine Templates for js and ts This supports PR for Issue
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<SubType>Designer</SubType>\n</ZipItem>\n<None Include=\"Theme\\Microsoft.NodejsTools.theme.v15.0.pkgdef\" />\n+ <ZipItem Include=\"Templates\\Files\\JasmineUnitTest\\UnitTest.js\" />\n+ <ZipItem Include=\"Templates\\Files\\JasmineUnitTest\\UnitTest.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </ZipItem>\n+ <ZipItem Include=\"Templates\\Files\\TypeScriptJasmineUnitTest\\UnitTest.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </ZipItem>\n<Content Include=\"VSTemplateStore.pkgdef\">\n<IncludeInVSIX>false</IncludeInVSIX>\n<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n<Version>9.0.1</Version>\n</PackageReference>\n</ItemGroup>\n+ <ItemGroup>\n+ <ZipItem Include=\"Templates\\Files\\TypeScriptJasmineUnitTest\\UnitTest.ts\" />\n+ </ItemGroup>\n<PropertyGroup>\n<!--\nTo specify a different registry root to register your package, uncomment the TargetRegistryRoot\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/VSPackage.resx", "new_path": "Nodejs/Product/Nodejs/VSPackage.resx", "diff": "<value>_BUILDROOT_\\Nodejs\\Product\\Icons\\AddNewItemICO\\StylusSheet.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n<comment>{Locked}</comment>\n</data>\n+ <data name=\"4005\" xml:space=\"preserve\">\n+ <value>JavaScript Jasmine UnitTest file</value>\n+ </data>\n+ <data name=\"4006\" xml:space=\"preserve\">\n+ <value>A JavaScript Jasmine UnitTest file</value>\n+ </data>\n+ <data name=\"4007\" xml:space=\"preserve\">\n+ <value>TypeScript Jasmine UnitTest file</value>\n+ </data>\n+ <data name=\"4008\" xml:space=\"preserve\">\n+ <value>A TypeScript Jasmine UnitTest file</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add Jasmine Templates for js and ts This supports PR #1696 for Issue #296
410,217
29.09.2017 16:50:22
25,200
29cf08cbba2b98faf044cb08534673b296047beb
Cleanup code to defaults
[ { "change_type": "MODIFY", "old_path": "Common/Product/SharedProject/ProcessOutput.cs", "new_path": "Common/Product/SharedProject/ProcessOutput.cs", "diff": "@@ -62,16 +62,16 @@ namespace Microsoft.VisualStudioTools.Project\ninternal sealed class TeeRedirector : Redirector, IDisposable\n{\n- private readonly Redirector[] _redirectors;\n+ private readonly Redirector[] redirectors;\npublic TeeRedirector(params Redirector[] redirectors)\n{\n- this._redirectors = redirectors;\n+ this.redirectors = redirectors;\n}\npublic void Dispose()\n{\n- foreach (var redir in this._redirectors.OfType<IDisposable>())\n+ foreach (var redir in this.redirectors.OfType<IDisposable>())\n{\nredir.Dispose();\n}\n@@ -79,7 +79,7 @@ namespace Microsoft.VisualStudioTools.Project\npublic override void WriteLine(string line)\n{\n- foreach (var redir in this._redirectors)\n+ foreach (var redir in this.redirectors)\n{\nredir.WriteLine(line);\n}\n@@ -87,7 +87,7 @@ namespace Microsoft.VisualStudioTools.Project\npublic override void WriteErrorLine(string line)\n{\n- foreach (var redir in this._redirectors)\n+ foreach (var redir in this.redirectors)\n{\nredir.WriteErrorLine(line);\n}\n@@ -95,7 +95,7 @@ namespace Microsoft.VisualStudioTools.Project\npublic override void Show()\n{\n- foreach (var redir in this._redirectors)\n+ foreach (var redir in this.redirectors)\n{\nredir.Show();\n}\n@@ -103,7 +103,7 @@ namespace Microsoft.VisualStudioTools.Project\npublic override void ShowAndActivate()\n{\n- foreach (var redir in this._redirectors)\n+ foreach (var redir in this.redirectors)\n{\nredir.ShowAndActivate();\n}\n@@ -115,19 +115,19 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\ninternal sealed class ProcessOutput : IDisposable\n{\n- private readonly Process _process;\n- private readonly string _arguments;\n- private readonly List<string> _output, _error;\n- private ManualResetEvent _waitHandleEvent;\n- private readonly Redirector _redirector;\n- private bool _isDisposed;\n- private readonly object _seenNullLock = new object();\n- private bool _seenNullInOutput, _seenNullInError;\n- private bool _haveRaisedExitedEvent;\n- private Task<int> _awaiter;\n+ private readonly Process process;\n+ private readonly string arguments;\n+ private readonly List<string> output, error;\n+ private ManualResetEvent waitHandleEvent;\n+ private readonly Redirector redirector;\n+ private bool isDisposed;\n+ private readonly object seenNullLock = new object();\n+ private bool seenNullInOutput, seenNullInError;\n+ private bool haveRaisedExitedEvent;\n+ private Task<int> awaiter;\nprivate static readonly char[] EolChars = new[] { '\\r', '\\n' };\n- private static readonly char[] _needToBeQuoted = new[] { ' ', '\"' };\n+ private static readonly char[] NeedToBeQuoted = new[] { ' ', '\"' };\n/// <summary>\n/// Runs the provided executable file and allows the program to display\n@@ -398,7 +398,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nreturn \"\\\"\\\"\";\n}\n- if (arg.IndexOfAny(_needToBeQuoted) < 0)\n+ if (arg.IndexOfAny(NeedToBeQuoted) < 0)\n{\nreturn arg;\n}\n@@ -442,38 +442,38 @@ namespace Microsoft.VisualStudioTools.Project\nprivate ProcessOutput(Process process, Redirector redirector)\n{\n- this._arguments = QuoteSingleArgument(process.StartInfo.FileName) + \" \" + process.StartInfo.Arguments;\n- this._redirector = redirector;\n- if (this._redirector == null)\n+ this.arguments = QuoteSingleArgument(process.StartInfo.FileName) + \" \" + process.StartInfo.Arguments;\n+ this.redirector = redirector;\n+ if (this.redirector == null)\n{\n- this._output = new List<string>();\n- this._error = new List<string>();\n+ this.output = new List<string>();\n+ this.error = new List<string>();\n}\n- this._process = process;\n- if (this._process.StartInfo.RedirectStandardOutput)\n+ this.process = process;\n+ if (this.process.StartInfo.RedirectStandardOutput)\n{\n- this._process.OutputDataReceived += this.OnOutputDataReceived;\n+ this.process.OutputDataReceived += this.OnOutputDataReceived;\n}\n- if (this._process.StartInfo.RedirectStandardError)\n+ if (this.process.StartInfo.RedirectStandardError)\n{\n- this._process.ErrorDataReceived += this.OnErrorDataReceived;\n+ this.process.ErrorDataReceived += this.OnErrorDataReceived;\n}\n- if (!this._process.StartInfo.RedirectStandardOutput && !this._process.StartInfo.RedirectStandardError)\n+ if (!this.process.StartInfo.RedirectStandardOutput && !this.process.StartInfo.RedirectStandardError)\n{\n// If we are receiving output events, we signal that the process\n// has exited when one of them receives null. Otherwise, we have\n// to listen for the Exited event.\n// If we just listen for the Exited event, we may receive it\n// before all the output has arrived.\n- this._process.Exited += this.OnExited;\n+ this.process.Exited += this.OnExited;\n}\n- this._process.EnableRaisingEvents = true;\n+ this.process.EnableRaisingEvents = true;\ntry\n{\n- this._process.Start();\n+ this.process.Start();\n}\ncatch (Exception ex)\n{\n@@ -481,39 +481,39 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthrow;\n}\n- if (this._redirector != null)\n+ if (this.redirector != null)\n{\nforeach (var line in SplitLines(ex.ToString()))\n{\n- this._redirector.WriteErrorLine(line);\n+ this.redirector.WriteErrorLine(line);\n}\n}\n- else if (this._error != null)\n+ else if (this.error != null)\n{\n- this._error.AddRange(SplitLines(ex.ToString()));\n+ this.error.AddRange(SplitLines(ex.ToString()));\n}\n- this._process = null;\n+ this.process = null;\n}\n- if (this._process != null)\n+ if (this.process != null)\n{\n- if (this._process.StartInfo.RedirectStandardOutput)\n+ if (this.process.StartInfo.RedirectStandardOutput)\n{\n- this._process.BeginOutputReadLine();\n+ this.process.BeginOutputReadLine();\n}\n- if (this._process.StartInfo.RedirectStandardError)\n+ if (this.process.StartInfo.RedirectStandardError)\n{\n- this._process.BeginErrorReadLine();\n+ this.process.BeginErrorReadLine();\n}\n- if (this._process.StartInfo.RedirectStandardInput)\n+ if (this.process.StartInfo.RedirectStandardInput)\n{\n// Close standard input so that we don't get stuck trying to read input from the user.\n- if (_redirector == null || (_redirector != null && _redirector.CloseStandardInput()))\n+ if (this.redirector == null || (this.redirector != null && this.redirector.CloseStandardInput()))\n{\ntry\n{\n- this._process.StandardInput.Close();\n+ this.process.StandardInput.Close();\n}\ncatch (InvalidOperationException)\n{\n@@ -526,7 +526,7 @@ namespace Microsoft.VisualStudioTools.Project\nprivate void OnOutputDataReceived(object sender, DataReceivedEventArgs e)\n{\n- if (this._isDisposed)\n+ if (this.isDisposed)\n{\nreturn;\n}\n@@ -534,27 +534,27 @@ namespace Microsoft.VisualStudioTools.Project\nif (e.Data == null)\n{\nbool shouldExit;\n- lock (this._seenNullLock)\n+ lock (this.seenNullLock)\n{\n- this._seenNullInOutput = true;\n- shouldExit = this._seenNullInError || !this._process.StartInfo.RedirectStandardError;\n+ this.seenNullInOutput = true;\n+ shouldExit = this.seenNullInError || !this.process.StartInfo.RedirectStandardError;\n}\nif (shouldExit)\n{\n- OnExited(this._process, EventArgs.Empty);\n+ OnExited(this.process, EventArgs.Empty);\n}\n}\nelse if (!string.IsNullOrEmpty(e.Data))\n{\nforeach (var line in SplitLines(e.Data))\n{\n- if (this._output != null)\n+ if (this.output != null)\n{\n- this._output.Add(line);\n+ this.output.Add(line);\n}\n- if (this._redirector != null)\n+ if (this.redirector != null)\n{\n- this._redirector.WriteLine(line);\n+ this.redirector.WriteLine(line);\n}\n}\n}\n@@ -562,7 +562,7 @@ namespace Microsoft.VisualStudioTools.Project\nprivate void OnErrorDataReceived(object sender, DataReceivedEventArgs e)\n{\n- if (this._isDisposed)\n+ if (this.isDisposed)\n{\nreturn;\n}\n@@ -570,43 +570,43 @@ namespace Microsoft.VisualStudioTools.Project\nif (e.Data == null)\n{\nbool shouldExit;\n- lock (this._seenNullLock)\n+ lock (this.seenNullLock)\n{\n- this._seenNullInError = true;\n- shouldExit = this._seenNullInOutput || !this._process.StartInfo.RedirectStandardOutput;\n+ this.seenNullInError = true;\n+ shouldExit = this.seenNullInOutput || !this.process.StartInfo.RedirectStandardOutput;\n}\nif (shouldExit)\n{\n- OnExited(this._process, EventArgs.Empty);\n+ OnExited(this.process, EventArgs.Empty);\n}\n}\nelse if (!string.IsNullOrEmpty(e.Data))\n{\nforeach (var line in SplitLines(e.Data))\n{\n- if (this._error != null)\n+ if (this.error != null)\n{\n- this._error.Add(line);\n+ this.error.Add(line);\n}\n- if (this._redirector != null)\n+ if (this.redirector != null)\n{\n- this._redirector.WriteLine(line);\n+ this.redirector.WriteLine(line);\n}\n}\n}\n}\n- public int? ProcessId => this._process != null ? this._process.Id : (int?)null;\n+ public int? ProcessId => this.process != null ? this.process.Id : (int?)null;\n/// <summary>\n/// The arguments that were originally passed, including the filename.\n/// </summary>\n- public string Arguments => this._arguments;\n+ public string Arguments => this.arguments;\n/// <summary>\n/// True if the process started. False if an error occurred.\n/// </summary>\n- public bool IsStarted => this._process != null;\n+ public bool IsStarted => this.process != null;\n/// <summary>\n/// The exit code or null if the process never started or has not\n@@ -616,11 +616,11 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this._process == null || !this._process.HasExited)\n+ if (this.process == null || !this.process.HasExited)\n{\nreturn null;\n}\n- return this._process.ExitCode;\n+ return this.process.ExitCode;\n}\n}\n@@ -631,11 +631,11 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this._process != null && !this._process.HasExited)\n+ if (this.process != null && !this.process.HasExited)\n{\ntry\n{\n- return this._process.PriorityClass;\n+ return this.process.PriorityClass;\n}\ncatch (Win32Exception)\n{\n@@ -650,11 +650,11 @@ namespace Microsoft.VisualStudioTools.Project\n}\nset\n{\n- if (this._process != null && !this._process.HasExited)\n+ if (this.process != null && !this.process.HasExited)\n{\ntry\n{\n- this._process.PriorityClass = value;\n+ this.process.PriorityClass = value;\n}\ncatch (Win32Exception)\n{\n@@ -671,7 +671,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// <summary>\n/// The redirector that was originally passed.\n/// </summary>\n- public Redirector Redirector => this._redirector;\n+ public Redirector Redirector => this.redirector;\n/// <summary>\n/// Writes a line to stdin. A redirector must have been provided that indicates not\n/// to close the StandardInput stream.\n@@ -679,36 +679,36 @@ namespace Microsoft.VisualStudioTools.Project\n/// <param name=\"line\"></param>\npublic void WriteInputLine(string line)\n{\n- if (IsStarted && _redirector != null && !_redirector.CloseStandardInput())\n+ if (IsStarted && redirector != null && !redirector.CloseStandardInput())\n{\n- _process.StandardInput.WriteLine(line);\n- _process.StandardInput.Flush();\n+ process.StandardInput.WriteLine(line);\n+ process.StandardInput.Flush();\n}\n}\nprivate void FlushAndCloseOutput()\n{\n- if (this._process == null)\n+ if (this.process == null)\n{\nreturn;\n}\n- if (this._process.StartInfo.RedirectStandardOutput)\n+ if (this.process.StartInfo.RedirectStandardOutput)\n{\ntry\n{\n- this._process.CancelOutputRead();\n+ this.process.CancelOutputRead();\n}\ncatch (InvalidOperationException)\n{\n// Reader has already been cancelled\n}\n}\n- if (this._process.StartInfo.RedirectStandardError)\n+ if (this.process.StartInfo.RedirectStandardError)\n{\ntry\n{\n- this._process.CancelErrorRead();\n+ this.process.CancelErrorRead();\n}\ncatch (InvalidOperationException)\n{\n@@ -716,11 +716,11 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- if (this._waitHandleEvent != null)\n+ if (this.waitHandleEvent != null)\n{\ntry\n{\n- this._waitHandleEvent.Set();\n+ this.waitHandleEvent.Set();\n}\ncatch (ObjectDisposedException)\n{\n@@ -732,13 +732,13 @@ namespace Microsoft.VisualStudioTools.Project\n/// The lines of text sent to standard output. These do not include\n/// newline characters.\n/// </summary>\n- public IEnumerable<string> StandardOutputLines => this._output;\n+ public IEnumerable<string> StandardOutputLines => this.output;\n/// <summary>\n/// The lines of text sent to standard error. These do not include\n/// newline characters.\n/// </summary>\n- public IEnumerable<string> StandardErrorLines => this._error;\n+ public IEnumerable<string> StandardErrorLines => this.error;\n/// <summary>\n/// A handle that can be waited on. It triggers when the process exits.\n@@ -747,26 +747,28 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this._process == null)\n+ if (this.process == null)\n{\nreturn null;\n}\n- if (this._waitHandleEvent == null)\n+ if (this.waitHandleEvent == null)\n{\n- this._waitHandleEvent = new ManualResetEvent(this._haveRaisedExitedEvent);\n+ this.waitHandleEvent = new ManualResetEvent(this.haveRaisedExitedEvent);\n}\n- return this._waitHandleEvent;\n+ return this.waitHandleEvent;\n}\n}\n+ public bool IsDisposed { get => this.isDisposed; set => this.isDisposed = value; }\n+\n/// <summary>\n/// Waits until the process exits.\n/// </summary>\npublic void Wait()\n{\n- if (this._process != null)\n+ if (this.process != null)\n{\n- this._process.WaitForExit();\n+ this.process.WaitForExit();\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\n}\n@@ -781,9 +783,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </returns>\npublic bool Wait(TimeSpan timeout)\n{\n- if (this._process != null)\n+ if (this.process != null)\n{\n- var exited = this._process.WaitForExit((int)timeout.TotalMilliseconds);\n+ var exited = this.process.WaitForExit((int)timeout.TotalMilliseconds);\nif (exited)\n{\n// Should have already been called, in which case this is a no-op\n@@ -799,25 +801,25 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic TaskAwaiter<int> GetAwaiter()\n{\n- if (this._awaiter == null)\n+ if (this.awaiter == null)\n{\n- if (this._process == null)\n+ if (this.process == null)\n{\nvar tcs = new TaskCompletionSource<int>();\ntcs.SetCanceled();\n- this._awaiter = tcs.Task;\n+ this.awaiter = tcs.Task;\n}\n- else if (this._process.HasExited)\n+ else if (this.process.HasExited)\n{\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\nvar tcs = new TaskCompletionSource<int>();\n- tcs.SetResult(this._process.ExitCode);\n- this._awaiter = tcs.Task;\n+ tcs.SetResult(this.process.ExitCode);\n+ this.awaiter = tcs.Task;\n}\nelse\n{\n- this._awaiter = Task.Run(() =>\n+ this.awaiter = Task.Run(() =>\n{\ntry\n{\n@@ -827,12 +829,12 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthrow new OperationCanceledException();\n}\n- return this._process.ExitCode;\n+ return this.process.ExitCode;\n});\n}\n}\n- return this._awaiter.GetAwaiter();\n+ return this.awaiter.GetAwaiter();\n}\n/// <summary>\n@@ -840,9 +842,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic void Kill()\n{\n- if (this._process != null && !this._process.HasExited)\n+ if (this.process != null && !this.process.HasExited)\n{\n- this._process.Kill();\n+ this.process.Kill();\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\n}\n@@ -855,11 +857,11 @@ namespace Microsoft.VisualStudioTools.Project\nprivate void OnExited(object sender, EventArgs e)\n{\n- if (this._isDisposed || this._haveRaisedExitedEvent)\n+ if (this.isDisposed || this.haveRaisedExitedEvent)\n{\nreturn;\n}\n- this._haveRaisedExitedEvent = true;\n+ this.haveRaisedExitedEvent = true;\nFlushAndCloseOutput();\nvar evt = Exited;\nif (evt != null)\n@@ -873,30 +875,30 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic void Dispose()\n{\n- if (!this._isDisposed)\n+ if (!this.isDisposed)\n{\n- this._isDisposed = true;\n- if (this._process != null)\n+ this.isDisposed = true;\n+ if (this.process != null)\n{\n- if (this._process.StartInfo.RedirectStandardOutput)\n+ if (this.process.StartInfo.RedirectStandardOutput)\n{\n- this._process.OutputDataReceived -= this.OnOutputDataReceived;\n+ this.process.OutputDataReceived -= this.OnOutputDataReceived;\n}\n- if (this._process.StartInfo.RedirectStandardError)\n+ if (this.process.StartInfo.RedirectStandardError)\n{\n- this._process.ErrorDataReceived -= this.OnErrorDataReceived;\n+ this.process.ErrorDataReceived -= this.OnErrorDataReceived;\n}\n- this._process.Dispose();\n+ this.process.Dispose();\n}\n- var disp = this._redirector as IDisposable;\n+ var disp = this.redirector as IDisposable;\nif (disp != null)\n{\ndisp.Dispose();\n}\n- if (this._waitHandleEvent != null)\n+ if (this.waitHandleEvent != null)\n{\n- this._waitHandleEvent.Set();\n- this._waitHandleEvent.Dispose();\n+ this.waitHandleEvent.Set();\n+ this.waitHandleEvent.Dispose();\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/TestFileAddRemoveListener.cs", "new_path": "Nodejs/Product/TestAdapter/TestFileAddRemoveListener.cs", "diff": "@@ -24,9 +24,9 @@ namespace Microsoft.VisualStudioTools.TestAdapter\npublic TestFileChangedEventArgs(IVsProject project, string file, TestFileChangedReason reason)\n{\n- Project = project;\n- File = file;\n- ChangedReason = reason;\n+ this.Project = project;\n+ this.File = file;\n+ this.ChangedReason = reason;\n}\n}\n@@ -45,28 +45,28 @@ namespace Microsoft.VisualStudioTools.TestAdapter\n{\nValidateArg.NotNull(serviceProvider, \"serviceProvider\");\n- _testProjectGuid = projectGuid;\n+ this._testProjectGuid = projectGuid;\n- _projectDocTracker = serviceProvider.GetService<IVsTrackProjectDocuments2>(typeof(SVsTrackProjectDocuments));\n+ this._projectDocTracker = serviceProvider.GetService<IVsTrackProjectDocuments2>(typeof(SVsTrackProjectDocuments));\n}\npublic void StartListeningForTestFileChanges()\n{\n- if (_projectDocTracker != null)\n+ if (this._projectDocTracker != null)\n{\n- var hr = _projectDocTracker.AdviseTrackProjectDocumentsEvents(this, out _cookie);\n+ var hr = this._projectDocTracker.AdviseTrackProjectDocumentsEvents(this, out this._cookie);\nErrorHandler.ThrowOnFailure(hr); // do nothing if this fails\n}\n}\npublic void StopListeningForTestFileChanges()\n{\n- if (_cookie != VSConstants.VSCOOKIE_NIL && _projectDocTracker != null)\n+ if (this._cookie != VSConstants.VSCOOKIE_NIL && this._projectDocTracker != null)\n{\n- var hr = _projectDocTracker.UnadviseTrackProjectDocumentsEvents(_cookie);\n+ var hr = this._projectDocTracker.UnadviseTrackProjectDocumentsEvents(this._cookie);\nErrorHandler.Succeeded(hr); // do nothing if this fails\n- _cookie = VSConstants.VSCOOKIE_NIL;\n+ this._cookie = VSConstants.VSCOOKIE_NIL;\n}\n}\n@@ -78,7 +78,7 @@ namespace Microsoft.VisualStudioTools.TestAdapter\nvar projectIndex = rgFirstIndices[index];\nvar project = changedProjects[projectIndex];\n- if (project != null && project.IsTestProject(_testProjectGuid))\n+ if (project != null && project.IsTestProject(this._testProjectGuid))\n{\nvar evt = TestFileChanged;\nif (evt != null)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Cleanup code to defaults
410,217
29.09.2017 16:57:31
25,200
8980c802badb9284bda8d0305158296b97e69bdc
unused methods and named variables
[ { "change_type": "MODIFY", "old_path": "Common/Product/SharedProject/ProcessOutput.cs", "new_path": "Common/Product/SharedProject/ProcessOutput.cs", "diff": "@@ -596,7 +596,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- public int? ProcessId => this.process != null ? this.process.Id : (int?)null;\n+ public int? ProcessId => this.IsStarted ? this.process.Id : (int?)null;\n/// <summary>\n/// The arguments that were originally passed, including the filename.\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "diff": "@@ -97,6 +97,8 @@ namespace Microsoft.NodejsTools.Project\nreturn VSConstants.S_OK;\n}\n+ // todo: move usersettings to separate class, so we can use this from other places.\n+\ninternal static bool CheckUseNewChromeDebugProtocolOption()\n{\nvar optionString = NodejsDialogPage.LoadString(name: \"WebKitVersion\", cat: \"Debugging\");\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "new_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "diff": "@@ -201,22 +201,6 @@ namespace Microsoft.VisualStudioTools\nreturn AttachToProcess(processOutput, process);\n}\n- public bool AttachToProcess(ProcessOutput processOutput, Guid[] engines)\n- {\n- var debugger3 = (EnvDTE90.Debugger3)GetDTE().Debugger;\n- var processes = debugger3.LocalProcesses;\n- for (var i = 1; i < processes.Count; ++i)\n- {\n- var process = processes.Item(i);\n- if (process.ProcessID == processOutput.ProcessId)\n- {\n- return AttachToProcess(processOutput, process, engines);\n- }\n- }\n-\n- return false;\n- }\n-\npublic bool AttachToProcess(ProcessOutput processOutput, EnvDTE.Process process, Guid[] engines = null)\n{\n// Retry the attach itself 3 times before displaying a Retry/Cancel\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
unused methods and named variables
410,217
02.10.2017 17:23:33
25,200
7bd0c7ee5ff6ad68914e10ed73071c311be1ace6
Attach Node 8 debugger when running on Node 8
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "new_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "diff": "@@ -50,6 +50,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\npublic const string ExecutorUriString = \"executor://NodejsTestExecutor/v1\";\npublic static readonly Uri ExecutorUri = new Uri(ExecutorUriString);\n+\n+ private static readonly Version Node8Version = new Version(8, 0);\n+\n//get from NodeRemoteDebugPortSupplier::PortSupplierId\nprivate static readonly Guid NodejsRemoteDebugPortSupplierUnsecuredId = new Guid(\"{9E16F805-5EFC-4CE5-8B67-9AE9B643EF80}\");\n@@ -260,14 +263,14 @@ namespace Microsoft.NodejsTools.TestAdapter\nnodeArgs.Add(args[0]);\n}\n- testObjects.Add(new TestCaseObject(args[1], args[2], args[3], args[4], args[5]));\n+ testObjects.Add(new TestCaseObject(framework: args[1], testName: args[2], testFile: args[3], workingFolder: args[4], projectFolder: args[5]));\n}\nif (runContext.IsBeingDebugged && app != null)\n{\napp.GetDTE().Debugger.DetachAll();\n// Ensure that --debug-brk is the first argument\n- nodeArgs.InsertRange(0, GetDebugArgs(out port));\n+ nodeArgs.InsertRange(0, GetDebugArgs(nodeVersion, out port));\n}\nthis.nodeProcess = ProcessOutput.Run(\n@@ -282,6 +285,16 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (runContext.IsBeingDebugged && app != null)\n{\ntry\n+ {\n+ if (nodeVersion >= Node8Version)\n+ {\n+ //System.Diagnostics.Debugger.Launch();\n+\n+ frameworkHandle.SendMessage(TestMessageLevel.Informational, $\"ProcessId {this.nodeProcess.ProcessId ?? -99}\");\n+\n+ app.AttachToProcessNode2DebugAdapter((int)this.nodeProcess.ProcessId, nodeArgs[1]);\n+ }\n+ else\n{\n//the '#ping=0' is a special flag to tell VS node debugger not to connect to the port,\n//because a connection carries the consequence of setting off --debug-brk, and breakpoints will be missed.\n@@ -293,6 +306,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nbreak;\n}\n}\n+ }\n#if DEBUG\n}\ncatch (COMException ex)\n@@ -354,13 +368,20 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn discover.Get(testInfo.TestFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir);\n}\n- private static IEnumerable<string> GetDebugArgs(out int port)\n+ private static IEnumerable<string> GetDebugArgs(Version nodeVersion, out int port)\n{\nport = GetFreePort();\n- // TODO: Need to use --inspect-brk on Node.js 8 or later\n+ if (nodeVersion >= Node8Version)\n+ {\n+ return new[]\n+ {\n+ $\"--inspect-brk={port}\"\n+ };\n+ }\n+\nreturn new[] {\n- \"--debug-brk=\" + port.ToString()\n+ $\"--debug-brk={port}\"\n};\n}\n@@ -394,10 +415,10 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate void RecordEnd(IFrameworkHandle frameworkHandle, TestCase test, TestResult result, ResultObject resultObject)\n{\n- string[] standardOutputLines = resultObject.stdout.Split('\\n');\n- string[] standardErrorLines = resultObject.stderr.Split('\\n');\n+ var standardOutputLines = resultObject.stdout.Split('\\n');\n+ var standardErrorLines = resultObject.stderr.Split('\\n');\n- if (resultObject.pending != null && (bool)resultObject.pending)\n+ if (resultObject.pending == true)\n{\nresult.Outcome = TestOutcome.Skipped;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "new_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "diff": "@@ -9,7 +9,10 @@ using System.Reflection;\nusing System.Runtime.InteropServices;\nusing EnvDTE;\nusing Microsoft.VisualStudio.OLE.Interop;\n+using Microsoft.VisualStudio.Shell;\n+using Microsoft.VisualStudio.Shell.Interop;\nusing Microsoft.VisualStudioTools.Project;\n+using Newtonsoft.Json.Linq;\nusing Process = System.Diagnostics.Process;\nnamespace Microsoft.VisualStudioTools\n@@ -172,6 +175,41 @@ namespace Microsoft.VisualStudioTools\nreturn (DTE)runningObject;\n}\n+ private static readonly Guid WebKitDebuggerV2Guid = Guid.Parse(\"30d423cc-6d0b-4713-b92d-6b2a374c3d89\");\n+\n+ public bool AttachToProcessNode2DebugAdapter(int processId, string script)\n+ {\n+ var dte = (VisualStudio.OLE.Interop.IServiceProvider)GetDTE();\n+\n+ var serviceProvider = new ServiceProvider(dte);\n+\n+ var configuration = new JObject(\n+ new JProperty(\"name\", \"Debug Node.js program from Visual Studio\"),\n+ new JProperty(\"type\", \"node2\"),\n+ new JProperty(\"request\", \"attach\"),\n+ new JProperty(\"trace\", \"all\"),\n+ new JProperty(\"processId\", processId));\n+\n+ var jsonConfiguration = configuration.ToString();\n+\n+ var debugTargets = new[] {\n+ new VsDebugTargetInfo4() {\n+ dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_CreateProcess,\n+ guidLaunchDebugEngine = WebKitDebuggerV2Guid,\n+ bstrOptions = jsonConfiguration,\n+ dwProcessId = (uint)processId,\n+ bstrExe = script\n+ }\n+ };\n+\n+ var processInfo = new VsDebugTargetProcessInfo[debugTargets.Length];\n+\n+ var debugger = (IVsDebugger4)serviceProvider.GetService(typeof(SVsShellDebugger));\n+ debugger.LaunchDebugTargets4(1, debugTargets, processInfo);\n+\n+ return true;\n+ }\n+\npublic bool AttachToProcess(ProcessOutput processOutput, Guid portSupplier, string transportQualifierUri)\n{\nvar debugger3 = (EnvDTE90.Debugger3)GetDTE().Debugger;\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Attach Node 8 debugger when running on Node 8
410,217
03.10.2017 17:04:12
25,200
d9a3985feae1a1bc67a695aa9902aa9488965c28
Clean up final bits.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -50,7 +50,7 @@ namespace Microsoft.NodejsTools.Project\nthis._startBrowser.Text = Resources.PropertiesStartBrowser;\nthis._browsePath.AccessibleName = Resources.PropertiesBrowsePathAccessibleName;\n- this._browsePath.AccessibleName = Resources.PropertiesBrowseDirectoryAccessibleName;\n+ this._browseDirectory.AccessibleName = Resources.PropertiesBrowseDirectoryAccessibleName;\n}\nprivate void AddToolTips()\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up final bits.
410,217
09.10.2017 16:14:26
25,200
babe9d0ea81ea525b8fdfdfd8181fbd97ae779d8
Add info command to Repl so we can easily get info about the Node.js exe used by the interactive window.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"Debugger\\ExceptionHitTreatment.cs\" />\n<Compile Include=\"Debugger\\ExceptionHandler.cs\" />\n<Compile Include=\"ProvideLanguageTemplates.cs\" />\n+ <Compile Include=\"Repl\\InfoReplCommand.cs\" />\n<Compile Include=\"SourceMapping\\FunctionInfo.cs\" />\n<Compile Include=\"SourceMapping\\JavaScriptSourceMapInfo.cs\" />\n<Compile Include=\"Debugger\\NodeConstants.cs\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -1540,6 +1540,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Show information about the current used Node.js executable..\n+ /// </summary>\n+ internal static string ReplInfoDescription {\n+ get {\n+ return ResourceManager.GetString(\"ReplInfoDescription\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Node.js interactive window. Type .help for a list of commands..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -708,4 +708,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"JadeVariable\" xml:space=\"preserve\">\n<value>Jade Variable</value>\n</data>\n+ <data name=\"ReplInfoDescription\" xml:space=\"preserve\">\n+ <value>Show information about the current used Node.js executable.</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add info command to Repl so we can easily get info about the Node.js exe used by the interactive window.
410,217
09.10.2017 16:21:03
25,200
b12e52a87b8438995dd6d0d74c750bd43cf3f096
Localize the string literals.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs", "new_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs", "diff": "using System;\nusing System.ComponentModel.Composition;\nusing System.Diagnostics;\n+using System.Globalization;\nusing System.Threading.Tasks;\nnamespace Microsoft.NodejsTools.Repl\n@@ -23,12 +24,12 @@ namespace Microsoft.NodejsTools.Repl\n}\nvar nodeVersion = FileVersionInfo.GetVersionInfo(nodeExePath);\n- window.WriteLine($\"Using Node.js exe from: '{nodeExePath}'\");\n- window.WriteLine($\"Node.js Version: {nodeVersion.ProductVersion}\");\n+ window.WriteLine(string.Format(CultureInfo.CurrentUICulture, Resources.ReplNodeInfo, nodeExePath));\n+ window.WriteLine(string.Format(CultureInfo.CurrentUICulture, Resources.ReplNodeVersion, nodeVersion.ProductVersion));\n}\ncatch(Exception e)\n{\n- window.WriteLine(\"Failed to retrieve Nodejs.exe information.\");\n+ window.WriteLine(Resources.ReplNodeError);\nwindow.WriteError(e);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -1558,6 +1558,33 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Failed to retrieve Nodejs.exe information..\n+ /// </summary>\n+ internal static string ReplNodeError {\n+ get {\n+ return ResourceManager.GetString(\"ReplNodeError\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Using Node.js exe from: &apos;{0}&apos;.\n+ /// </summary>\n+ internal static string ReplNodeInfo {\n+ get {\n+ return ResourceManager.GetString(\"ReplNodeInfo\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.js Version: {0}.\n+ /// </summary>\n+ internal static string ReplNodeVersion {\n+ get {\n+ return ResourceManager.GetString(\"ReplNodeVersion\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Clears the contents of the REPL editor window..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -711,4 +711,15 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"ReplInfoDescription\" xml:space=\"preserve\">\n<value>Show information about the current used Node.js executable.</value>\n</data>\n+ <data name=\"ReplNodeError\" xml:space=\"preserve\">\n+ <value>Failed to retrieve Nodejs.exe information.</value>\n+ </data>\n+ <data name=\"ReplNodeInfo\" xml:space=\"preserve\">\n+ <value>Using Node.js exe from: '{0}'</value>\n+ <comment>template is substituted with a path.</comment>\n+ </data>\n+ <data name=\"ReplNodeVersion\" xml:space=\"preserve\">\n+ <value>Node.js Version: {0}</value>\n+ <comment>template is substituted with version info</comment>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Localize the string literals.
410,217
10.10.2017 17:30:14
25,200
687b50e51c77cc637d084b53fb8c6cae997a4167
Loc '(latest)' in the Npm Install GUI
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmInstallWindowResources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmInstallWindowResources.Designer.cs", "diff": "@@ -177,6 +177,15 @@ namespace Microsoft.NodejsTools.NpmUI {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to (latest).\n+ /// </summary>\n+ public static string LatestVersion {\n+ get {\n+ return ResourceManager.GetString(\"LatestVersion\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Package missing.\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmInstallWindowResources.resx", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmInstallWindowResources.resx", "diff": "<data name=\"MissingLocallyMessage\" xml:space=\"preserve\">\n<value>Package missing</value>\n</data>\n+ <data name=\"LatestVersion\" xml:space=\"preserve\">\n+ <value>(latest)</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "diff": "</Setter>\n</Style>\n+ <x:Array Type=\"ComboBoxItem\" x:Key=\"LatestVersionComboItem\">\n+ <ComboBoxItem Content=\"{x:Static resx:NpmInstallWindowResources.LatestVersion }\" />\n+ </x:Array>\n+\n<ResourceDictionary.MergedDictionaries>\n<ResourceDictionary Source=\"pack://application:,,,/Microsoft.NodejsTools;component/SharedProject/Wpf/Controls.xaml\" />\n<ResourceDictionary>\n<ComboBox.Resources>\n<CollectionViewSource x:Key=\"AvailableVersionViewSource\"\nSource=\"{Binding Path=SelectedPackage.AvailableVersions, Mode=OneWay}\"/>\n+ <CollectionViewSource x:Key=\"LatestVersionViewSource\"\n+ Source=\"{StaticResource LatestVersionComboItem}\"/>\n</ComboBox.Resources>\n<ComboBox.ItemsSource>\n<CompositeCollection>\n- <sys:String>(latest)</sys:String>\n+ <CollectionContainer Collection=\"{Binding Source={StaticResource LatestVersionViewSource}, Mode=OneWay}\"/>\n<CollectionContainer Collection=\"{Binding Source={StaticResource AvailableVersionViewSource}, Mode=OneWay}\"/>\n</CompositeCollection>\n</ComboBox.ItemsSource>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Loc '(latest)' in the Npm Install GUI
410,217
03.10.2017 15:34:49
25,200
e8546dd61c791e1d96c2ab8463d75ca298ff984f
Another attempt to attach
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "diff": "@@ -77,7 +77,7 @@ namespace Microsoft.NodejsTools.Project\n}\nelse if (debug && chromeProtocolRequired)\n{\n- if (CheckUseNewChromeDebugProtocolOption())\n+ if (false && CheckUseNewChromeDebugProtocolOption())\n{\nStartWithChromeV2Debugger(file, nodePath, startBrowser);\nTelemetryHelper.LogDebuggingStarted(\"ChromeV2\", nodeVersion.ToString());\n@@ -143,22 +143,24 @@ namespace Microsoft.NodejsTools.Project\n// setup debug info and attach\nvar debugUri = $\"http://127.0.0.1:{process.DebuggerPort}\";\n- var dbgInfo = new VsDebugTargetInfo4();\n- dbgInfo.dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning;\n- dbgInfo.LaunchFlags = (uint)__VSDBGLAUNCHFLAGS.DBGLAUNCH_StopDebuggingOnEnd;\n-\n- dbgInfo.guidLaunchDebugEngine = WebkitDebuggerGuid;\n- dbgInfo.dwDebugEngineCount = 1;\n+ var configuration = new JObject(\n+ new JProperty(\"name\", \"Debug Node.js program from Visual Studio\"),\n+ new JProperty(\"type\", \"node2\"),\n+ new JProperty(\"request\", \"attach\"),\n+ new JProperty(\"trace\", \"all\"),\n+ new JProperty(\"processId\", process.Id),\n+ new JProperty(\"sourceMaps\", true),\n+ new JProperty(\"stopOnEntry\", true));\n- var enginesPtr = MarshalDebugEngines(new[] { WebkitDebuggerGuid });\n- dbgInfo.pDebugEngines = enginesPtr;\n- dbgInfo.guidPortSupplier = WebkitPortSupplierGuid;\n- dbgInfo.bstrPortName = debugUri;\n- dbgInfo.fSendToOutputWindow = 0;\n+ var jsonContent = configuration.ToString();\n- // we connect through a URI, so no need to set the process,\n- // we need to set the process id to '1' so the debugger is able to attach\n- dbgInfo.bstrExe = $\"\\01\";\n+ var dbgInfo = new VsDebugTargetInfo4()\n+ {\n+ dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning,\n+ guidLaunchDebugEngine = WebKitDebuggerV2Guid,\n+ bstrExe = (char)0 + process.Id.ToString(\"X\"),\n+ bstrOptions = jsonContent\n+ };\nAttachDebugger(dbgInfo);\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj", "new_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj", "diff": "<NuGetPackageImportStamp>\n</NuGetPackageImportStamp>\n</PropertyGroup>\n+ <PropertyGroup Condition=\"'$(Configuration)' == 'Debug'\">\n+ <CopyVsixExtensionFiles>False</CopyVsixExtensionFiles>\n+ </PropertyGroup>\n<Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n<PropertyGroup>\n<Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "new_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "diff": "@@ -284,14 +284,12 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (runContext.IsBeingDebugged && app != null)\n{\n+ System.Diagnostics.Debugger.Launch();\n+\ntry\n{\nif (nodeVersion >= Node8Version)\n{\n- //System.Diagnostics.Debugger.Launch();\n-\n- frameworkHandle.SendMessage(TestMessageLevel.Informational, $\"ProcessId {this.nodeProcess.ProcessId ?? -99}\");\n-\napp.AttachToProcessNode2DebugAdapter((int)this.nodeProcess.ProcessId, nodeArgs[1]);\n}\nelse\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "new_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "diff": "@@ -194,11 +194,11 @@ namespace Microsoft.VisualStudioTools\nvar debugTargets = new[] {\nnew VsDebugTargetInfo4() {\n- dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_CreateProcess,\n+ dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning,\nguidLaunchDebugEngine = WebKitDebuggerV2Guid,\nbstrOptions = jsonConfiguration,\ndwProcessId = (uint)processId,\n- bstrExe = script\n+ bstrExe = $\"\\01\"\n}\n};\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Another attempt to attach
410,217
19.10.2017 15:33:15
25,200
6dc4c008c8feebe9355b1f8e8eff642ddeeca715
Remove /*!*/ comment
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/InteractiveWindow/Repl/ReplWindow.cs", "new_path": "Nodejs/Product/InteractiveWindow/Repl/ReplWindow.cs", "diff": "@@ -57,21 +57,21 @@ namespace Microsoft.NodejsTools.Repl\nprivate List<IReplCommand> _commands;\nprivate IWpfTextViewHost _textViewHost;\nprivate IEditorOperations _editorOperations;\n- private readonly History/*!*/ _history;\n+ private readonly History _history;\nprivate TaskScheduler _uiScheduler;\nprivate PropertyCollection _properties;\n//\n// Services\n//\n- private readonly IComponentModel/*!*/ _componentModel;\n+ private readonly IComponentModel _componentModel;\nprivate readonly Guid _langSvcGuid;\nprivate readonly string _replId;\n- private readonly IContentType/*!*/ _languageContentType;\n+ private readonly IContentType _languageContentType;\nprivate readonly string[] _roles;\nprivate readonly IClassifierAggregatorService _classifierAgg;\nprivate ReplAggregateClassifier _primaryClassifier;\n- private readonly IReplEvaluator/*!*/ _evaluator;\n+ private readonly IReplEvaluator _evaluator;\nprivate IVsFindTarget _findTarget;\nprivate IVsTextView _view;\nprivate ISmartIndent _languageIndenter;\n@@ -149,7 +149,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate static readonly char[] _whitespaceChars = new[] { '\\r', '\\n', ' ', '\\t' };\nprivate const string _boxSelectionCutCopyTag = \"MSDEVColumnSelect\";\n- public ReplWindow(IComponentModel/*!*/ model, IReplEvaluator/*!*/ evaluator, IContentType/*!*/ contentType, string[] roles, string/*!*/ title, Guid languageServiceGuid, string replId)\n+ public ReplWindow(IComponentModel model, IReplEvaluator evaluator, IContentType contentType, string[] roles, string title, Guid languageServiceGuid, string replId)\n{\nContract.Assert(evaluator != null);\nContract.Assert(contentType != null);\n@@ -371,7 +371,7 @@ namespace Microsoft.NodejsTools.Repl\nreturn applicable;\n}\n- private List<IReplCommand>/*!*/ CreateCommands()\n+ private List<IReplCommand> CreateCommands()\n{\nvar commands = new List<IReplCommand>();\nvar commandTypes = new HashSet<Type>();\n@@ -413,7 +413,7 @@ namespace Microsoft.NodejsTools.Repl\nMicrosoft.VisualStudio.ErrorHandler.ThrowOnFailure(tbh.AddToolbar(VSTWT_LOCATION.VSTWT_TOP, ref guidPerfMenuGroup, PkgCmdIDList.menuIdReplToolbar));\n}\n- private ITextViewRoleSet/*!*/ CreateRoleSet()\n+ private ITextViewRoleSet CreateRoleSet()\n{\nvar textEditorFactoryService = ComponentModel.GetService<ITextEditorFactoryService>();\nreturn textEditorFactoryService.CreateTextViewRoleSet(\n@@ -484,7 +484,7 @@ namespace Microsoft.NodejsTools.Repl\nget { return _componentModel; }\n}\n- public ITextBuffer/*!*/ TextBuffer\n+ public ITextBuffer TextBuffer\n{\nget { return TextView.TextBuffer; }\n}\n@@ -563,7 +563,7 @@ namespace Microsoft.NodejsTools.Repl\n/// <summary>\n/// See IReplWindow\n/// </summary>\n- public IWpfTextView/*!*/ TextView\n+ public IWpfTextView TextView\n{\nget\n{\n@@ -574,7 +574,7 @@ namespace Microsoft.NodejsTools.Repl\n/// <summary>\n/// See IReplWindow\n/// </summary>\n- public IReplEvaluator/*!*/ Evaluator\n+ public IReplEvaluator Evaluator\n{\nget\n{\n@@ -585,7 +585,7 @@ namespace Microsoft.NodejsTools.Repl\n/// <summary>\n/// See IReplWindow\n/// </summary>\n- public string/*!*/ Title\n+ public string Title\n{\nget\n{\n@@ -3011,22 +3011,22 @@ namespace Microsoft.NodejsTools.Repl\nreturn prompt;\n}\n- internal string/*!*/ Prompt\n+ internal string Prompt\n{\nget { return _prompt; }\n}\n- internal string/*!*/ SecondaryPrompt\n+ internal string SecondaryPrompt\n{\nget { return _secondPrompt; }\n}\n- internal string/*!*/ InputPrompt\n+ internal string InputPrompt\n{\nget { return _stdInputPrompt; }\n}\n- internal Control/*!*/ HostControl\n+ internal Control HostControl\n{\nget { return _textViewHost.HostControl; }\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -1684,7 +1684,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// This method retrieves an instance of a service that\n/// allows to start a project or a file with or without debugging.\n/// </summary>\n- public abstract IProjectLauncher/*!*/ GetLauncher();\n+ public abstract IProjectLauncher GetLauncher();\n/// <summary>\n/// Returns resolved value of the current working directory property.\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Remove /*!*/ comment
410,217
20.10.2017 16:26:31
25,200
6278e288dcdfc5202d605e8baa844feaa6497907
Fix build number calc so it works with Draft build templates
[ { "change_type": "MODIFY", "old_path": "Build/Common.Build.settings", "new_path": "Build/Common.Build.settings", "diff": "</PropertyGroup>\n<PropertyGroup Condition=\"'$(BUILD_BUILDNUMBER)' != ''\">\n- <VersionCurrentYearOffset>$([MSBuild]::Subtract($([System.Int32]::Parse($(BUILD_BUILDNUMBER.Substring(0,4)))),$(VersionZeroYear)))</VersionCurrentYearOffset>\n+ <CleanBuildNumber>$(BUILD_BUILDNUMBER.Replace(\".DRAFT\", \"\"))</CleanBuildNumber>\n+ <VersionCurrentYearOffset>$([MSBuild]::Subtract($([System.Int32]::Parse($(CleanBuildNumber.Substring(0,4)))),$(VersionZeroYear)))</VersionCurrentYearOffset>\n<VersionCurrentYearOffset Condition=\" '$(VersionCurrentYearOffset)' == '0' \"></VersionCurrentYearOffset>\n<!-- Example version numbers generated by this scheme:\nBuilt on 4/6/2016, targeting Visual Studio 1.4: 1.4.0406.1\nBuilt on 12/6/2017, targeting Visual Studio 1.4: 1.4.11206.1\nBuilt on 4/6/2019, targeting Visual Studio 1.4: 1.4.30406.1 -->\n- <BuildVersion>$(MajorVersion).$(MinorVersion).$(VersionCurrentYearOffset)$(BUILD_BUILDNUMBER.Substring(4))</BuildVersion>\n+ <BuildVersion>$(MajorVersion).$(MinorVersion).$(VersionCurrentYearOffset)$(CleanBuildNumber.Substring(4))</BuildVersion>\n</PropertyGroup>\n<PropertyGroup>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix build number calc so it works with Draft build templates
410,217
20.10.2017 16:47:26
25,200
0164f57d5e1518b1a6b6e8779e6ac9dc6b08fe6a
Update pkg folder
[ { "change_type": "MODIFY", "old_path": "Nodejs/Setup/NodejsTools.vsmanproj", "new_path": "Nodejs/Setup/NodejsTools.vsmanproj", "diff": "<PropertyGroup>\n<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\n</PropertyGroup>\n- <Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.props\" />\n+ <Import Project=\".\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.props\" />\n<Import Project=\".\\SetupProjectBefore.settings\" />\n<PropertyGroup>\n<Node Include=\"packages.config\" />\n</ItemGroup>\n- <Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\" />\n+ <Import Project=\".\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\" />\n<Import Project=\".\\SetupProjectAfter.settings\" />\n</Project>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Update pkg folder
410,217
20.10.2017 17:18:02
25,200
dfd66c5380ba096f15bb2e798979cb86524b64d5
Moving things back to the main solution
[ { "change_type": "MODIFY", "old_path": "Nodejs/Setup/NodejsTools.vsmanproj", "new_path": "Nodejs/Setup/NodejsTools.vsmanproj", "diff": "<PropertyGroup>\n<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\n</PropertyGroup>\n- <Import Project=\".\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.props\" />\n+ <Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.props\" />\n<Import Project=\".\\SetupProjectBefore.settings\" />\n<PropertyGroup>\n<Node Include=\"packages.config\" />\n</ItemGroup>\n- <Import Project=\".\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\" />\n+ <Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\" />\n<Import Project=\".\\SetupProjectAfter.settings\" />\n</Project>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Moving things back to the main solution
410,217
20.10.2017 17:19:47
25,200
b64e52bbc6eddecf9069e82f22bf8b62a7e1dda4
Make sure build order is correct
[ { "change_type": "MODIFY", "old_path": "Nodejs/NodejsTools.sln", "new_path": "Nodejs/NodejsTools.sln", "diff": "@@ -31,6 +31,11 @@ EndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TestAdapterShim\", \"Product\\TestAdapterShim\\TestAdapterShim.csproj\", \"{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"NodejsTools\", \"Setup\\NodejsTools.vsmanproj\", \"{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}\"\n+ ProjectSection(ProjectDependencies) = postProject\n+ {F3DB625F-EA2D-420F-BBC7-E4026CC6ECA3} = {F3DB625F-EA2D-420F-BBC7-E4026CC6ECA3}\n+ {4EB09870-7422-4368-B8C8-74582764EAB3} = {4EB09870-7422-4368-B8C8-74582764EAB3}\n+ {CBA217C4-4338-4E50-9DEC-9227705F8124} = {CBA217C4-4338-4E50-9DEC-9227705F8124}\n+ EndProjectSection\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Setup\", \"Setup\", \"{8AB8B6AC-77EB-47E7-904F-422588542C4D}\"\nEndProject\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make sure build order is correct
410,217
20.10.2017 17:32:30
25,200
1cf215f74358fb74778bd8ff8b35e24d7d16a3f0
Fix Release/Debug issue
[ { "change_type": "MODIFY", "old_path": "Nodejs/NodejsTools.sln", "new_path": "Nodejs/NodejsTools.sln", "diff": "@@ -91,8 +91,8 @@ Global\n{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}.Release|Any CPU.Build.0 = Release|Any CPU\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Debug|Any CPU.Build.0 = Debug|Any CPU\n- {D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.ActiveCfg = Debug|Any CPU\n- {D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.Build.0 = Debug|Any CPU\n+ {D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.ActiveCfg = Release|Any CPU\n+ {D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.Build.0 = Release|Any CPU\nEndGlobalSection\nGlobalSection(SolutionProperties) = preSolution\nHideSolutionNode = FALSE\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix Release/Debug issue
410,217
23.10.2017 11:19:16
25,200
cc8bcdea5eff5da931d8a47938c20b33b098604d
Clean up vsmanproj
[ { "change_type": "DELETE", "old_path": "Nodejs/Setup/NodejsTools.Profiling.vsmanproj", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"utf-8\"?>\n-<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\"\n- xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n-\n- <PropertyGroup>\n- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\n- </PropertyGroup>\n-\n- <Import Project=\".\\SetupProjectBefore.settings\" />\n-\n- <PropertyGroup>\n- <!-- Define properties that drive the manifest creation here. -->\n- <FinalizeManifest>true</FinalizeManifest>\n- <FinalizeSkipLayout>true</FinalizeSkipLayout>\n- <BuildNumber>$(VSTarget).$(BuildNumber)</BuildNumber>\n- <TargetName>$(MSBuildProjectName)</TargetName>\n- </PropertyGroup>\n-\n- <PropertyGroup>\n- <!-- NTVS uses BuildVersion as 'major.minor.build.revision' and BuildNumber is 'build.revision'.\n- But VS Manifest task wants BuildNumber to be 'major.minor.build.revision' -->\n- <BuildNumber>$(BuildVersion)</BuildNumber>\n- <OutputPath>$(BinDirectory)\\$(Configuration)\\</OutputPath>\n- </PropertyGroup>\n-\n- <ItemGroup>\n- <MergeManifest Include=\"$(BuildOutputRoot)\\Binaries\\Profiling\\Microsoft.VisualStudio.NodejsTools.Profiling.json\"/>\n- <Node Include=\"packages.config\" />\n- </ItemGroup>\n-\n- <Import Project=\"$(PackagesPath)\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\"/>\n- <Import Project=\".\\SetupProjectAfter.settings\" />\n-</Project>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up vsmanproj
410,217
24.10.2017 12:35:28
25,200
d1d6622f11f46c95cc4b2d68d0ebaf6a47b69a06
Working attempt to attach on project launch
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "new_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "diff": "@@ -175,7 +175,11 @@ namespace Microsoft.VisualStudioTools\nreturn (DTE)runningObject;\n}\n- private static readonly Guid WebKitDebuggerV2Guid = Guid.Parse(\"30d423cc-6d0b-4713-b92d-6b2a374c3d89\");\n+ private static readonly Guid WebkitDebuggerGuid = Guid.Parse(\"4cc6df14-0ab5-4a91-8bb4-eb0bf233d0fe\");\n+ private static readonly Guid WebkitPortSupplierGuid = Guid.Parse(\"4103f338-2255-40c0-acf5-7380e2bea13d\");\n+ internal static readonly Guid WebKitDebuggerV2Guid = Guid.Parse(\"30d423cc-6d0b-4713-b92d-6b2a374c3d89\");\n+\n+ private static readonly Guid Node2AttachEngineGuid = Guid.Parse(\"3F14B534-C345-44B5-AF84-642246EEEB62\");\npublic bool AttachToProcessNode2DebugAdapter(int processId, string script)\n{\n@@ -183,29 +187,36 @@ namespace Microsoft.VisualStudioTools\nvar serviceProvider = new ServiceProvider(dte);\n- var configuration = new JObject(\n- new JProperty(\"name\", \"Debug Node.js program from Visual Studio\"),\n- new JProperty(\"type\", \"node2\"),\n- new JProperty(\"request\", \"attach\"),\n- new JProperty(\"trace\", \"all\"),\n- new JProperty(\"processId\", processId));\n-\n- var jsonConfiguration = configuration.ToString();\n-\n- var debugTargets = new[] {\n- new VsDebugTargetInfo4() {\n+ // setup debug info and attach\n+ var pDebugEngine = Marshal.AllocCoTaskMem(Marshal.SizeOf<Guid>());\n+ var debugUri = $\"http://127.0.0.1:{process.DebuggerPort}\";\n+ try\n+ {\n+ Marshal.StructureToPtr(Node2AttachEngineGuid, pDebugEngine, false);\n+ var dbgInfo = new VsDebugTargetInfo4()\n+ {\ndlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning,\n- guidLaunchDebugEngine = WebKitDebuggerV2Guid,\n- bstrOptions = jsonConfiguration,\n- dwProcessId = (uint)processId,\n- bstrExe = $\"\\01\"\n- }\n+ pDebugEngines = pDebugEngine,\n+ dwDebugEngineCount = 1,\n+ bstrExe = \"dummy\",\n+ guidPortSupplier = WebkitPortSupplierGuid,\n+ bstrPortName = debugUri,\n+ dwProcessId = 1\n};\n- var processInfo = new VsDebugTargetProcessInfo[debugTargets.Length];\n+ var launchResults = new VsDebugTargetProcessInfo[1];\nvar debugger = (IVsDebugger4)serviceProvider.GetService(typeof(SVsShellDebugger));\n- debugger.LaunchDebugTargets4(1, debugTargets, processInfo);\n+ debugger.LaunchDebugTargets4(1, new[] { dbgInfo }, launchResults);\n+ }\n+ finally\n+ {\n+ if (pDebugEngine != IntPtr.Zero)\n+ {\n+ Marshal.FreeCoTaskMem(pDebugEngine);\n+ }\n+ }\n+\nreturn true;\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Working attempt to attach on project launch
410,217
24.10.2017 16:22:25
25,200
57bfc88d68624ac02ce2231da42c7f07004fd258
Strip BOM so JSON.parse doesn't crash
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/run_tests.js", "new_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/run_tests.js", "diff": "@@ -9,6 +9,12 @@ var rl = readline.createInterface({\nrl.on('line', (line) => {\nrl.close();\n+\n+ // strip the BOM in case of UTF-8\n+ if (line.charCodeAt(0) === 0xFEFF) {\n+ line = line.slice(1);\n+ }\n+\nvar testCases = JSON.parse(line);\n// get rid of leftover quotations from C# (necessary?)\nfor (var test in testCases) {\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Strip BOM so JSON.parse doesn't crash
410,217
24.10.2017 16:23:35
25,200
05c12dc3477c4fc9222c6bb3ae2a211545bdeb78
Add additional fallback so we can find the VS Root
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestDiscoverer.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestDiscoverer.cs", "diff": "@@ -35,6 +35,10 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar env = new Dictionary<string, string>();\nvar root = Environment.GetEnvironmentVariable(NodejsConstants.NodeToolsVsInstallRootEnvironmentVariable);\n+ if (string.IsNullOrEmpty(root))\n+ {\n+ root = Environment.GetEnvironmentVariable(\"VSINSTALLDIR\");\n+ }\nif (!string.IsNullOrEmpty(root))\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs", "diff": "@@ -247,7 +247,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nframeworkHandle.SendMessage(\nTestMessageLevel.Error,\n- $\"Unable to determine interpreter to use for {test.Source}.\");\n+ $\"Unable to determine interpreter to use for '{test.Source}'.\");\nframeworkHandle.RecordEnd(test, TestOutcome.Failed);\n}\n@@ -371,6 +371,10 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar env = new Dictionary<string, string>();\nvar root = Environment.GetEnvironmentVariable(NodejsConstants.NodeToolsVsInstallRootEnvironmentVariable);\n+ if (string.IsNullOrEmpty(root))\n+ {\n+ root = Environment.GetEnvironmentVariable(\"VSINSTALLDIR\");\n+ }\nif (!string.IsNullOrEmpty(root))\n{\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add additional fallback so we can find the VS Root
410,217
25.10.2017 15:35:56
25,200
dafc1d9e32d3606ffc7ed3054b32fe7efa05f8f0
Clean up in sln and vsmanproj
[ { "change_type": "MODIFY", "old_path": "Nodejs/NodejsTools.sln", "new_path": "Nodejs/NodejsTools.sln", "diff": "@@ -31,11 +31,6 @@ EndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TestAdapter\", \"Product\\TestAdapter\\TestAdapter.csproj\", \"{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"NodejsTools\", \"Setup\\NodejsTools.vsmanproj\", \"{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}\"\n- ProjectSection(ProjectDependencies) = postProject\n- {F3DB625F-EA2D-420F-BBC7-E4026CC6ECA3} = {F3DB625F-EA2D-420F-BBC7-E4026CC6ECA3}\n- {4EB09870-7422-4368-B8C8-74582764EAB3} = {4EB09870-7422-4368-B8C8-74582764EAB3}\n- {CBA217C4-4338-4E50-9DEC-9227705F8124} = {CBA217C4-4338-4E50-9DEC-9227705F8124}\n- EndProjectSection\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Setup\", \"Setup\", \"{8AB8B6AC-77EB-47E7-904F-422588542C4D}\"\nEndProject\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Setup/NodejsTools.vsmanproj", "new_path": "Nodejs/Setup/NodejsTools.vsmanproj", "diff": "<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\n<ProjectGuid>{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}</ProjectGuid>\n</PropertyGroup>\n-\n+ <PropertyGroup Condition=\"$(Configuration) == 'Release' \" />\n+ <PropertyGroup Condition=\"$(Configuration) == 'Debug' \" />\n<Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.props\" />\n<Import Project=\".\\SetupProjectBefore.settings\" />\n-\n<PropertyGroup>\n<!-- Define properties that drive the manifest creation here. -->\n<FinalizeManifest>true</FinalizeManifest>\n<BuildNumber>$(VSTarget).$(BuildNumber)</BuildNumber>\n<TargetName>$(MSBuildProjectName)</TargetName>\n</PropertyGroup>\n-\n<PropertyGroup>\n<!-- NTVS uses BuildVersion as 'major.minor.build.revision' and BuildNumber is 'build.revision'.\nBut VS Manifest task wants BuildNumber to be 'major.minor.build.revision' -->\n<BuildNumber>$(BuildVersion)</BuildNumber>\n<OutputPath>$(BinDirectory)\\$(Configuration)\\</OutputPath>\n</PropertyGroup>\n-\n<ItemGroup>\n<MergeManifest Include=\"$(BuildOutputRoot)\\Setup\\NodejsToolsVsix\\Microsoft.VisualStudio.NodejsTools.NodejsTools.json\" />\n<MergeManifest Include=\"$(BuildOutputRoot)\\Setup\\TargetsVsix\\Microsoft.VisualStudio.NodejsTools.Targets.json\" />\n<MergeManifest Include=\"$(BuildOutputRoot)\\Setup\\TestAdapterVsix\\Microsoft.VisualStudio.NodejsTools.TestAdapter.json\" />\n<Node Include=\"packages.config\" />\n</ItemGroup>\n-\n<ItemGroup>\n<ProjectReference Include=\"..\\Product\\NodejsToolsVsix\\NodejsToolsVsix.csproj\">\n<Project>{f3db625f-ea2d-420f-bbc7-e4026cc6eca3}</Project>\n</ProjectReference>\n</ItemGroup>\n+ <Target Name=\"Build\" />\n+ <Target Name=\"Clean\" />\n+ <Target Name=\"ReBuild\" />\n+\n<Import Project=\"..\\packages\\MicroBuild.Core.0.2.0\\build\\MicroBuild.Core.targets\" />\n<Import Project=\".\\SetupProjectAfter.settings\" />\n</Project>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up in sln and vsmanproj
410,217
25.10.2017 14:28:25
25,200
1990870c13a4d053f35874fb20c8830411ecbe3a
Ensure typescript templates are dropped in right folder
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<ZipProject Include=\"ProjectTemplates\\CloudService\\ServiceConfiguration.Cloud.cscfg\" />\n<ZipProject Include=\"ProjectTemplates\\CloudService\\ServiceConfiguration.Local.cscfg\" />\n<ZipProject Include=\"ProjectTemplates\\CloudService\\ServiceDefinition.csdef\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\package.json\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\README.md\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Worker.njsproj\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\package.json\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\README.md\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\TypeScriptWebApp.njsproj\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Web.config\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Web.Debug.config\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Worker.njsproj\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\package.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\TypeScriptWebApp.njsproj\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Web.config\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Web.Debug.config\" />\n<ZipProject Include=\"ProjectTemplates\\Express4App\\index.pug\" />\n<ZipProject Include=\"ProjectTemplates\\Express4App\\layout.pug\" />\n<ZipProject Include=\"ProjectTemplates\\Express4App\\package.json\" />\n</EmbeddedResource>\n<ZipProject Include=\"ProjectTemplates\\CloudService\\cloudservice.ico\" />\n<ZipProject Include=\"ProjectTemplates\\CloudService\\CloudService.vstemplate\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Preview.png\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Worker.vstemplate\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Preview.png\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\TypeScriptWebApp.vstemplate\">\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\Worker.vstemplate\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\Preview.png\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\TypeScriptWebApp.vstemplate\">\n<SubType>Designer</SubType>\n- </ZipProject>\n+ </TypeScriptProject>\n<ZipProject Include=\"ProjectTemplates\\Express4App\\app.js\" />\n<ZipProject Include=\"ProjectTemplates\\Express4App\\ExpressApp.njsproj\">\n<SubType>Designer</SubType>\n</ProjectReference>\n</ItemGroup>\n<ItemGroup>\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\server.ts\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\startup.ts\" />\n- <ZipProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\server.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\server.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureNodejsWorkerRole\\startup.ts\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptAzureWebRole\\server.ts\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"RemoteDebug\\\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Ensure typescript templates are dropped in right folder
410,217
26.10.2017 15:50:11
25,200
7da02f80d8ba5d657042cf30ee7cdcccb7f2542a
Mark extensions as SystemComponent This way they don't show in the 'Extensions and Updates' dialog
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest", "new_path": "Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest", "diff": "<!-- Version=\"11.0\" specifies the minimum (not the maximum) version, and the\nId specifications are minimums; any SKU equal or 'higher' will accept\nthem. -->\n- <Installation>\n+ <Installation SystemComponent=\"true\">\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/source.extension.vsixmanifest", "new_path": "Nodejs/Product/Nodejs/source.extension.vsixmanifest", "diff": "<PreviewImage>NodeJS_200x.png</PreviewImage>\n<PackageId>Microsoft.VisualStudio.NodejsTools.NodejsTools</PackageId>\n</Metadata>\n- <Installation>\n+ <Installation SystemComponent=\"true\">\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/NodejsToolsVsix/source.extension.vsixmanifest", "new_path": "Nodejs/Product/NodejsToolsVsix/source.extension.vsixmanifest", "diff": "<!-- Version=\"11.0\" specifies the minimum (not the maximum) version, and the\nId specifications are minimums; any SKU equal or 'higher' will accept\nthem. -->\n- <Installation>\n+ <Installation SystemComponent=\"true\">\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TargetsVsix/source.extension.vsixmanifest", "new_path": "Nodejs/Product/TargetsVsix/source.extension.vsixmanifest", "diff": "<PreviewImage>NodeJS_200x.png</PreviewImage>\n<PackageId>Microsoft.VisualStudio.NodejsTools.Targets</PackageId>\n</Metadata>\n- <Installation AllUsers=\"true\">\n+ <Installation SystemComponent=\"true\" AllUsers=\"true\">\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterVsix/source.extension.vsixmanifest", "new_path": "Nodejs/Product/TestAdapterVsix/source.extension.vsixmanifest", "diff": "<PreviewImage>NodeJS_200x.png</PreviewImage>\n<PackageId>Microsoft.VisualStudio.NodejsTools.TestAdapter</PackageId>\n</Metadata>\n- <Installation>\n+ <Installation SystemComponent=\"true\">\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n<InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Mark extensions as SystemComponent This way they don't show in the 'Extensions and Updates' dialog
410,217
27.10.2017 15:07:16
25,200
92a91bcd7ac8f75807682342c93a5f91a700a0b3
Attach for Unit Tests
[ { "change_type": "MODIFY", "old_path": "Common/Product/SharedProject/ProcessOutput.cs", "new_path": "Common/Product/SharedProject/ProcessOutput.cs", "diff": "@@ -60,56 +60,6 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- internal sealed class TeeRedirector : Redirector, IDisposable\n- {\n- private readonly Redirector[] redirectors;\n-\n- public TeeRedirector(params Redirector[] redirectors)\n- {\n- this.redirectors = redirectors;\n- }\n-\n- public void Dispose()\n- {\n- foreach (var redir in this.redirectors.OfType<IDisposable>())\n- {\n- redir.Dispose();\n- }\n- }\n-\n- public override void WriteLine(string line)\n- {\n- foreach (var redir in this.redirectors)\n- {\n- redir.WriteLine(line);\n- }\n- }\n-\n- public override void WriteErrorLine(string line)\n- {\n- foreach (var redir in this.redirectors)\n- {\n- redir.WriteErrorLine(line);\n- }\n- }\n-\n- public override void Show()\n- {\n- foreach (var redir in this.redirectors)\n- {\n- redir.Show();\n- }\n- }\n-\n- public override void ShowAndActivate()\n- {\n- foreach (var redir in this.redirectors)\n- {\n- redir.ShowAndActivate();\n- }\n- }\n- }\n-\n/// <summary>\n/// Represents a process and its captured output.\n/// </summary>\n@@ -270,8 +220,11 @@ namespace Microsoft.VisualStudioTools.Project\nQuoteSingleArgument(errFile))\n};\n- var process = new Process();\n- process.StartInfo = psi;\n+ var process = new Process\n+ {\n+ StartInfo = psi\n+ };\n+\nvar result = new ProcessOutput(process, redirector);\nif (redirector != null)\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs", "new_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs", "diff": "@@ -9,16 +9,16 @@ namespace Microsoft.NodejsTools.TestFrameworks\n{\ninternal class TestFrameworkDirectories\n{\n- public const string ExportRunnerFramework = \"ExportRunner\";\n- private const string TestFrameworksDirectory = \"TestFrameworks\";\n- private const string TestAdapterDirectory = \"TestAdapter\";\n+ public const string ExportRunnerFrameworkName = \"ExportRunner\";\n+ private const string TestFrameworksFolderName = \"TestFrameworks\";\n+ private const string TestAdapterFolderName = \"TestAdapter\";\n- private readonly Dictionary<string, string> frameworkDirectories;\n+ private readonly Dictionary<string, string> frameworkDirectories = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n+\n+ public static string TestFrameworksFolder1 => TestFrameworksFolderName;\npublic TestFrameworkDirectories()\n{\n- this.frameworkDirectories = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n-\nvar testFrameworkRoot = GetTestframeworkFolderRoot();\nif (!Directory.Exists(testFrameworkRoot))\n{\n@@ -31,7 +31,7 @@ namespace Microsoft.NodejsTools.TestFrameworks\nthis.frameworkDirectories.Add(name, directory);\n}\n- if (!this.frameworkDirectories.TryGetValue(ExportRunnerFramework, out var defaultFx) || string.IsNullOrEmpty(defaultFx))\n+ if (!this.frameworkDirectories.TryGetValue(ExportRunnerFrameworkName, out var defaultFx) || string.IsNullOrEmpty(defaultFx))\n{\nthrow new InvalidOperationException(\"Missing generic test framework\");\n}\n@@ -51,26 +51,25 @@ namespace Microsoft.NodejsTools.TestFrameworks\n//\n// However in both cases, we should just go up a folder to the nodejstools root, and then into the TestAdapter folder.\n+ string testAdapterAssemblyFolder;\n+\nvar currentAssembly = typeof(TestFrameworkDirectories).Assembly;\nif (currentAssembly.FullName.StartsWith(\"Microsoft.NodejsTools.TestAdapter\", StringComparison.OrdinalIgnoreCase))\n{\n- var testAdapterAssemblyFolder = Path.GetDirectoryName(currentAssembly.Location);\n-\n- return Path.Combine(testAdapterAssemblyFolder, TestFrameworksDirectory);\n+ testAdapterAssemblyFolder = Path.GetDirectoryName(currentAssembly.Location);\n+ }\n+ else if (currentAssembly.FullName.StartsWith(\"Microsoft.NodejsTools\", StringComparison.OrdinalIgnoreCase))\n+ {\n+ var NodeJsToolsFolder = Path.GetDirectoryName(currentAssembly.Location);\n+ testAdapterAssemblyFolder = Path.Combine(Path.GetDirectoryName(NodeJsToolsFolder), TestAdapterFolderName);\n+ }\n+ else\n+ {\n+ throw new InvalidOperationException($\"Unable to find '{TestFrameworksFolderName}' folder.\");\n}\n- System.Diagnostics.Debugger.Launch();\n-\n- var currentAssemblyFolder = Path.GetDirectoryName(currentAssembly.Location);\n- var nodejsRootFolder = Path.GetDirectoryName(currentAssemblyFolder);\n-\n- var baseDirectory = Path.Combine(nodejsRootFolder, TestAdapterDirectory, TestFrameworksDirectory);\n-#if DEBUG\n- // To allow easier debugging of the test adapter, try to use the local directory as a fallback.\n- baseDirectory = Directory.Exists(baseDirectory) ? baseDirectory : Path.Combine(Directory.GetCurrentDirectory(), TestFrameworksDirectory);\n-#endif\n- return baseDirectory;\n+ return Path.Combine(testAdapterAssemblyFolder, TestFrameworksFolderName);\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/ProjectWizard/UnitTestFileWizard.cs", "new_path": "Nodejs/Product/ProjectWizard/UnitTestFileWizard.cs", "diff": "@@ -31,7 +31,7 @@ namespace Microsoft.NodejsTools.ProjectWizard\nif (!replacementsDictionary.TryGetValue(\"TestFramework\", out _framework) ||\nstring.IsNullOrWhiteSpace(_framework))\n{\n- _framework = TestFrameworkDirectories.ExportRunnerFramework;\n+ _framework = TestFrameworkDirectories.ExportRunnerFrameworkName;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "new_path": "Nodejs/Product/TestAdapter/TestExecutor.cs", "diff": "@@ -270,7 +270,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\napp.GetDTE().Debugger.DetachAll();\n// Ensure that --debug-brk is the first argument\n- nodeArgs.InsertRange(0, GetDebugArgs(nodeVersion, out port));\n+ nodeArgs.Insert(0, GetDebugArgs(nodeVersion, out port));\n}\nthis.nodeProcess = ProcessOutput.Run(\n@@ -284,13 +284,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (runContext.IsBeingDebugged && app != null)\n{\n- System.Diagnostics.Debugger.Launch();\n-\ntry\n{\nif (nodeVersion >= Node8Version)\n{\n- app.AttachToProcessNode2DebugAdapter((int)this.nodeProcess.ProcessId, nodeArgs[1]);\n+ app.AttachToProcessNode2DebugAdapter(port);\n}\nelse\n{\n@@ -314,7 +312,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nKillNodeProcess();\n}\n#else\n- } catch (COMException) {\n+ }\n+ catch (COMException)\n+ {\nframeworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\nKillNodeProcess();\n}\n@@ -366,21 +366,16 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn discover.Get(testInfo.TestFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir);\n}\n- private static IEnumerable<string> GetDebugArgs(Version nodeVersion, out int port)\n+ private static string GetDebugArgs(Version nodeVersion, out int port)\n{\nport = GetFreePort();\nif (nodeVersion >= Node8Version)\n{\n- return new[]\n- {\n- $\"--inspect-brk={port}\"\n- };\n+ return $\"--inspect-brk={port}\";\n}\n- return new[] {\n- $\"--debug-brk={port}\"\n- };\n+ return $\"--debug-brk={port}\";\n}\nprivate NodejsProjectSettings LoadProjectSettings(string projectFile)\n@@ -426,6 +421,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nresult.Duration = result.EndTime - result.StartTime;\nresult.Outcome = resultObject.passed ? TestOutcome.Passed : TestOutcome.Failed;\n}\n+\nresult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, string.Join(Environment.NewLine, standardOutputLines)));\nresult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, string.Join(Environment.NewLine, standardErrorLines)));\nresult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, string.Join(Environment.NewLine, standardErrorLines)));\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "new_path": "Nodejs/Product/TestAdapter/VisualStudioApp.cs", "diff": "@@ -181,7 +181,7 @@ namespace Microsoft.VisualStudioTools\nprivate static readonly Guid Node2AttachEngineGuid = Guid.Parse(\"3F14B534-C345-44B5-AF84-642246EEEB62\");\n- public bool AttachToProcessNode2DebugAdapter(int processId, string script)\n+ public bool AttachToProcessNode2DebugAdapter(int port)\n{\nvar dte = (VisualStudio.OLE.Interop.IServiceProvider)GetDTE();\n@@ -189,7 +189,7 @@ namespace Microsoft.VisualStudioTools\n// setup debug info and attach\nvar pDebugEngine = Marshal.AllocCoTaskMem(Marshal.SizeOf<Guid>());\n- var debugUri = $\"http://127.0.0.1:{process.DebuggerPort}\";\n+ var debugUri = $\"http://127.0.0.1:{port}\";\ntry\n{\nMarshal.StructureToPtr(Node2AttachEngineGuid, pDebugEngine, false);\n@@ -204,7 +204,6 @@ namespace Microsoft.VisualStudioTools\ndwProcessId = 1\n};\n-\nvar launchResults = new VsDebugTargetProcessInfo[1];\nvar debugger = (IVsDebugger4)serviceProvider.GetService(typeof(SVsShellDebugger));\ndebugger.LaunchDebugTargets4(1, new[] { dbgInfo }, launchResults);\n@@ -217,7 +216,6 @@ namespace Microsoft.VisualStudioTools\n}\n}\n-\nreturn true;\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Attach for Unit Tests
410,217
31.10.2017 14:51:08
25,200
707e9b1baf07c21715ef7c191974f2fc349ad193
Add Info Bar when we can't find node Show an info bar on project open/create instead of just a messagebox on debug. This should help users getting started.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "</Compile>\n<Compile Include=\"NpmUI\\PackageCatalogEntryViewModel.cs\" />\n<Compile Include=\"Project\\AzureToolsContracts.cs\" />\n+ <Compile Include=\"Project\\MissingNodeInfoBar.cs\" />\n<Compile Include=\"Project\\NewFileMenuGroup\\NewFileUtilities.cs\" />\n<Compile Include=\"Project\\NewFileMenuGroup\\NewFileNameForm.cs\">\n<SubType>Form</SubType>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "diff": "@@ -31,6 +31,8 @@ namespace Microsoft.NodejsTools.Project\nprivate string _intermediateOutputPath;\nprivate readonly Dictionary<NodejsProjectImageName, int> _imageIndexFromNameDictionary = new Dictionary<NodejsProjectImageName, int>();\n+ private readonly MissingNodeInfoBar infoBarManager;\n+\n// We delay analysis until things calm down in the node_modules folder.\n#pragma warning disable 0414\nprivate readonly object _idleNodeModulesLock = new object();\n@@ -46,6 +48,7 @@ namespace Microsoft.NodejsTools.Project\nInitNodejsProjectImages();\n#pragma warning restore 0612\n+ infoBarManager = new MissingNodeInfoBar(package);\n}\nprivate void OnIdleNodeModules(object state)\n@@ -343,6 +346,27 @@ namespace Microsoft.NodejsTools.Project\n}\n}\n+ public override void Load(string filename, string location, string name, uint flags, ref Guid iidProject, out int canceled)\n+ {\n+ base.Load(filename, location, name, flags, ref iidProject, out canceled);\n+\n+ // check the property\n+ var nodeProperty = GetProjectProperty(NodeProjectProperty.NodeExePath);\n+ if (!string.IsNullOrEmpty(nodeProperty))\n+ {\n+ return;\n+ }\n+\n+ // see if we can locate the Node.js runtime from the environment\n+ if (!string.IsNullOrEmpty(Nodejs.GetPathToNodeExecutableFromEnvironment()))\n+ {\n+ return;\n+ }\n+\n+ // show info bar\n+ infoBarManager.Show(this);\n+ }\n+\nprivate void UpdateProjectNodeFromProjectProperties()\n{\nthis._intermediateOutputPath = Path.Combine(this.ProjectHome, GetProjectProperty(\"BaseIntermediateOutputPath\"));\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -143,6 +143,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Configure project properties.\n+ /// </summary>\n+ internal static string ConfigureProjectProperties {\n+ get {\n+ return ResourceManager.GetString(\"ConfigureProjectProperties\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Please select a startup file to launch by right-clicking the file in Solution Explorer and selecting &apos;Set as Node.js Startup File&apos; or by modifying your configuration in project properties.\n/// </summary>\n@@ -252,6 +261,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Download Node.js.\n+ /// </summary>\n+ internal static string DownloadNodejs {\n+ get {\n+ return ResourceManager.GetString(\"DownloadNodejs\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Specifies environment variables to be set in the spawned process in the form:\n///\n@@ -670,6 +688,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Could not find a Node.js runtime on your computer. Please download and install the current Node.js runtime and restart VS, or specify the location of the Node runtime in the project&apos;s properties page..\n+ /// </summary>\n+ internal static string NodejsNotInstalledInfoBar {\n+ get {\n+ return ResourceManager.GetString(\"NodejsNotInstalledInfoBar\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Node.js has not been detected on your computer.\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -722,4 +722,13 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Node.js Version: {0}</value>\n<comment>template is substituted with version info</comment>\n</data>\n+ <data name=\"ConfigureProjectProperties\" xml:space=\"preserve\">\n+ <value>Configure project properties</value>\n+ </data>\n+ <data name=\"DownloadNodejs\" xml:space=\"preserve\">\n+ <value>Download Node.js</value>\n+ </data>\n+ <data name=\"NodejsNotInstalledInfoBar\" xml:space=\"preserve\">\n+ <value>Could not find a Node.js runtime on your computer. Please download and install the current Node.js runtime and restart VS, or specify the location of the Node runtime in the project's properties page.</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add Info Bar when we can't find node Show an info bar on project open/create instead of just a messagebox on debug. This should help users getting started.
410,217
31.10.2017 17:00:18
25,200
681602aa878ccd05522c18df5e2d28e577ba6efc
Update text in info bar.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -689,7 +689,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Could not find a Node.js runtime on your computer. Please download and install the current Node.js runtime and restart VS, or specify the location of the Node runtime in the project&apos;s properties page..\n+ /// Looks up a localized string similar to Could not find a Node.js runtime on your computer. Please install Node.js and restart VS, or specify the location of node.exe in the project properties page..\n/// </summary>\ninternal static string NodejsNotInstalledInfoBar {\nget {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -729,6 +729,6 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Download Node.js</value>\n</data>\n<data name=\"NodejsNotInstalledInfoBar\" xml:space=\"preserve\">\n- <value>Could not find a Node.js runtime on your computer. Please download and install the current Node.js runtime and restart VS, or specify the location of the Node runtime in the project's properties page.</value>\n+ <value>Could not find a Node.js runtime on your computer. Please install Node.js and restart VS, or specify the location of node.exe in the project properties page.</value>\n</data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Update text in info bar.
410,217
01.11.2017 14:52:07
25,200
916547e42390af4ffce13a9ae2d417a5de3aaa04
Detach the debugger when done testing Since Node 8 doesn't exit when debugging unless you detach, we should detach when the test are done.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs", "diff": "@@ -58,6 +58,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate readonly ManualResetEvent cancelRequested = new ManualResetEvent(false);\n+ private readonly ManualResetEvent testsCompleted = new ManualResetEvent(false);\n+\nprivate static readonly char[] needToBeQuoted = new[] { ' ', '\"' };\nprivate ProcessOutput nodeProcess;\nprivate object syncObject = new object();\n@@ -87,8 +89,10 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\ncase \"test start\":\n{\n- this.currentResult = new TestResult(tests.First());\n- this.currentResult.StartTime = DateTimeOffset.Now;\n+ this.currentResult = new TestResult(tests.First())\n+ {\n+ StartTime = DateTimeOffset.Now\n+ };\nthis.frameworkHandle.RecordStart(tests.First());\n}\nbreak;\n@@ -108,6 +112,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nelse if (testEvent.type == \"suite end\")\n{\nthis.currentResultObject = testEvent.result;\n+ this.testsCompleted.Set();\n}\n}\ncatch (JsonReaderException)\n@@ -272,6 +277,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nnodeArgs.Insert(0, GetDebugArgs(nodeVersion, out port));\n}\n+ // make sure the testscompleted is not signalled.\n+ this.testsCompleted.Reset();\n+\nthis.nodeProcess = ProcessOutput.Run(\nsettings.NodeExePath,\nnodeArgs,\n@@ -321,13 +329,22 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n// Send the process the list of tests to run and wait for it to complete\nthis.nodeProcess.WriteInputLine(JsonConvert.SerializeObject(testObjects));\n- this.nodeProcess.Wait();\n+\n+ // for node 8 the process doesn't automatically exit when debugging, so always detach\n+ WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted });\n+ if(runContext.IsBeingDebugged && app != null)\n+ {\n+ app.GetDTE().Debugger.DetachAll();\n+ }\n// Automatically fail tests that haven't been run by this point (failures in before() hooks)\nforeach (var notRunTest in this.currentTests)\n{\n- var result = new TestResult(notRunTest);\n- result.Outcome = TestOutcome.Failed;\n+ var result = new TestResult(notRunTest)\n+ {\n+ Outcome = TestOutcome.Failed\n+ };\n+\nif (this.currentResultObject != null)\n{\nresult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, this.currentResultObject.stdout));\n@@ -343,10 +360,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nlock (this.syncObject)\n{\n- if (this.nodeProcess != null)\n- {\n- this.nodeProcess.Kill();\n- }\n+ this.nodeProcess?.Kill();\n}\n}\n@@ -436,19 +450,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n-internal class DataReceiver\n-{\n- public readonly StringBuilder Data = new StringBuilder();\n-\n- public void DataReceived(object sender, DataReceivedEventArgs e)\n- {\n- if (e.Data != null)\n- {\n- this.Data.AppendLine(e.Data);\n- }\n- }\n-}\n-\ninternal class TestReceiver : ITestCaseDiscoverySink\n{\npublic List<TestCase> Tests { get; } = new List<TestCase>();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Detach the debugger when done testing Since Node 8 doesn't exit when debugging unless you detach, we should detach when the test are done.
410,217
02.11.2017 17:06:04
25,200
04d62664abc82071e0c25ba78e6538f6e0e72ae3
Re-order the project property page This is in preparation for some other changes.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "diff": "private void InitializeComponent()\n{\nthis.components = new System.ComponentModel.Container();\n- this._nodeExePathLabel = new System.Windows.Forms.Label();\n+ System.Windows.Forms.TableLayoutPanel startActionTableLayoutPanel;\n+ System.Windows.Forms.TableLayoutPanel nodeHeaderTableLayoutPanel;\nthis._nodeArgumentsLabel = new System.Windows.Forms.Label();\nthis._scriptLabel = new System.Windows.Forms.Label();\nthis._scriptArgsLabel = new System.Windows.Forms.Label();\nthis._nodePortLabel = new System.Windows.Forms.Label();\nthis._debuggerPortLabel = new System.Windows.Forms.Label();\nthis._envVarsLabel = new System.Windows.Forms.Label();\n- this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\n- this._nodeExePath = new System.Windows.Forms.TextBox();\n- this._browsePath = new System.Windows.Forms.Button();\n- this._nodeExeArguments = new System.Windows.Forms.TextBox();\n+ this.overallPanel = new System.Windows.Forms.TableLayoutPanel();\n+ this.startActionHeaderLabelLine = new System.Windows.Forms.Label();\n+ this._startActionHeaderLabel = new System.Windows.Forms.Label();\nthis._scriptFile = new System.Windows.Forms.TextBox();\n- this._browseDirectory = new System.Windows.Forms.Button();\nthis._scriptArguments = new System.Windows.Forms.TextBox();\nthis._workingDir = new System.Windows.Forms.TextBox();\n+ this._browseDirectory = new System.Windows.Forms.Button();\nthis._launchUrl = new System.Windows.Forms.TextBox();\nthis._nodejsPort = new System.Windows.Forms.TextBox();\n- this._debuggerPort = new System.Windows.Forms.TextBox();\nthis._envVars = new System.Windows.Forms.TextBox();\nthis._startBrowser = new System.Windows.Forms.CheckBox();\n+ this.nodeHeaderLabelLine = new System.Windows.Forms.Label();\n+ this._nodeHeaderLabel = new System.Windows.Forms.Label();\n+ this._nodeExePathLabel = new System.Windows.Forms.Label();\n+ this._nodeExePath = new System.Windows.Forms.TextBox();\n+ this._browsePath = new System.Windows.Forms.Button();\n+ this._nodeExeArguments = new System.Windows.Forms.TextBox();\n+ this._debuggerPort = new System.Windows.Forms.TextBox();\nthis._tooltip = new System.Windows.Forms.ToolTip(this.components);\nthis._nodeExeErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);\n- this.tableLayoutPanel1.SuspendLayout();\n+ startActionTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\n+ nodeHeaderTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\n+ this.overallPanel.SuspendLayout();\n+ startActionTableLayoutPanel.SuspendLayout();\n+ nodeHeaderTableLayoutPanel.SuspendLayout();\n((System.ComponentModel.ISupportInitialize)(this._nodeExeErrorProvider)).BeginInit();\nthis.SuspendLayout();\n//\n- // _nodeExePathLabel\n- //\n- this._nodeExePathLabel.AutoSize = true;\n- this._nodeExePathLabel.Location = new System.Drawing.Point(3, 3);\n- this._nodeExePathLabel.Margin = new System.Windows.Forms.Padding(3);\n- this._nodeExePathLabel.Name = \"_nodeExePathLabel\";\n- this._nodeExePathLabel.Size = new System.Drawing.Size(103, 13);\n- this._nodeExePathLabel.TabIndex = 0;\n- this._nodeExePathLabel.Text = \"_nodeExePathLabel\";\n- //\n// _nodeArgumentsLabel\n//\nthis._nodeArgumentsLabel.AutoSize = true;\n- this._nodeArgumentsLabel.Location = new System.Drawing.Point(3, 32);\n+ this._nodeArgumentsLabel.Location = new System.Drawing.Point(3, 304);\nthis._nodeArgumentsLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._nodeArgumentsLabel.Name = \"_nodeArgumentsLabel\";\n- this._nodeArgumentsLabel.Size = new System.Drawing.Size(87, 13);\n- this._nodeArgumentsLabel.TabIndex = 3;\n+ this._nodeArgumentsLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._nodeArgumentsLabel.Size = new System.Drawing.Size(97, 13);\n+ this._nodeArgumentsLabel.TabIndex = 19;\nthis._nodeArgumentsLabel.Text = \"_nodeArguments\";\n//\n// _scriptLabel\n//\nthis._scriptLabel.AutoSize = true;\n- this._scriptLabel.Location = new System.Drawing.Point(3, 58);\n+ this._scriptLabel.Location = new System.Drawing.Point(3, 16);\nthis._scriptLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._scriptLabel.Name = \"_scriptLabel\";\n- this._scriptLabel.Size = new System.Drawing.Size(64, 13);\n- this._scriptLabel.TabIndex = 5;\n+ this._scriptLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._scriptLabel.Size = new System.Drawing.Size(74, 13);\n+ this._scriptLabel.TabIndex = 2;\nthis._scriptLabel.Text = \"_scriptLabel\";\n//\n// _scriptArgsLabel\n//\nthis._scriptArgsLabel.AutoSize = true;\n- this._scriptArgsLabel.Location = new System.Drawing.Point(3, 84);\n+ this._scriptArgsLabel.Location = new System.Drawing.Point(3, 42);\nthis._scriptArgsLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._scriptArgsLabel.Name = \"_scriptArgsLabel\";\n- this._scriptArgsLabel.Size = new System.Drawing.Size(85, 13);\n- this._scriptArgsLabel.TabIndex = 7;\n+ this._scriptArgsLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._scriptArgsLabel.Size = new System.Drawing.Size(95, 13);\n+ this._scriptArgsLabel.TabIndex = 4;\nthis._scriptArgsLabel.Text = \"_scriptArgsLabel\";\n//\n// _workingDirLabel\n//\nthis._workingDirLabel.AutoSize = true;\n- this._workingDirLabel.Location = new System.Drawing.Point(3, 110);\n+ this._workingDirLabel.Location = new System.Drawing.Point(3, 68);\nthis._workingDirLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._workingDirLabel.Name = \"_workingDirLabel\";\n- this._workingDirLabel.Size = new System.Drawing.Size(89, 13);\n- this._workingDirLabel.TabIndex = 9;\n+ this._workingDirLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._workingDirLabel.Size = new System.Drawing.Size(99, 13);\n+ this._workingDirLabel.TabIndex = 6;\nthis._workingDirLabel.Text = \"_workingDirLabel\";\n//\n// _launchUrlLabel\n//\nthis._launchUrlLabel.AutoSize = true;\n- this._launchUrlLabel.Location = new System.Drawing.Point(3, 139);\n+ this._launchUrlLabel.Location = new System.Drawing.Point(3, 97);\nthis._launchUrlLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._launchUrlLabel.Name = \"_launchUrlLabel\";\n- this._launchUrlLabel.Size = new System.Drawing.Size(84, 13);\n- this._launchUrlLabel.TabIndex = 12;\n+ this._launchUrlLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._launchUrlLabel.Size = new System.Drawing.Size(94, 13);\n+ this._launchUrlLabel.TabIndex = 9;\nthis._launchUrlLabel.Text = \"_launchUrlLabel\";\n//\n// _nodePortLabel\n//\nthis._nodePortLabel.AutoSize = true;\n- this._nodePortLabel.Location = new System.Drawing.Point(3, 165);\n+ this._nodePortLabel.Location = new System.Drawing.Point(3, 123);\nthis._nodePortLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._nodePortLabel.Name = \"_nodePortLabel\";\n- this._nodePortLabel.Size = new System.Drawing.Size(82, 13);\n- this._nodePortLabel.TabIndex = 14;\n+ this._nodePortLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._nodePortLabel.Size = new System.Drawing.Size(92, 13);\n+ this._nodePortLabel.TabIndex = 11;\nthis._nodePortLabel.Text = \"_nodePortLabel\";\n//\n// _debuggerPortLabel\n//\nthis._debuggerPortLabel.AutoSize = true;\n- this._debuggerPortLabel.Location = new System.Drawing.Point(3, 191);\n+ this._debuggerPortLabel.Location = new System.Drawing.Point(3, 330);\nthis._debuggerPortLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._debuggerPortLabel.Name = \"_debuggerPortLabel\";\n- this._debuggerPortLabel.Size = new System.Drawing.Size(103, 13);\n- this._debuggerPortLabel.TabIndex = 16;\n+ this._debuggerPortLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._debuggerPortLabel.Size = new System.Drawing.Size(113, 13);\n+ this._debuggerPortLabel.TabIndex = 21;\nthis._debuggerPortLabel.Text = \"_debuggerPortLabel\";\n//\n// _envVarsLabel\n//\nthis._envVarsLabel.AutoSize = true;\n- this._envVarsLabel.Location = new System.Drawing.Point(3, 217);\n+ this._envVarsLabel.Location = new System.Drawing.Point(3, 149);\nthis._envVarsLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._envVarsLabel.Name = \"_envVarsLabel\";\n- this._envVarsLabel.Size = new System.Drawing.Size(78, 13);\n- this._envVarsLabel.TabIndex = 18;\n+ this._envVarsLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._envVarsLabel.Size = new System.Drawing.Size(88, 13);\n+ this._envVarsLabel.TabIndex = 13;\nthis._envVarsLabel.Text = \"_envVarsLabel\";\n//\n- // tableLayoutPanel1\n- //\n- this.tableLayoutPanel1.ColumnCount = 3;\n- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- this.tableLayoutPanel1.Controls.Add(this._nodeExePathLabel, 0, 0);\n- this.tableLayoutPanel1.Controls.Add(this._nodeExePath, 1, 0);\n- this.tableLayoutPanel1.Controls.Add(this._browsePath, 2, 0);\n- this.tableLayoutPanel1.Controls.Add(this._nodeArgumentsLabel, 0, 1);\n- this.tableLayoutPanel1.Controls.Add(this._nodeExeArguments, 1, 1);\n- this.tableLayoutPanel1.Controls.Add(this._scriptLabel, 0, 2);\n- this.tableLayoutPanel1.Controls.Add(this._scriptFile, 1, 2);\n- this.tableLayoutPanel1.Controls.Add(this._scriptArgsLabel, 0, 3);\n- this.tableLayoutPanel1.Controls.Add(this._scriptArguments, 1, 3);\n- this.tableLayoutPanel1.Controls.Add(this._workingDirLabel, 0, 4);\n- this.tableLayoutPanel1.Controls.Add(this._workingDir, 1, 4);\n- this.tableLayoutPanel1.Controls.Add(this._browseDirectory, 2, 4);\n- this.tableLayoutPanel1.Controls.Add(this._launchUrlLabel, 0, 5);\n- this.tableLayoutPanel1.Controls.Add(this._launchUrl, 1, 5);\n- this.tableLayoutPanel1.Controls.Add(this._nodePortLabel, 0, 6);\n- this.tableLayoutPanel1.Controls.Add(this._nodejsPort, 1, 6);\n- this.tableLayoutPanel1.Controls.Add(this._debuggerPortLabel, 0, 7);\n- this.tableLayoutPanel1.Controls.Add(this._debuggerPort, 1, 7);\n- this.tableLayoutPanel1.Controls.Add(this._envVarsLabel, 0, 8);\n- this.tableLayoutPanel1.Controls.Add(this._envVars, 1, 8);\n- this.tableLayoutPanel1.Controls.Add(this._startBrowser, 0, 9);\n- this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\n- this.tableLayoutPanel1.Name = \"tableLayoutPanel1\";\n- this.tableLayoutPanel1.RowCount = 10;\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 500);\n- this.tableLayoutPanel1.TabIndex = 0;\n- //\n- // _nodeExePath\n- //\n- this._nodeExePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n- | System.Windows.Forms.AnchorStyles.Right)));\n- this._nodeExePath.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;\n- this._nodeExePath.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;\n- this._nodeExePath.BackColor = System.Drawing.SystemColors.Window;\n- this._nodeExePath.Location = new System.Drawing.Point(112, 3);\n- this._nodeExePath.Name = \"_nodeExePath\";\n- this._nodeExePath.Size = new System.Drawing.Size(620, 20);\n- this._nodeExePath.TabIndex = 1;\n- this._nodeExePath.TextChanged += new System.EventHandler(this.NodeExePathChanged);\n- //\n- // _browsePath\n- //\n- this._browsePath.AutoSize = true;\n- this._browsePath.Location = new System.Drawing.Point(738, 3);\n- this._browsePath.Name = \"_browsePath\";\n- this._browsePath.Size = new System.Drawing.Size(26, 23);\n- this._browsePath.TabIndex = 2;\n- this._browsePath.Text = \"...\";\n- this._browsePath.UseVisualStyleBackColor = true;\n- this._browsePath.Click += new System.EventHandler(this.BrowsePathClick);\n- //\n- // _nodeExeArguments\n- //\n- this._nodeExeArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n- | System.Windows.Forms.AnchorStyles.Right)));\n- this._nodeExeArguments.Location = new System.Drawing.Point(112, 32);\n- this._nodeExeArguments.Name = \"_nodeExeArguments\";\n- this._nodeExeArguments.Size = new System.Drawing.Size(620, 20);\n- this._nodeExeArguments.TabIndex = 4;\n- this._nodeExeArguments.TextChanged += new System.EventHandler(this.Changed);\n+ // overallPanel\n+ //\n+ this.overallPanel.AutoSize = true;\n+ this.overallPanel.ColumnCount = 3;\n+ this.overallPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ this.overallPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ this.overallPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ this.overallPanel.Controls.Add(startActionTableLayoutPanel, 0, 0);\n+ this.overallPanel.Controls.Add(this._scriptLabel, 0, 1);\n+ this.overallPanel.Controls.Add(this._scriptFile, 1, 1);\n+ this.overallPanel.Controls.Add(this._scriptArgsLabel, 0, 2);\n+ this.overallPanel.Controls.Add(this._scriptArguments, 1, 2);\n+ this.overallPanel.Controls.Add(this._workingDirLabel, 0, 3);\n+ this.overallPanel.Controls.Add(this._workingDir, 1, 3);\n+ this.overallPanel.Controls.Add(this._browseDirectory, 2, 3);\n+ this.overallPanel.Controls.Add(this._launchUrlLabel, 0, 4);\n+ this.overallPanel.Controls.Add(this._launchUrl, 1, 4);\n+ this.overallPanel.Controls.Add(this._nodePortLabel, 0, 5);\n+ this.overallPanel.Controls.Add(this._nodejsPort, 1, 5);\n+ this.overallPanel.Controls.Add(this._envVarsLabel, 0, 6);\n+ this.overallPanel.Controls.Add(this._envVars, 1, 6);\n+ this.overallPanel.Controls.Add(this._startBrowser, 0, 7);\n+ this.overallPanel.Controls.Add(nodeHeaderTableLayoutPanel, 0, 8);\n+ this.overallPanel.Controls.Add(this._nodeExePathLabel, 0, 9);\n+ this.overallPanel.Controls.Add(this._nodeExePath, 1, 9);\n+ this.overallPanel.Controls.Add(this._browsePath, 2, 9);\n+ this.overallPanel.Controls.Add(this._nodeArgumentsLabel, 0, 10);\n+ this.overallPanel.Controls.Add(this._nodeExeArguments, 1, 10);\n+ this.overallPanel.Controls.Add(this._debuggerPortLabel, 0, 11);\n+ this.overallPanel.Controls.Add(this._debuggerPort, 1, 11);\n+ this.overallPanel.Location = new System.Drawing.Point(0, 0);\n+ this.overallPanel.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);\n+ this.overallPanel.Name = \"overallPanel\";\n+ this.overallPanel.RowCount = 12;\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));\n+ this.overallPanel.Size = new System.Drawing.Size(800, 500);\n+ this.overallPanel.TabIndex = 0;\n+ //\n+ // startActionTableLayoutPanel\n+ //\n+ startActionTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ startActionTableLayoutPanel.AutoSize = true;\n+ startActionTableLayoutPanel.ColumnCount = 2;\n+ this.overallPanel.SetColumnSpan(startActionTableLayoutPanel, 3);\n+ startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ startActionTableLayoutPanel.Controls.Add(this.startActionHeaderLabelLine, 1, 0);\n+ startActionTableLayoutPanel.Controls.Add(this._startActionHeaderLabel, 0, 0);\n+ startActionTableLayoutPanel.Location = new System.Drawing.Point(0, 0);\n+ startActionTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n+ startActionTableLayoutPanel.Name = \"startActionTableLayoutPanel\";\n+ startActionTableLayoutPanel.RowCount = 1;\n+ startActionTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ startActionTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ startActionTableLayoutPanel.TabIndex = 0;\n+ //\n+ // startActionHeaderLabelLine\n+ //\n+ this.startActionHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n+ this.startActionHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ this.startActionHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n+ this.startActionHeaderLabelLine.Location = new System.Drawing.Point(130, 6);\n+ this.startActionHeaderLabelLine.Name = \"startActionHeaderLabelLine\";\n+ this.startActionHeaderLabelLine.Size = new System.Drawing.Size(667, 1);\n+ this.startActionHeaderLabelLine.TabIndex = 1;\n+ //\n+ // _startActionHeaderLabel\n+ //\n+ this._startActionHeaderLabel.AutoSize = true;\n+ this._startActionHeaderLabel.Location = new System.Drawing.Point(0, 0);\n+ this._startActionHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n+ this._startActionHeaderLabel.Name = \"_startActionHeaderLabel\";\n+ this._startActionHeaderLabel.Size = new System.Drawing.Size(124, 13);\n+ this._startActionHeaderLabel.TabIndex = 0;\n+ this._startActionHeaderLabel.Text = \"_startActionHeaderLabel\";\n//\n// _scriptFile\n//\nthis._scriptFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._scriptFile.Location = new System.Drawing.Point(112, 58);\n+ this._scriptFile.Location = new System.Drawing.Point(122, 16);\nthis._scriptFile.Name = \"_scriptFile\";\nthis._scriptFile.Size = new System.Drawing.Size(620, 20);\n- this._scriptFile.TabIndex = 6;\n+ this._scriptFile.TabIndex = 3;\nthis._scriptFile.TextChanged += new System.EventHandler(this.Changed);\n//\n- // _browseDirectory\n- //\n- this._browseDirectory.AutoSize = true;\n- this._browseDirectory.Location = new System.Drawing.Point(738, 110);\n- this._browseDirectory.Name = \"_browseDirectory\";\n- this._browseDirectory.Size = new System.Drawing.Size(26, 23);\n- this._browseDirectory.TabIndex = 11;\n- this._browseDirectory.Text = \"...\";\n- this._browseDirectory.UseVisualStyleBackColor = true;\n- this._browseDirectory.Click += new System.EventHandler(this.BrowseDirectoryClick);\n- //\n// _scriptArguments\n//\nthis._scriptArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._scriptArguments.Location = new System.Drawing.Point(112, 84);\n+ this._scriptArguments.Location = new System.Drawing.Point(122, 42);\nthis._scriptArguments.Name = \"_scriptArguments\";\nthis._scriptArguments.Size = new System.Drawing.Size(620, 20);\n- this._scriptArguments.TabIndex = 8;\n+ this._scriptArguments.TabIndex = 5;\nthis._scriptArguments.TextChanged += new System.EventHandler(this.Changed);\n//\n// _workingDir\n//\nthis._workingDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._workingDir.Location = new System.Drawing.Point(112, 110);\n+ this._workingDir.Location = new System.Drawing.Point(122, 68);\nthis._workingDir.Name = \"_workingDir\";\nthis._workingDir.Size = new System.Drawing.Size(620, 20);\n- this._workingDir.TabIndex = 10;\n+ this._workingDir.TabIndex = 7;\nthis._workingDir.TextChanged += new System.EventHandler(this.WorkingDirChanged);\n//\n+ // _browseDirectory\n+ //\n+ this._browseDirectory.AutoSize = true;\n+ this._browseDirectory.Location = new System.Drawing.Point(748, 68);\n+ this._browseDirectory.Name = \"_browseDirectory\";\n+ this._browseDirectory.Size = new System.Drawing.Size(26, 23);\n+ this._browseDirectory.TabIndex = 8;\n+ this._browseDirectory.Text = \"...\";\n+ this._browseDirectory.UseVisualStyleBackColor = true;\n+ this._browseDirectory.Click += new System.EventHandler(this.BrowseDirectoryClick);\n+ //\n// _launchUrl\n//\nthis._launchUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._launchUrl.Location = new System.Drawing.Point(112, 139);\n+ this._launchUrl.Location = new System.Drawing.Point(122, 97);\nthis._launchUrl.Name = \"_launchUrl\";\nthis._launchUrl.Size = new System.Drawing.Size(620, 20);\n- this._launchUrl.TabIndex = 13;\n+ this._launchUrl.TabIndex = 10;\nthis._launchUrl.TextChanged += new System.EventHandler(this.Changed);\n//\n// _nodejsPort\n//\n- this._nodejsPort.Location = new System.Drawing.Point(112, 165);\n+ this._nodejsPort.Location = new System.Drawing.Point(122, 123);\nthis._nodejsPort.Name = \"_nodejsPort\";\nthis._nodejsPort.Size = new System.Drawing.Size(105, 20);\n- this._nodejsPort.TabIndex = 15;\n+ this._nodejsPort.TabIndex = 12;\nthis._nodejsPort.TextChanged += new System.EventHandler(this.PortChanged);\n//\n- // _debuggerPort\n- //\n- this._debuggerPort.Location = new System.Drawing.Point(112, 191);\n- this._debuggerPort.Name = \"_debuggerPort\";\n- this._debuggerPort.Size = new System.Drawing.Size(105, 20);\n- this._debuggerPort.TabIndex = 17;\n- this._debuggerPort.TextChanged += new System.EventHandler(this.PortChanged);\n- //\n// _envVars\n//\nthis._envVars.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._envVars.Location = new System.Drawing.Point(112, 217);\n+ this._envVars.Location = new System.Drawing.Point(122, 149);\nthis._envVars.Multiline = true;\nthis._envVars.Name = \"_envVars\";\nthis._envVars.ScrollBars = System.Windows.Forms.ScrollBars.Both;\nthis._envVars.Size = new System.Drawing.Size(620, 84);\n- this._envVars.TabIndex = 19;\n+ this._envVars.TabIndex = 14;\nthis._envVars.TextChanged += new System.EventHandler(this.Changed);\n//\n// _startBrowser\n//\nthis._startBrowser.AutoSize = true;\n- this.tableLayoutPanel1.SetColumnSpan(this._startBrowser, 3);\n- this._startBrowser.Location = new System.Drawing.Point(3, 307);\n+ this.overallPanel.SetColumnSpan(this._startBrowser, 3);\n+ this._startBrowser.Location = new System.Drawing.Point(3, 239);\nthis._startBrowser.Name = \"_startBrowser\";\n- this._startBrowser.Size = new System.Drawing.Size(90, 17);\n- this._startBrowser.TabIndex = 20;\n+ this._startBrowser.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._startBrowser.Size = new System.Drawing.Size(100, 17);\n+ this._startBrowser.TabIndex = 15;\nthis._startBrowser.Text = \"_startBrowser\";\nthis._startBrowser.UseVisualStyleBackColor = true;\nthis._startBrowser.CheckedChanged += new System.EventHandler(this.Changed);\n//\n+ // nodeHeaderTableLayoutPanel\n+ //\n+ nodeHeaderTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ nodeHeaderTableLayoutPanel.AutoSize = true;\n+ nodeHeaderTableLayoutPanel.ColumnCount = 2;\n+ this.overallPanel.SetColumnSpan(nodeHeaderTableLayoutPanel, 3);\n+ nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ nodeHeaderTableLayoutPanel.Controls.Add(this.nodeHeaderLabelLine, 1, 0);\n+ nodeHeaderTableLayoutPanel.Controls.Add(this._nodeHeaderLabel, 0, 0);\n+ nodeHeaderTableLayoutPanel.Location = new System.Drawing.Point(0, 259);\n+ nodeHeaderTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n+ nodeHeaderTableLayoutPanel.Name = \"nodeHeaderTableLayoutPanel\";\n+ nodeHeaderTableLayoutPanel.RowCount = 1;\n+ nodeHeaderTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ nodeHeaderTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ nodeHeaderTableLayoutPanel.TabIndex = 0;\n+ //\n+ // nodeHeaderLabelLine\n+ //\n+ this.nodeHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n+ this.nodeHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ this.nodeHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n+ this.nodeHeaderLabelLine.Location = new System.Drawing.Point(104, 6);\n+ this.nodeHeaderLabelLine.Name = \"nodeHeaderLabelLine\";\n+ this.nodeHeaderLabelLine.Size = new System.Drawing.Size(693, 1);\n+ this.nodeHeaderLabelLine.TabIndex = 16;\n+ //\n+ // _nodeHeaderLabel\n+ //\n+ this._nodeHeaderLabel.AutoSize = true;\n+ this._nodeHeaderLabel.Location = new System.Drawing.Point(0, 0);\n+ this._nodeHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n+ this._nodeHeaderLabel.Name = \"_nodeHeaderLabel\";\n+ this._nodeHeaderLabel.Size = new System.Drawing.Size(98, 13);\n+ this._nodeHeaderLabel.TabIndex = 16;\n+ this._nodeHeaderLabel.Text = \"_nodeHeaderLabel\";\n+ //\n+ // _nodeExePathLabel\n+ //\n+ this._nodeExePathLabel.AutoSize = true;\n+ this._nodeExePathLabel.Location = new System.Drawing.Point(3, 275);\n+ this._nodeExePathLabel.Margin = new System.Windows.Forms.Padding(3);\n+ this._nodeExePathLabel.Name = \"_nodeExePathLabel\";\n+ this._nodeExePathLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._nodeExePathLabel.Size = new System.Drawing.Size(113, 13);\n+ this._nodeExePathLabel.TabIndex = 17;\n+ this._nodeExePathLabel.Text = \"_nodeExePathLabel\";\n+ //\n+ // _nodeExePath\n+ //\n+ this._nodeExePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n+ | System.Windows.Forms.AnchorStyles.Right)));\n+ this._nodeExePath.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;\n+ this._nodeExePath.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;\n+ this._nodeExePath.BackColor = System.Drawing.SystemColors.Window;\n+ this._nodeExePath.Location = new System.Drawing.Point(122, 275);\n+ this._nodeExePath.Name = \"_nodeExePath\";\n+ this._nodeExePath.Size = new System.Drawing.Size(620, 20);\n+ this._nodeExePath.TabIndex = 18;\n+ this._nodeExePath.TextChanged += new System.EventHandler(this.NodeExePathChanged);\n+ //\n+ // _browsePath\n+ //\n+ this._browsePath.AutoSize = true;\n+ this._browsePath.Location = new System.Drawing.Point(748, 275);\n+ this._browsePath.Name = \"_browsePath\";\n+ this._browsePath.Size = new System.Drawing.Size(26, 23);\n+ this._browsePath.TabIndex = 19;\n+ this._browsePath.Text = \"...\";\n+ this._browsePath.UseVisualStyleBackColor = true;\n+ this._browsePath.Click += new System.EventHandler(this.BrowsePathClick);\n+ //\n+ // _nodeExeArguments\n+ //\n+ this._nodeExeArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n+ | System.Windows.Forms.AnchorStyles.Right)));\n+ this._nodeExeArguments.Location = new System.Drawing.Point(122, 304);\n+ this._nodeExeArguments.Name = \"_nodeExeArguments\";\n+ this._nodeExeArguments.Size = new System.Drawing.Size(620, 20);\n+ this._nodeExeArguments.TabIndex = 20;\n+ this._nodeExeArguments.TextChanged += new System.EventHandler(this.Changed);\n+ //\n+ // _debuggerPort\n+ //\n+ this._debuggerPort.Location = new System.Drawing.Point(122, 330);\n+ this._debuggerPort.Name = \"_debuggerPort\";\n+ this._debuggerPort.Size = new System.Drawing.Size(105, 20);\n+ this._debuggerPort.TabIndex = 22;\n+ this._debuggerPort.TextChanged += new System.EventHandler(this.PortChanged);\n+ //\n// _nodeExeErrorProvider\n//\nthis._nodeExeErrorProvider.ContainerControl = this;\n//\nthis.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\nthis.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n- this.Controls.Add(this.tableLayoutPanel1);\n+ this.AutoSize = true;\n+ this.Controls.Add(this.overallPanel);\nthis.MinimumSize = new System.Drawing.Size(850, 550);\nthis.Name = \"NodejsGeneralPropertyPageControl\";\nthis.Size = new System.Drawing.Size(850, 550);\n- this.tableLayoutPanel1.ResumeLayout(false);\n- this.tableLayoutPanel1.PerformLayout();\n+ this.overallPanel.ResumeLayout(false);\n+ this.overallPanel.PerformLayout();\n+ startActionTableLayoutPanel.ResumeLayout(false);\n+ startActionTableLayoutPanel.PerformLayout();\n+ nodeHeaderTableLayoutPanel.ResumeLayout(false);\n+ nodeHeaderTableLayoutPanel.PerformLayout();\n((System.ComponentModel.ISupportInitialize)(this._nodeExeErrorProvider)).EndInit();\nthis.ResumeLayout(false);\n+ this.PerformLayout();\n}\n#endregion\n- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\n+ private System.Windows.Forms.TableLayoutPanel overallPanel;\nprivate System.Windows.Forms.TextBox _nodeExePath;\nprivate System.Windows.Forms.Button _browsePath;\nprivate System.Windows.Forms.TextBox _nodeExeArguments;\nprivate System.Windows.Forms.CheckBox _startBrowser;\nprivate System.Windows.Forms.ToolTip _tooltip;\nprivate System.Windows.Forms.ErrorProvider _nodeExeErrorProvider;\n- private System.Windows.Forms.Label _nodeExePathLabel;\nprivate System.Windows.Forms.Label _nodeArgumentsLabel;\nprivate System.Windows.Forms.Label _scriptLabel;\nprivate System.Windows.Forms.Label _scriptArgsLabel;\nprivate System.Windows.Forms.Label _nodePortLabel;\nprivate System.Windows.Forms.Label _debuggerPortLabel;\nprivate System.Windows.Forms.Label _envVarsLabel;\n+ private System.Windows.Forms.Label _startActionHeaderLabel;\n+ private System.Windows.Forms.Label startActionHeaderLabelLine;\n+ private System.Windows.Forms.Label _nodeHeaderLabel;\n+ private System.Windows.Forms.Label nodeHeaderLabelLine;\n+ private System.Windows.Forms.Label _nodeExePathLabel;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -48,6 +48,8 @@ namespace Microsoft.NodejsTools.Project\nthis._debuggerPortLabel.Text = Resources.PropertiesDebuggerPort;\nthis._envVarsLabel.Text = Resources.PropertiesEnvVars;\nthis._startBrowser.Text = Resources.PropertiesStartBrowser;\n+ this._startActionHeaderLabel.Text = Resources.StartActionHeader;\n+ this._nodeHeaderLabel.Text = Resources.NodeHeader;\nthis._browsePath.AccessibleName = Resources.PropertiesBrowsePathAccessibleName;\nthis._browseDirectory.AccessibleName = Resources.PropertiesBrowseDirectoryAccessibleName;\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.resx", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.resx", "diff": "<resheader name=\"writer\">\n<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n</resheader>\n+ <metadata name=\"startActionTableLayoutPanel.GenerateMember\" type=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\n+ <value>False</value>\n+ </metadata>\n+ <metadata name=\"nodeHeaderTableLayoutPanel.GenerateMember\" type=\"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\">\n+ <value>False</value>\n+ </metadata>\n<metadata name=\"_tooltip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<value>17, 17</value>\n</metadata>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -670,6 +670,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Node.\n+ /// </summary>\n+ internal static string NodeHeader {\n+ get {\n+ return ResourceManager.GetString(\"NodeHeader\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Could not find a Node.js runtime on your computer. Please download and install the current Node.js release from https://nodejs.org, or specify the location of your Node.exe in the Visual Studio Node Project&apos;s properties page..\n/// </summary>\n@@ -1693,6 +1702,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Start Action.\n+ /// </summary>\n+ internal static string StartActionHeader {\n+ get {\n+ return ResourceManager.GetString(\"StartActionHeader\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to When checked a web browser is opened on launch.\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -731,4 +731,10 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"NodejsNotInstalledInfoBar\" xml:space=\"preserve\">\n<value>Could not find a Node.js runtime on your computer. Please install Node.js and restart VS, or specify the location of node.exe in the project properties page.</value>\n</data>\n+ <data name=\"NodeHeader\" xml:space=\"preserve\">\n+ <value>Node</value>\n+ </data>\n+ <data name=\"StartActionHeader\" xml:space=\"preserve\">\n+ <value>Start Action</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Re-order the project property page This is in preparation for some other changes.
410,217
02.11.2017 17:31:50
25,200
056ee340b95365c3b1caf4906cc1ce45fcc619a4
Set the Cue Banner for the Environment Variable text box Fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -216,6 +216,14 @@ namespace Microsoft.NodejsTools.Project\nnew IntPtr(1), // fDrawFocused == true\ncueBanner\n);\n+\n+ // set cue banner for environment variables\n+ NativeMethods.SendMessageW(\n+ this._envVars.Handle,\n+ NativeMethods.EM_SETCUEBANNER,\n+ new IntPtr(1), // fDrawFocused == true\n+ \"Env1=Val1\\r\\nEnv2=Val2\"\n+ );\n}\nprivate void NodeExePathChanged(object sender, EventArgs e)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Set the Cue Banner for the Environment Variable text box Fixes #1703
410,217
03.11.2017 14:48:55
25,200
e6c5250ac7ff325cc112e01c579c399774dd7d16
Clean up Remove CueBanner Remove custom file/folder browsing, and replace with implementation from VS
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NodejsPackage.cs", "new_path": "Nodejs/Product/Nodejs/NodejsPackage.cs", "diff": "@@ -270,65 +270,5 @@ namespace Microsoft.NodejsTools\n{\nreturn (T)GetDialogPage(typeof(T));\n}\n-\n- public string BrowseForDirectory(IntPtr owner, string initialDirectory = null)\n- {\n- var uiShell = GetService(typeof(SVsUIShell)) as IVsUIShell;\n- if (uiShell == null)\n- {\n- using (var ofd = new FolderBrowserDialog())\n- {\n- ofd.RootFolder = Environment.SpecialFolder.Desktop;\n- ofd.ShowNewFolderButton = false;\n- DialogResult result;\n- if (owner == IntPtr.Zero)\n- {\n- result = ofd.ShowDialog();\n- }\n- else\n- {\n- result = ofd.ShowDialog(NativeWindow.FromHandle(owner));\n- }\n- if (result == DialogResult.OK)\n- {\n- return ofd.SelectedPath;\n- }\n- else\n- {\n- return null;\n- }\n- }\n- }\n-\n- if (owner == IntPtr.Zero)\n- {\n- ErrorHandler.ThrowOnFailure(uiShell.GetDialogOwnerHwnd(out owner));\n- }\n-\n- var browseInfo = new VSBROWSEINFOW[1];\n- browseInfo[0].lStructSize = (uint)Marshal.SizeOf(typeof(VSBROWSEINFOW));\n- browseInfo[0].pwzInitialDir = initialDirectory;\n- browseInfo[0].hwndOwner = owner;\n- browseInfo[0].nMaxDirName = 260;\n- var pDirName = IntPtr.Zero;\n- try\n- {\n- browseInfo[0].pwzDirName = pDirName = Marshal.AllocCoTaskMem(520);\n- var hr = uiShell.GetDirectoryViaBrowseDlg(browseInfo);\n- if (hr == VSConstants.OLE_E_PROMPTSAVECANCELLED)\n- {\n- return null;\n- }\n- ErrorHandler.ThrowOnFailure(hr);\n- return Marshal.PtrToStringAuto(browseInfo[0].pwzDirName);\n- }\n- finally\n- {\n- if (pDirName != IntPtr.Zero)\n- {\n- Marshal.FreeCoTaskMem(pDirName);\n- }\n- }\n- }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "diff": "this.components = new System.ComponentModel.Container();\nSystem.Windows.Forms.TableLayoutPanel startActionTableLayoutPanel;\nSystem.Windows.Forms.TableLayoutPanel nodeHeaderTableLayoutPanel;\n+ this.startActionHeaderLabelLine = new System.Windows.Forms.Label();\n+ this._startActionHeaderLabel = new System.Windows.Forms.Label();\n+ this.nodeHeaderLabelLine = new System.Windows.Forms.Label();\n+ this._nodeHeaderLabel = new System.Windows.Forms.Label();\nthis._nodeArgumentsLabel = new System.Windows.Forms.Label();\nthis._scriptLabel = new System.Windows.Forms.Label();\nthis._scriptArgsLabel = new System.Windows.Forms.Label();\nthis._debuggerPortLabel = new System.Windows.Forms.Label();\nthis._envVarsLabel = new System.Windows.Forms.Label();\nthis.overallPanel = new System.Windows.Forms.TableLayoutPanel();\n- this.startActionHeaderLabelLine = new System.Windows.Forms.Label();\n- this._startActionHeaderLabel = new System.Windows.Forms.Label();\nthis._scriptFile = new System.Windows.Forms.TextBox();\nthis._scriptArguments = new System.Windows.Forms.TextBox();\nthis._workingDir = new System.Windows.Forms.TextBox();\nthis._nodejsPort = new System.Windows.Forms.TextBox();\nthis._envVars = new System.Windows.Forms.TextBox();\nthis._startBrowser = new System.Windows.Forms.CheckBox();\n- this.nodeHeaderLabelLine = new System.Windows.Forms.Label();\n- this._nodeHeaderLabel = new System.Windows.Forms.Label();\nthis._nodeExePathLabel = new System.Windows.Forms.Label();\nthis._nodeExePath = new System.Windows.Forms.TextBox();\nthis._browsePath = new System.Windows.Forms.Button();\nthis._nodeExeErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);\nstartActionTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\nnodeHeaderTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\n- this.overallPanel.SuspendLayout();\nstartActionTableLayoutPanel.SuspendLayout();\nnodeHeaderTableLayoutPanel.SuspendLayout();\n+ this.overallPanel.SuspendLayout();\n((System.ComponentModel.ISupportInitialize)(this._nodeExeErrorProvider)).BeginInit();\nthis.SuspendLayout();\n//\n+ // startActionTableLayoutPanel\n+ //\n+ startActionTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ startActionTableLayoutPanel.AutoSize = true;\n+ startActionTableLayoutPanel.ColumnCount = 2;\n+ this.overallPanel.SetColumnSpan(startActionTableLayoutPanel, 3);\n+ startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ startActionTableLayoutPanel.Controls.Add(this.startActionHeaderLabelLine, 1, 0);\n+ startActionTableLayoutPanel.Controls.Add(this._startActionHeaderLabel, 0, 0);\n+ startActionTableLayoutPanel.Location = new System.Drawing.Point(0, 0);\n+ startActionTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n+ startActionTableLayoutPanel.Name = \"startActionTableLayoutPanel\";\n+ startActionTableLayoutPanel.RowCount = 1;\n+ startActionTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ startActionTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ startActionTableLayoutPanel.TabIndex = 0;\n+ //\n+ // startActionHeaderLabelLine\n+ //\n+ this.startActionHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n+ this.startActionHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ this.startActionHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n+ this.startActionHeaderLabelLine.Location = new System.Drawing.Point(130, 6);\n+ this.startActionHeaderLabelLine.Name = \"startActionHeaderLabelLine\";\n+ this.startActionHeaderLabelLine.Size = new System.Drawing.Size(667, 1);\n+ this.startActionHeaderLabelLine.TabIndex = 1;\n+ //\n+ // _startActionHeaderLabel\n+ //\n+ this._startActionHeaderLabel.AutoSize = true;\n+ this._startActionHeaderLabel.Location = new System.Drawing.Point(0, 0);\n+ this._startActionHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n+ this._startActionHeaderLabel.Name = \"_startActionHeaderLabel\";\n+ this._startActionHeaderLabel.Size = new System.Drawing.Size(124, 13);\n+ this._startActionHeaderLabel.TabIndex = 0;\n+ this._startActionHeaderLabel.Text = \"_startActionHeaderLabel\";\n+ //\n+ // nodeHeaderTableLayoutPanel\n+ //\n+ nodeHeaderTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ nodeHeaderTableLayoutPanel.AutoSize = true;\n+ nodeHeaderTableLayoutPanel.ColumnCount = 2;\n+ this.overallPanel.SetColumnSpan(nodeHeaderTableLayoutPanel, 3);\n+ nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n+ nodeHeaderTableLayoutPanel.Controls.Add(this.nodeHeaderLabelLine, 1, 0);\n+ nodeHeaderTableLayoutPanel.Controls.Add(this._nodeHeaderLabel, 0, 0);\n+ nodeHeaderTableLayoutPanel.Location = new System.Drawing.Point(0, 259);\n+ nodeHeaderTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n+ nodeHeaderTableLayoutPanel.Name = \"nodeHeaderTableLayoutPanel\";\n+ nodeHeaderTableLayoutPanel.RowCount = 1;\n+ nodeHeaderTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ nodeHeaderTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ nodeHeaderTableLayoutPanel.TabIndex = 0;\n+ //\n+ // nodeHeaderLabelLine\n+ //\n+ this.nodeHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n+ this.nodeHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n+ this.nodeHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n+ this.nodeHeaderLabelLine.Location = new System.Drawing.Point(104, 6);\n+ this.nodeHeaderLabelLine.Name = \"nodeHeaderLabelLine\";\n+ this.nodeHeaderLabelLine.Size = new System.Drawing.Size(693, 1);\n+ this.nodeHeaderLabelLine.TabIndex = 16;\n+ //\n+ // _nodeHeaderLabel\n+ //\n+ this._nodeHeaderLabel.AutoSize = true;\n+ this._nodeHeaderLabel.Location = new System.Drawing.Point(0, 0);\n+ this._nodeHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n+ this._nodeHeaderLabel.Name = \"_nodeHeaderLabel\";\n+ this._nodeHeaderLabel.Size = new System.Drawing.Size(98, 13);\n+ this._nodeHeaderLabel.TabIndex = 16;\n+ this._nodeHeaderLabel.Text = \"_nodeHeaderLabel\";\n+ //\n// _nodeArgumentsLabel\n//\nthis._nodeArgumentsLabel.AutoSize = true;\nthis.overallPanel.Location = new System.Drawing.Point(0, 0);\nthis.overallPanel.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);\nthis.overallPanel.Name = \"overallPanel\";\n- this.overallPanel.RowCount = 12;\n+ this.overallPanel.RowCount = 13;\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\nthis.overallPanel.Size = new System.Drawing.Size(800, 500);\nthis.overallPanel.TabIndex = 0;\n//\n- // startActionTableLayoutPanel\n- //\n- startActionTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n- startActionTableLayoutPanel.AutoSize = true;\n- startActionTableLayoutPanel.ColumnCount = 2;\n- this.overallPanel.SetColumnSpan(startActionTableLayoutPanel, 3);\n- startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- startActionTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- startActionTableLayoutPanel.Controls.Add(this.startActionHeaderLabelLine, 1, 0);\n- startActionTableLayoutPanel.Controls.Add(this._startActionHeaderLabel, 0, 0);\n- startActionTableLayoutPanel.Location = new System.Drawing.Point(0, 0);\n- startActionTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n- startActionTableLayoutPanel.Name = \"startActionTableLayoutPanel\";\n- startActionTableLayoutPanel.RowCount = 1;\n- startActionTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- startActionTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n- startActionTableLayoutPanel.TabIndex = 0;\n- //\n- // startActionHeaderLabelLine\n- //\n- this.startActionHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n- this.startActionHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n- this.startActionHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n- this.startActionHeaderLabelLine.Location = new System.Drawing.Point(130, 6);\n- this.startActionHeaderLabelLine.Name = \"startActionHeaderLabelLine\";\n- this.startActionHeaderLabelLine.Size = new System.Drawing.Size(667, 1);\n- this.startActionHeaderLabelLine.TabIndex = 1;\n- //\n- // _startActionHeaderLabel\n- //\n- this._startActionHeaderLabel.AutoSize = true;\n- this._startActionHeaderLabel.Location = new System.Drawing.Point(0, 0);\n- this._startActionHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n- this._startActionHeaderLabel.Name = \"_startActionHeaderLabel\";\n- this._startActionHeaderLabel.Size = new System.Drawing.Size(124, 13);\n- this._startActionHeaderLabel.TabIndex = 0;\n- this._startActionHeaderLabel.Text = \"_startActionHeaderLabel\";\n- //\n// _scriptFile\n//\nthis._scriptFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\nthis._startBrowser.UseVisualStyleBackColor = true;\nthis._startBrowser.CheckedChanged += new System.EventHandler(this.Changed);\n//\n- // nodeHeaderTableLayoutPanel\n- //\n- nodeHeaderTableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n- nodeHeaderTableLayoutPanel.AutoSize = true;\n- nodeHeaderTableLayoutPanel.ColumnCount = 2;\n- this.overallPanel.SetColumnSpan(nodeHeaderTableLayoutPanel, 3);\n- nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- nodeHeaderTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\n- nodeHeaderTableLayoutPanel.Controls.Add(this.nodeHeaderLabelLine, 1, 0);\n- nodeHeaderTableLayoutPanel.Controls.Add(this._nodeHeaderLabel, 0, 0);\n- nodeHeaderTableLayoutPanel.Location = new System.Drawing.Point(0, 259);\n- nodeHeaderTableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);\n- nodeHeaderTableLayoutPanel.Name = \"nodeHeaderTableLayoutPanel\";\n- nodeHeaderTableLayoutPanel.RowCount = 1;\n- nodeHeaderTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- nodeHeaderTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n- nodeHeaderTableLayoutPanel.TabIndex = 0;\n- //\n- // nodeHeaderLabelLine\n- //\n- this.nodeHeaderLabelLine.AccessibleRole = System.Windows.Forms.AccessibleRole.Separator;\n- this.nodeHeaderLabelLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\n- this.nodeHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\n- this.nodeHeaderLabelLine.Location = new System.Drawing.Point(104, 6);\n- this.nodeHeaderLabelLine.Name = \"nodeHeaderLabelLine\";\n- this.nodeHeaderLabelLine.Size = new System.Drawing.Size(693, 1);\n- this.nodeHeaderLabelLine.TabIndex = 16;\n- //\n- // _nodeHeaderLabel\n- //\n- this._nodeHeaderLabel.AutoSize = true;\n- this._nodeHeaderLabel.Location = new System.Drawing.Point(0, 0);\n- this._nodeHeaderLabel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);\n- this._nodeHeaderLabel.Name = \"_nodeHeaderLabel\";\n- this._nodeHeaderLabel.Size = new System.Drawing.Size(98, 13);\n- this._nodeHeaderLabel.TabIndex = 16;\n- this._nodeHeaderLabel.Text = \"_nodeHeaderLabel\";\n- //\n// _nodeExePathLabel\n//\nthis._nodeExePathLabel.AutoSize = true;\n| System.Windows.Forms.AnchorStyles.Right)));\nthis._nodeExePath.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;\nthis._nodeExePath.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;\n- this._nodeExePath.BackColor = System.Drawing.SystemColors.Window;\nthis._nodeExePath.Location = new System.Drawing.Point(122, 275);\nthis._nodeExePath.Name = \"_nodeExePath\";\nthis._nodeExePath.Size = new System.Drawing.Size(620, 20);\nthis.MinimumSize = new System.Drawing.Size(850, 550);\nthis.Name = \"NodejsGeneralPropertyPageControl\";\nthis.Size = new System.Drawing.Size(850, 550);\n- this.overallPanel.ResumeLayout(false);\n- this.overallPanel.PerformLayout();\nstartActionTableLayoutPanel.ResumeLayout(false);\nstartActionTableLayoutPanel.PerformLayout();\nnodeHeaderTableLayoutPanel.ResumeLayout(false);\nnodeHeaderTableLayoutPanel.PerformLayout();\n+ this.overallPanel.ResumeLayout(false);\n+ this.overallPanel.PerformLayout();\n((System.ComponentModel.ISupportInitialize)(this._nodeExeErrorProvider)).EndInit();\nthis.ResumeLayout(false);\nthis.PerformLayout();\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -7,7 +7,6 @@ using System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Windows.Forms;\nusing Microsoft.VisualStudio.Editors.PropertyPages;\n-using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Project\n{\n@@ -21,7 +20,6 @@ namespace Microsoft.NodejsTools.Project\nInitializeComponent();\nLocalizeLabels();\n- SetCueBanner();\nAddToolTips();\nthis._nodeExeErrorProvider.SetIconAlignment(this._nodeExePath, ErrorIconAlignment.MiddleLeft);\n@@ -197,35 +195,13 @@ namespace Microsoft.NodejsTools.Project\n}\n}\n+ //public bool IsDirty;\n+\nprivate void Changed(object sender, EventArgs e)\n{\nthis.IsDirty = true;\n}\n- private void SetCueBanner()\n- {\n- var cueBanner = Nodejs.NodeExePath;\n- if (string.IsNullOrEmpty(cueBanner))\n- {\n- cueBanner = Resources.NodejsNotInstalledShort;\n- }\n-\n- NativeMethods.SendMessageW(\n- this._nodeExePath.Handle,\n- NativeMethods.EM_SETCUEBANNER,\n- new IntPtr(1), // fDrawFocused == true\n- cueBanner\n- );\n-\n- // set cue banner for environment variables\n- NativeMethods.SendMessageW(\n- this._envVars.Handle,\n- NativeMethods.EM_SETCUEBANNER,\n- new IntPtr(1), // fDrawFocused == true\n- \"Env1=Val1\\r\\nEnv2=Val2\"\n- );\n- }\n-\nprivate void NodeExePathChanged(object sender, EventArgs e)\n{\nif (string.IsNullOrEmpty(this._nodeExePath.Text) || this._nodeExePath.Text.Contains(\"$(\") ||\n@@ -242,12 +218,10 @@ namespace Microsoft.NodejsTools.Project\nprivate void BrowsePathClick(object sender, EventArgs e)\n{\n- var dialog = new OpenFileDialog();\n- dialog.CheckFileExists = true;\n- dialog.Filter = _exeFilter;\n- if (dialog.ShowDialog() == DialogResult.OK)\n+ var nodeExePath = this._nodeExePath.Text;\n+ if (this.GetFileViaBrowse(nodeExePath, ref nodeExePath, _exeFilter) && !string.IsNullOrEmpty(nodeExePath))\n{\n- this._nodeExePath.Text = dialog.FileName;\n+ this._nodeExePath.Text = nodeExePath;\nthis._nodeExePath.ForeColor = SystemColors.ControlText;\n}\n}\n@@ -259,10 +233,10 @@ namespace Microsoft.NodejsTools.Project\n{\ndir = this._propPage.Project.ProjectHome;\n}\n- var path = NodejsPackage.Instance.BrowseForDirectory(this.Handle, dir);\n- if (!string.IsNullOrEmpty(path))\n+\n+ if (this.GetDirectoryViaBrowseRelative(dir, this._propPage.Project.ProjectHome, Resources.BrowseWorkingDirDialogTitle, ref dir))\n{\n- this._workingDir.Text = path;\n+ this._workingDir.Text = string.IsNullOrEmpty(dir) ? \".\" : dir;\n}\n}\n@@ -270,7 +244,7 @@ namespace Microsoft.NodejsTools.Project\n{\nvar textSender = (TextBox)sender;\nif (!textSender.Text.Contains(\"$(\") &&\n- textSender.Text.Any(ch => !Char.IsDigit(ch)))\n+ textSender.Text.Any(ch => !char.IsDigit(ch)))\n{\nthis._nodeExeErrorProvider.SetError(textSender, Resources.InvalidPortNumber);\n}\n@@ -283,15 +257,21 @@ namespace Microsoft.NodejsTools.Project\nprivate void WorkingDirChanged(object sender, EventArgs e)\n{\n- if (!this._workingDir.Text.Contains(\"$(\") && !Directory.Exists(this._workingDir.Text))\n+ var errorMessage = ValidateWorkingDir(this._workingDir.Text) ? \"\" : Resources.WorkingDirInvalidOrMissing;\n+ this._nodeExeErrorProvider.SetError(this._workingDir, errorMessage);\n+\n+ Changed(sender, e);\n+\n+ bool ValidateWorkingDir(string workingDir)\n{\n- this._nodeExeErrorProvider.SetError(this._workingDir, Resources.WorkingDirInvalidOrMissing);\n- }\n- else\n+ if (workingDir.Contains(\"$(\"))\n{\n- this._nodeExeErrorProvider.SetError(this._workingDir, string.Empty);\n+ return true;\n+ }\n+\n+ var fullPath = Path.IsPathRooted(workingDir) ? workingDir : Path.Combine(this._propPage.Project.ProjectHome, workingDir);\n+ return Directory.Exists(fullPath);\n}\n- Changed(sender, e);\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -98,6 +98,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Select Working Dir.\n+ /// </summary>\n+ internal static string BrowseWorkingDirDialogTitle {\n+ get {\n+ return ResourceManager.GetString(\"BrowseWorkingDirDialogTitle\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Could not clear Node.js cache directory. Try manually deleting the directory: {0}.\n/// </summary>\n@@ -1467,7 +1476,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Node.&amp;js port:.\n+ /// Looks up a localized string similar to Applica&amp;tion port:.\n/// </summary>\ninternal static string PropertiesNodePort {\nget {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -636,7 +636,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Launch &amp;URL:</value>\n</data>\n<data name=\"PropertiesNodePort\" xml:space=\"preserve\">\n- <value>Node.&amp;js port:</value>\n+ <value>Applica&amp;tion port:</value>\n</data>\n<data name=\"PropertiesScript\" xml:space=\"preserve\">\n<value>&amp;Script (startup file):</value>\n@@ -737,4 +737,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"StartActionHeader\" xml:space=\"preserve\">\n<value>Start Action</value>\n</data>\n+ <data name=\"BrowseWorkingDirDialogTitle\" xml:space=\"preserve\">\n+ <value>Select Working Dir</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up Remove CueBanner Remove custom file/folder browsing, and replace with implementation from VS
410,217
03.11.2017 16:49:12
25,200
524dcb46ba9359347505bd7f074dd49d9af85599
Add time out when starting browser Add a time out when starting browser while debugging, if we can't figure out the process id of the node process we've started. Fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "diff": "@@ -421,7 +421,7 @@ namespace Microsoft.NodejsTools.Project\nvar uri = new Uri(webBrowserUrl);\nOnPortOpenedHandler.CreateHandler(\nuri.Port,\n- shortCircuitPredicate: () => false,\n+ timeout: 5_000, // 5 seconds\naction: () =>\n{\nVsShellUtilities.OpenBrowser(webBrowserUrl, (uint)__VSOSPFLAGS.OSP_LaunchNewBrowser);\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add time out when starting browser Add a time out when starting browser while debugging, if we can't figure out the process id of the node process we've started. Fixes #1711
410,217
03.11.2017 17:39:13
25,200
f31c8b263ab485f94efa90a3604e66e50807ba36
Don't use windows username in package.json template This fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureExpress4App/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureExpress4App/package.json", "diff": "},\n\"description\": \"$projectname$\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"dependencies\": {\n\"body-parser\": \"^1.15.0\",\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureNodejsApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureNodejsApp/package.json", "diff": "\"node\": \"~6.10.x\"\n},\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureNodejsWorker/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/AzureNodejsWorker/package.json", "diff": "\"start\": \"node worker\"\n},\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"engines\": {\n\"node\": \"~6.10.2\"\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/Express4App/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/Express4App/package.json", "diff": "},\n\"description\": \"$projectname$\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"dependencies\": {\n\"body-parser\": \"^1.15.0\",\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/NodejsConsoleApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/NodejsConsoleApp/package.json", "diff": "\"description\": \"$projectname$\",\n\"main\": \"app.js\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/NodejsWebApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/NodejsWebApp/package.json", "diff": "\"description\": \"$projectname$\",\n\"main\": \"server.js\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/package.json", "diff": "},\n\"description\": \"$projectname$\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"dependencies\": {\n\"debug\": \"^2.2.0\",\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/package.json", "diff": "\"start\": \"node server\"\n},\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.87\"\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/package.json", "diff": "\"start\": \"node server\"\n},\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.87\"\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/package.json", "diff": "\"start\": \"node server\"\n},\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.87\"\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/package.json", "diff": "\"description\": \"$projectname$\",\n\"main\": \"app.js\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.87\"\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/package.json", "diff": "},\n\"description\": \"$projectname$\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"main\": \"app.js\",\n\"dependencies\": {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json", "diff": "\"description\": \"$projectname$\",\n\"main\": \"app.js\",\n\"author\": {\n- \"name\": \"$username$\"\n+ \"name\": \"\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.87\"\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Don't use windows username in package.json template This fixes #1233
410,217
08.11.2017 12:40:45
28,800
e23925371beb14656fbbc512c6bf50de86733f83
Refactor ProjectNode Move user project file code to base class.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -49,7 +49,7 @@ namespace Microsoft.VisualStudioTools.Project\nprivate readonly Dictionary<string, FileSystemEventHandler> _fileChangedHandlers = new Dictionary<string, FileSystemEventHandler>();\nprivate Queue<FileSystemChange> _fileSystemChanges = new Queue<FileSystemChange>();\nprivate object _fileSystemChangesLock = new object();\n- private MSBuild.Project _userBuildProject;\n+\nprivate readonly Dictionary<string, FileSystemWatcher> _symlinkWatchers = new Dictionary<string, FileSystemWatcher>();\nprivate DiskMerger _currentMerger;\nprivate IdleManager _idleManager;\n@@ -187,11 +187,6 @@ namespace Microsoft.VisualStudioTools.Project\nset { this._propPage = value; }\n}\n- protected internal MSBuild.Project UserBuildProject => this._userBuildProject;\n-\n- protected bool IsUserProjectFileDirty => this._userBuildProject != null &&\n- this._userBuildProject.Xml.HasUnsavedChanges;\n-\n#endregion\n#region overridden properties\n@@ -416,16 +411,10 @@ namespace Microsoft.VisualStudioTools.Project\nthis._watcher.Dispose();\n}\n- var userProjectFilename = this.FileName + PerUserFileExtension;\n- if (File.Exists(userProjectFilename))\n- {\n- this._userBuildProject = this.BuildProject.ProjectCollection.LoadProject(userProjectFilename);\n- }\n-\nbool? showAllFiles = null;\n- if (this._userBuildProject != null)\n+ if (this.UserBuildProject != null)\n{\n- showAllFiles = GetShowAllFilesSetting(this._userBuildProject.GetPropertyValue(CommonConstants.ProjectView));\n+ showAllFiles = GetShowAllFilesSetting(this.UserBuildProject.GetPropertyValue(CommonConstants.ProjectView));\n}\nthis._showingAllFiles = showAllFiles ??\n@@ -527,9 +516,9 @@ namespace Microsoft.VisualStudioTools.Project\n{\nbase.SaveMSBuildProjectFileAs(newFileName);\n- if (this._userBuildProject != null)\n+ if (this.UserBuildProject != null)\n{\n- this._userBuildProject.Save(this.FileName + PerUserFileExtension);\n+ this.UserBuildProject.Save(this.FileName + PerUserFileExtension);\n}\n}\n@@ -537,9 +526,9 @@ namespace Microsoft.VisualStudioTools.Project\n{\nbase.SaveMSBuildProjectFile(filename);\n- if (this._userBuildProject != null)\n+ if (this.UserBuildProject != null)\n{\n- this._userBuildProject.Save(filename + PerUserFileExtension);\n+ this.UserBuildProject.Save(filename + PerUserFileExtension);\n}\n}\n@@ -556,9 +545,9 @@ namespace Microsoft.VisualStudioTools.Project\npdl.Dispose();\n}\n- if (this._userBuildProject != null)\n+ if (this.UserBuildProject != null)\n{\n- this._userBuildProject.ProjectCollection.UnloadProject(this._userBuildProject);\n+ this.UserBuildProject.ProjectCollection.UnloadProject(this.UserBuildProject);\n}\nif (this._idleManager != null)\n{\n@@ -1814,44 +1803,6 @@ namespace Microsoft.VisualStudioTools.Project\nreturn service;\n}\n- /// <summary>\n- /// Set value of user project property\n- /// </summary>\n- /// <param name=\"propertyName\">Name of property</param>\n- /// <param name=\"propertyValue\">Value of property</param>\n- public virtual void SetUserProjectProperty(string propertyName, string propertyValue)\n- {\n- Utilities.ArgumentNotNull(\"propertyName\", propertyName);\n-\n- if (this._userBuildProject == null)\n- {\n- // user project file doesn't exist yet, create it.\n- // We set the content of user file explictly so VS2013 won't add ToolsVersion=\"12\" which would result in incompatibility with VS2010,2012\n- var root = Microsoft.Build.Construction.ProjectRootElement.Create(this.BuildProject.ProjectCollection);\n- root.ToolsVersion = \"4.0\";\n- this._userBuildProject = new MSBuild.Project(root, null, null, this.BuildProject.ProjectCollection);\n- this._userBuildProject.FullPath = this.FileName + PerUserFileExtension;\n- }\n- this._userBuildProject.SetProperty(propertyName, propertyValue ?? string.Empty);\n- }\n-\n- /// <summary>\n- /// Get value of user project property\n- /// </summary>\n- /// <param name=\"propertyName\">Name of property</param>\n- public virtual string GetUserProjectProperty(string propertyName)\n- {\n- Utilities.ArgumentNotNull(\"propertyName\", propertyName);\n-\n- if (this._userBuildProject == null)\n- {\n- return null;\n- }\n-\n- // If user project file exists during project load/reload userBuildProject is initiated\n- return this._userBuildProject.GetPropertyValue(propertyName);\n- }\n-\n#endregion\n#region IVsProjectSpecificEditorMap2 Members\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -174,6 +174,8 @@ namespace Microsoft.VisualStudioTools.Project\nprivate MSBuild.Project buildProject;\n+ private MSBuild.Project userBuildProject;\n+\nprivate MSBuildExecution.ProjectInstance currentConfig;\nprivate ConfigProvider configProvider;\n@@ -793,6 +795,10 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n+ protected internal MSBuild.Project UserBuildProject => this.userBuildProject;\n+\n+ protected bool IsUserProjectFileDirty => this.userBuildProject?.Xml.HasUnsavedChanges == true;\n+\n#endregion\n#region ctor\n@@ -2014,6 +2020,42 @@ namespace Microsoft.VisualStudioTools.Project\nthis.currentConfig = null;\n}\n+ /// <summary>\n+ /// Set value of user project property\n+ /// </summary>\n+ /// <param name=\"propertyName\">Name of property</param>\n+ /// <param name=\"propertyValue\">Value of property</param>\n+ public virtual void SetUserProjectProperty(string propertyName, string propertyValue)\n+ {\n+ Utilities.ArgumentNotNull(\"propertyName\", propertyName);\n+\n+ if (this.userBuildProject == null)\n+ {\n+ // user project file doesn't exist yet, create it.\n+ var root = Microsoft.Build.Construction.ProjectRootElement.Create(this.BuildProject.ProjectCollection);\n+ this.userBuildProject = new MSBuild.Project(root, null, null, this.BuildProject.ProjectCollection);\n+ this.userBuildProject.FullPath = this.FileName + PerUserFileExtension;\n+ }\n+ this.userBuildProject.SetProperty(propertyName, propertyValue ?? string.Empty);\n+ }\n+\n+ /// <summary>\n+ /// Get value of user project property\n+ /// </summary>\n+ /// <param name=\"propertyName\">Name of property</param>\n+ public virtual string GetUserProjectProperty(string propertyName)\n+ {\n+ Utilities.ArgumentNotNull(\"propertyName\", propertyName);\n+\n+ if (this.userBuildProject == null)\n+ {\n+ return null;\n+ }\n+\n+ // If user project file exists during project load/reload userBuildProject is initiated\n+ return this.userBuildProject.GetPropertyValue(propertyName);\n+ }\n+\npublic virtual CompilerParameters GetProjectOptions(string config)\n{\n// This needs to be commented out because if you build for Debug the properties from the Debug\n@@ -2292,19 +2334,13 @@ namespace Microsoft.VisualStudioTools.Project\n/// List of Guids of the config independent property pages. It is called by the GetProperty for VSHPROPID_PropertyPagesCLSIDList property.\n/// </summary>\n/// <returns></returns>\n- protected virtual Guid[] GetConfigurationIndependentPropertyPages()\n- {\n- return new Guid[] { };\n- }\n+ protected virtual Guid[] GetConfigurationIndependentPropertyPages() => Array.Empty<Guid>();\n/// <summary>\n/// Returns a list of Guids of the configuration dependent property pages. It is called by the GetProperty for VSHPROPID_CfgPropertyPagesCLSIDList property.\n/// </summary>\n/// <returns></returns>\n- protected virtual Guid[] GetConfigurationDependentPropertyPages()\n- {\n- return new Guid[] { };\n- }\n+ protected virtual Guid[] GetConfigurationDependentPropertyPages() => Array.Empty<Guid>();\n/// <summary>\n/// An ordered list of guids of the prefered property pages. See <see cref=\"__VSHPROPID.VSHPROPID_PriorityPropertyPagesCLSIDList\"/>\n@@ -2511,6 +2547,12 @@ namespace Microsoft.VisualStudioTools.Project\nSetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, this.filename, this.buildProject));\n+ var userProjectFilename = this.FileName + PerUserFileExtension;\n+ if (File.Exists(userProjectFilename))\n+ {\n+ this.userBuildProject = this.BuildProject.ProjectCollection.LoadProject(userProjectFilename);\n+ }\n+\n// Load the guid\nSetProjectGuidFromProjectFile();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Refactor ProjectNode Move user project file code to base class.
410,217
09.11.2017 14:16:03
28,800
868c7932f3d7d91c8156ea0b737f4dc89095aba6
Clean up as prep for the bigger interactive window change
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"Project\\NodejsFileNode.cs\" />\n<Compile Include=\"ProvideEditorExtension2Attribute.cs\" />\n<Compile Include=\"Repl\\ClearReplCommand.cs\" />\n- <Compile Include=\"Repl\\INodejsReplSite.cs\" />\n<Compile Include=\"Repl\\SaveReplCommand.cs\" />\n<Compile Include=\"Repl\\VsNodejsReplSite.cs\" />\n<Compile Include=\"SourceMapping\\SourceMap.cs\" />\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Nodejs/Repl/INodejsReplSite.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using Microsoft.VisualStudioTools.Project;\n-\n-namespace Microsoft.NodejsTools.Repl\n-{\n- /// <summary>\n- /// Internal interface to mock out project system inputs for test cases.\n- /// </summary>\n- internal interface INodejsReplSite\n- {\n- CommonProjectNode GetStartupProject();\n- bool TryGetStartupFileAndDirectory(out string fileName, out string directory);\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "diff": "@@ -22,21 +22,16 @@ namespace Microsoft.NodejsTools.Repl\n[ReplRole(\"Reset\"), ReplRole(\"Execution\")]\ninternal sealed class NodejsReplEvaluator : IReplEvaluator\n{\n- private ListenerThread _listener;\n- private IReplWindow _window;\n- private readonly INodejsReplSite _site;\n+ private ListenerThread listener;\n+ private IReplWindow window;\n+ private readonly VsNodejsReplSite site;\ninternal static readonly object InputBeforeReset = new object(); // used to mark buffers which are no longer valid because we've done a reset\nprivate static bool LoggedReplUse = false;\npublic NodejsReplEvaluator()\n- : this(VsNodejsReplSite.Site)\n{\n- }\n-\n- public NodejsReplEvaluator(INodejsReplSite site)\n- {\n- this._site = site;\n+ this.site = VsNodejsReplSite.Site;\n}\nprivate string nodeExePath;\n@@ -57,15 +52,15 @@ namespace Microsoft.NodejsTools.Repl\npublic Task<ExecutionResult> Initialize(IReplWindow window)\n{\n- this._window = window;\n- this._window.SetOptionValue(ReplOptions.CommandPrefix, \".\");\n- this._window.SetOptionValue(ReplOptions.PrimaryPrompt, \"> \");\n- this._window.SetOptionValue(ReplOptions.SecondaryPrompt, \". \");\n- this._window.SetOptionValue(ReplOptions.DisplayPromptInMargin, false);\n- this._window.SetOptionValue(ReplOptions.SupportAnsiColors, true);\n- this._window.SetOptionValue(ReplOptions.UseSmartUpDown, true);\n+ this.window = window;\n+ this.window.SetOptionValue(ReplOptions.CommandPrefix, \".\");\n+ this.window.SetOptionValue(ReplOptions.PrimaryPrompt, \"> \");\n+ this.window.SetOptionValue(ReplOptions.SecondaryPrompt, \". \");\n+ this.window.SetOptionValue(ReplOptions.DisplayPromptInMargin, false);\n+ this.window.SetOptionValue(ReplOptions.SupportAnsiColors, true);\n+ this.window.SetOptionValue(ReplOptions.UseSmartUpDown, true);\n- this._window.WriteLine(Resources.ReplInitializationMessage);\n+ this.window.WriteLine(Resources.ReplInitializationMessage);\nreturn ExecutionResult.Succeeded;\n}\n@@ -76,7 +71,7 @@ namespace Microsoft.NodejsTools.Repl\npublic Task<ExecutionResult> Reset()\n{\n- var buffersBeforeReset = this._window.TextView.BufferGraph.GetTextBuffers(_ => true);\n+ var buffersBeforeReset = this.window.TextView.BufferGraph.GetTextBuffers(_ => true);\nfor (var i = 0; i < buffersBeforeReset.Count - 1; i++)\n{\nvar buffer = buffersBeforeReset[i];\n@@ -99,7 +94,7 @@ namespace Microsoft.NodejsTools.Repl\npublic Task<ExecutionResult> ExecuteText(string text)\n{\nEnsureConnected();\n- if (this._listener == null)\n+ if (this.listener == null)\n{\nreturn ExecutionResult.Failed;\n}\n@@ -112,7 +107,7 @@ namespace Microsoft.NodejsTools.Repl\nLoggedReplUse = true;\n}\n- return this._listener.ExecuteText(text);\n+ return this.listener.ExecuteText(text);\n}\npublic void ExecuteFile(string filename)\n@@ -136,9 +131,9 @@ namespace Microsoft.NodejsTools.Repl\npublic void Dispose()\n{\n- if (this._listener != null)\n+ if (this.listener != null)\n{\n- this._listener.Dispose();\n+ this.listener.Dispose();\n}\n}\n@@ -146,7 +141,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate void EnsureConnected()\n{\n- if (this._listener == null)\n+ if (this.listener == null)\n{\nConnect();\n}\n@@ -161,15 +156,15 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (string.IsNullOrWhiteSpace(this.NodeExePath))\n{\n- this._window.WriteError(Resources.NodejsNotInstalled);\n- this._window.WriteError(Environment.NewLine);\n+ this.window.WriteError(Resources.NodejsNotInstalled);\n+ this.window.WriteError(Environment.NewLine);\nreturn false;\n}\nif (!File.Exists(this.NodeExePath))\n{\n- this._window.WriteError(string.Format(CultureInfo.CurrentCulture, Resources.NodeExeDoesntExist, this.NodeExePath));\n- this._window.WriteError(Environment.NewLine);\n+ this.window.WriteError(string.Format(CultureInfo.CurrentCulture, Resources.NodeExeDoesntExist, this.NodeExePath));\n+ this.window.WriteError(Environment.NewLine);\nreturn false;\n}\n@@ -178,11 +173,11 @@ namespace Microsoft.NodejsTools.Repl\nprivate void Connect()\n{\n- if (this._listener != null)\n+ if (this.listener != null)\n{\n- this._listener.Disconnect();\n- this._listener.Dispose();\n- this._listener = null;\n+ this.listener.Disconnect();\n+ this.listener.Dispose();\n+ this.listener = null;\n}\nif(!this.EnsureNodeInstalled())\n@@ -204,7 +199,7 @@ namespace Microsoft.NodejsTools.Repl\nRedirectStandardError = true,\nRedirectStandardOutput = true\n};\n- if (this._site.TryGetStartupFileAndDirectory(out var _, out var directory))\n+ if (this.site.TryGetStartupFileAndDirectory(out var _, out var directory))\n{\npsi.WorkingDirectory = directory;\npsi.EnvironmentVariables[\"NODE_PATH\"] = directory;\n@@ -218,16 +213,16 @@ namespace Microsoft.NodejsTools.Repl\n}\ncatch (Exception e)\n{\n- this._window.WriteError(string.Format(CultureInfo.CurrentCulture, Resources.InteractiveWindowFailedToStartProcessErrorMessage, Environment.NewLine, e.ToString(), Environment.NewLine));\n+ this.window.WriteError(string.Format(CultureInfo.CurrentCulture, Resources.InteractiveWindowFailedToStartProcessErrorMessage, Environment.NewLine, e.ToString(), Environment.NewLine));\nreturn;\n}\n- this._listener = new ListenerThread(this, process, socket);\n+ this.listener = new ListenerThread(this, process, socket);\n}\nprivate string GetNodeExePath()\n{\n- var startupProject = this._site.GetStartupProject();\n+ var startupProject = this.site.GetStartupProject();\nstring nodeExePath;\nif (startupProject != null)\n{\n@@ -253,7 +248,7 @@ namespace Microsoft.NodejsTools.Repl\ninternal void Clear()\n{\n- this._listener.SendRequest(new Dictionary<string, object>() { { \"type\", \"clear\" } });\n+ this.listener.SendRequest(new Dictionary<string, object>() { { \"type\", \"clear\" } });\n}\ninternal class ListenerThread : JsonListener, IDisposable\n@@ -266,7 +261,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate TaskCompletionSource<ExecutionResult> _completion;\nprivate string _executionText;\nprivate readonly JavaScriptSerializer _serializer = new JavaScriptSerializer();\n- private bool _disposed;\n+ private bool disposed;\n#if DEBUG\nprivate Thread _socketLockedThread;\n#endif\n@@ -293,7 +288,7 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (args.Data != null)\n{\n- this._eval._window.WriteOutput(args.Data + Environment.NewLine);\n+ this._eval.window.WriteOutput(args.Data + Environment.NewLine);\n}\n}\n@@ -301,7 +296,7 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (args.Data != null)\n{\n- this._eval._window.WriteError(args.Data + Environment.NewLine);\n+ this._eval.window.WriteError(args.Data + Environment.NewLine);\n}\n}\n@@ -312,7 +307,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate void ProcessExitedWorker()\n{\n- this._eval._window.WriteError(Resources.InteractiveWindowProcessExitedMessage + Environment.NewLine);\n+ this._eval.window.WriteError(Resources.InteractiveWindowProcessExitedMessage + Environment.NewLine);\nusing (new SocketLock(this))\n{\nif (this._completion != null)\n@@ -371,7 +366,7 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (!this.Socket.Connected)\n{\n- this._eval._window.WriteError(_noReplProcess);\n+ this._eval.window.WriteError(_noReplProcess);\nreturn ExecutionResult.Failed;\n}\n@@ -381,7 +376,7 @@ namespace Microsoft.NodejsTools.Repl\n}\ncatch (SocketException)\n{\n- this._eval._window.WriteError(_noReplProcess);\n+ this._eval.window.WriteError(_noReplProcess);\nreturn ExecutionResult.Failed;\n}\n@@ -430,12 +425,12 @@ namespace Microsoft.NodejsTools.Repl\nobject result;\nif (cmd.TryGetValue(\"result\", out result))\n{\n- this._eval._window.WriteLine(result.ToString());\n+ this._eval.window.WriteLine(result.ToString());\nthis._completion.SetResult(ExecutionResult.Success);\n}\nelse if (cmd.TryGetValue(\"error\", out result))\n{\n- this._eval._window.WriteError(result.ToString());\n+ this._eval.window.WriteError(result.ToString());\nthis._completion.SetResult(ExecutionResult.Failure);\n}\nthis._completion = null;\n@@ -443,13 +438,13 @@ namespace Microsoft.NodejsTools.Repl\ncase \"output\":\nif (cmd.TryGetValue(\"output\", out result))\n{\n- this._eval._window.WriteOutput(FixOutput(result));\n+ this._eval.window.WriteOutput(FixOutput(result));\n}\nbreak;\ncase \"output_error\":\nif (cmd.TryGetValue(\"output\", out result))\n{\n- this._eval._window.WriteError(FixOutput(result));\n+ this._eval.window.WriteError(FixOutput(result));\n}\nbreak;\n#if DEBUG\n@@ -512,7 +507,7 @@ namespace Microsoft.NodejsTools.Repl\nprotected virtual void Dispose(bool disposing)\n{\n- if (!this._disposed)\n+ if (!this.disposed)\n{\nif (this._process != null && !this._process.HasExited)\n{\n@@ -539,7 +534,7 @@ namespace Microsoft.NodejsTools.Repl\n{\nthis._process.Dispose();\n}\n- this._disposed = true;\n+ this.disposed = true;\n}\n}\n@@ -554,7 +549,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate struct SocketLock : IDisposable\n{\n- private readonly ListenerThread _evaluator;\n+ private readonly ListenerThread evaluator;\npublic SocketLock(ListenerThread evaluator)\n{\n@@ -563,15 +558,15 @@ namespace Microsoft.NodejsTools.Repl\nDebug.Assert(evaluator._socketLockedThread == null);\nevaluator._socketLockedThread = Thread.CurrentThread;\n#endif\n- this._evaluator = evaluator;\n+ this.evaluator = evaluator;\n}\npublic void Dispose()\n{\n#if DEBUG\n- this._evaluator._socketLockedThread = null;\n+ this.evaluator._socketLockedThread = null;\n#endif\n- Monitor.Exit(this._evaluator._socketLock);\n+ Monitor.Exit(this.evaluator._socketLock);\n}\n}\n#endregion\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up as prep for the bigger interactive window change
410,217
09.11.2017 10:50:15
28,800
b0b9aaab021c912b5e6e51456b3e14e6f47629cd
Add option to store node.js settings in user file This fixes
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs", "new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs", "diff": "@@ -88,5 +88,6 @@ namespace Microsoft.NodejsTools\ninternal const string TypeScriptModuleKind = \"TypeScriptModuleKind\";\ninternal const string TypeScriptOutDir = \"TypeScriptOutDir\";\ninternal const string TypeScriptSourceMap = \"TypeScriptSourceMap\";\n+ internal const string SaveNodeJsSettingsInProjectFile = \"SaveNodeJsSettingsInProjectFile\";\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPage.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPage.cs", "diff": "@@ -49,16 +49,45 @@ namespace Microsoft.NodejsTools.Project\nprotected override void Apply()\n{\n- this.Project.SetProjectProperty(NodeProjectProperty.NodeExePath, this.control.NodeExePath);\n- this.Project.SetProjectProperty(NodeProjectProperty.NodeExeArguments, this.control.NodeExeArguments);\nthis.Project.SetProjectProperty(CommonConstants.StartupFile, this.control.ScriptFile);\nthis.Project.SetProjectProperty(NodeProjectProperty.ScriptArguments, this.control.ScriptArguments);\nthis.Project.SetProjectProperty(NodeProjectProperty.NodejsPort, this.control.NodejsPort);\nthis.Project.SetProjectProperty(NodeProjectProperty.StartWebBrowser, this.control.StartWebBrowser.ToString());\nthis.Project.SetProjectProperty(CommonConstants.WorkingDirectory, this.control.WorkingDirectory);\nthis.Project.SetProjectProperty(NodeProjectProperty.LaunchUrl, this.control.LaunchUrl);\n- this.Project.SetProjectProperty(NodeProjectProperty.DebuggerPort, this.control.DebuggerPort);\nthis.Project.SetProjectProperty(NodeProjectProperty.Environment, this.control.Environment);\n+\n+ if (this.Project.SetProjectProperty(NodeProjectProperty.SaveNodeJsSettingsInProjectFile, this.control.StoreNodeSettingsInProject.ToString()))\n+ {\n+ // if this setting changed we should move the properties to the right file\n+ if (this.control.StoreNodeSettingsInProject)\n+ {\n+ this.Project.MovePropertyToProjectFile(NodeProjectProperty.NodeExePath);\n+ this.Project.MovePropertyToProjectFile(NodeProjectProperty.NodeExeArguments);\n+ this.Project.MovePropertyToProjectFile(NodeProjectProperty.DebuggerPort);\n+ }\n+ else\n+ {\n+ this.Project.MovePropertyToUserFile(NodeProjectProperty.NodeExePath);\n+ this.Project.MovePropertyToUserFile(NodeProjectProperty.NodeExeArguments);\n+ this.Project.MovePropertyToUserFile(NodeProjectProperty.DebuggerPort);\n+ }\n+ }\n+\n+ if (this.control.StoreNodeSettingsInProject)\n+ {\n+ // ensure we only have the properties in one location\n+ this.Project.SetProjectProperty(NodeProjectProperty.NodeExePath, this.control.NodeExePath);\n+ this.Project.SetProjectProperty(NodeProjectProperty.NodeExeArguments, this.control.NodeExeArguments);\n+ this.Project.SetProjectProperty(NodeProjectProperty.DebuggerPort, this.control.DebuggerPort);\n+ }\n+ else\n+ {\n+ this.Project.SetUserProjectProperty(NodeProjectProperty.NodeExePath, this.control.NodeExePath);\n+ this.Project.SetUserProjectProperty(NodeProjectProperty.NodeExeArguments, this.control.NodeExeArguments);\n+ this.Project.SetUserProjectProperty(NodeProjectProperty.DebuggerPort, this.control.DebuggerPort);\n+ }\n+\nthis.control.IsDirty = false;\n}\n@@ -73,13 +102,14 @@ namespace Microsoft.NodejsTools.Project\nthis.control.NodejsPort = this.Project.GetUnevaluatedProperty(NodeProjectProperty.NodejsPort);\nthis.control.DebuggerPort = this.Project.GetUnevaluatedProperty(NodeProjectProperty.DebuggerPort);\nthis.control.Environment = this.Project.GetUnevaluatedProperty(NodeProjectProperty.Environment);\n+ this.control.StartWebBrowser = GetBoolProperty(this.Project, NodeProjectProperty.StartWebBrowser);\n+ this.control.StoreNodeSettingsInProject = GetBoolProperty(this.Project, NodeProjectProperty.SaveNodeJsSettingsInProjectFile);\n- // Attempt to parse the boolean. If we fail, assume it is true.\n- if (!bool.TryParse(this.Project.GetUnevaluatedProperty(NodeProjectProperty.StartWebBrowser), out var startWebBrowser))\n+ bool GetBoolProperty(ProjectNode node, string property)\n{\n- startWebBrowser = true;\n+ // Attempt to parse the boolean. If we fail, assume it is true.\n+ return bool.TryParse(node.GetUnevaluatedProperty(property), out var result) ? result : true;\n}\n- this.control.StartWebBrowser = startWebBrowser;\n}\nprotected override string Title => \"General\";\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs", "diff": "this._launchUrl = new System.Windows.Forms.TextBox();\nthis._nodejsPort = new System.Windows.Forms.TextBox();\nthis._envVars = new System.Windows.Forms.TextBox();\n- this._startBrowser = new System.Windows.Forms.CheckBox();\n+ this._startBrowserCheckBox = new System.Windows.Forms.CheckBox();\nthis._nodeExePathLabel = new System.Windows.Forms.Label();\nthis._nodeExePath = new System.Windows.Forms.TextBox();\nthis._browsePath = new System.Windows.Forms.Button();\nthis._debuggerPort = new System.Windows.Forms.TextBox();\nthis._tooltip = new System.Windows.Forms.ToolTip(this.components);\nthis._nodeExeErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);\n+ this._storeInProjectFileCheckBox = new System.Windows.Forms.CheckBox();\nstartActionTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\nnodeHeaderTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\nstartActionTableLayoutPanel.SuspendLayout();\nstartActionTableLayoutPanel.Name = \"startActionTableLayoutPanel\";\nstartActionTableLayoutPanel.RowCount = 1;\nstartActionTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- startActionTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ startActionTableLayoutPanel.Size = new System.Drawing.Size(836, 13);\nstartActionTableLayoutPanel.TabIndex = 0;\n//\n// startActionHeaderLabelLine\nthis.startActionHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\nthis.startActionHeaderLabelLine.Location = new System.Drawing.Point(130, 6);\nthis.startActionHeaderLabelLine.Name = \"startActionHeaderLabelLine\";\n- this.startActionHeaderLabelLine.Size = new System.Drawing.Size(667, 1);\n+ this.startActionHeaderLabelLine.Size = new System.Drawing.Size(703, 1);\nthis.startActionHeaderLabelLine.TabIndex = 1;\n//\n// _startActionHeaderLabel\nnodeHeaderTableLayoutPanel.Name = \"nodeHeaderTableLayoutPanel\";\nnodeHeaderTableLayoutPanel.RowCount = 1;\nnodeHeaderTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- nodeHeaderTableLayoutPanel.Size = new System.Drawing.Size(800, 13);\n+ nodeHeaderTableLayoutPanel.Size = new System.Drawing.Size(836, 13);\nnodeHeaderTableLayoutPanel.TabIndex = 0;\n//\n// nodeHeaderLabelLine\nthis.nodeHeaderLabelLine.BackColor = System.Drawing.SystemColors.ControlDark;\nthis.nodeHeaderLabelLine.Location = new System.Drawing.Point(104, 6);\nthis.nodeHeaderLabelLine.Name = \"nodeHeaderLabelLine\";\n- this.nodeHeaderLabelLine.Size = new System.Drawing.Size(693, 1);\n+ this.nodeHeaderLabelLine.Size = new System.Drawing.Size(729, 1);\nthis.nodeHeaderLabelLine.TabIndex = 16;\n//\n// _nodeHeaderLabel\n// _nodeArgumentsLabel\n//\nthis._nodeArgumentsLabel.AutoSize = true;\n- this._nodeArgumentsLabel.Location = new System.Drawing.Point(3, 304);\n+ this._nodeArgumentsLabel.Location = new System.Drawing.Point(3, 327);\nthis._nodeArgumentsLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._nodeArgumentsLabel.Name = \"_nodeArgumentsLabel\";\nthis._nodeArgumentsLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n// _debuggerPortLabel\n//\nthis._debuggerPortLabel.AutoSize = true;\n- this._debuggerPortLabel.Location = new System.Drawing.Point(3, 330);\n+ this._debuggerPortLabel.Location = new System.Drawing.Point(3, 353);\nthis._debuggerPortLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._debuggerPortLabel.Name = \"_debuggerPortLabel\";\nthis._debuggerPortLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\nthis.overallPanel.Controls.Add(this._nodejsPort, 1, 5);\nthis.overallPanel.Controls.Add(this._envVarsLabel, 0, 6);\nthis.overallPanel.Controls.Add(this._envVars, 1, 6);\n- this.overallPanel.Controls.Add(this._startBrowser, 0, 7);\n+ this.overallPanel.Controls.Add(this._startBrowserCheckBox, 0, 7);\nthis.overallPanel.Controls.Add(nodeHeaderTableLayoutPanel, 0, 8);\n- this.overallPanel.Controls.Add(this._nodeExePathLabel, 0, 9);\n- this.overallPanel.Controls.Add(this._nodeExePath, 1, 9);\n- this.overallPanel.Controls.Add(this._browsePath, 2, 9);\n- this.overallPanel.Controls.Add(this._nodeArgumentsLabel, 0, 10);\n- this.overallPanel.Controls.Add(this._nodeExeArguments, 1, 10);\n- this.overallPanel.Controls.Add(this._debuggerPortLabel, 0, 11);\n- this.overallPanel.Controls.Add(this._debuggerPort, 1, 11);\n+ this.overallPanel.Controls.Add(this._nodeExePathLabel, 0, 10);\n+ this.overallPanel.Controls.Add(this._nodeExePath, 1, 10);\n+ this.overallPanel.Controls.Add(this._browsePath, 2, 10);\n+ this.overallPanel.Controls.Add(this._nodeArgumentsLabel, 0, 11);\n+ this.overallPanel.Controls.Add(this._nodeExeArguments, 1, 11);\n+ this.overallPanel.Controls.Add(this._debuggerPortLabel, 0, 12);\n+ this.overallPanel.Controls.Add(this._debuggerPort, 1, 12);\n+ this.overallPanel.Controls.Add(this._storeInProjectFileCheckBox, 0, 9);\nthis.overallPanel.Location = new System.Drawing.Point(0, 0);\nthis.overallPanel.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);\nthis.overallPanel.Name = \"overallPanel\";\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\nthis.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n- this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));\n- this.overallPanel.Size = new System.Drawing.Size(800, 500);\n+ this.overallPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\n+ this.overallPanel.Size = new System.Drawing.Size(836, 500);\nthis.overallPanel.TabIndex = 0;\n//\n// _scriptFile\n//\nthis._scriptFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._scriptFile.Location = new System.Drawing.Point(122, 16);\n+ this._scriptFile.Location = new System.Drawing.Point(181, 16);\nthis._scriptFile.Name = \"_scriptFile\";\nthis._scriptFile.Size = new System.Drawing.Size(620, 20);\nthis._scriptFile.TabIndex = 3;\n//\nthis._scriptArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._scriptArguments.Location = new System.Drawing.Point(122, 42);\n+ this._scriptArguments.Location = new System.Drawing.Point(181, 42);\nthis._scriptArguments.Name = \"_scriptArguments\";\nthis._scriptArguments.Size = new System.Drawing.Size(620, 20);\nthis._scriptArguments.TabIndex = 5;\n//\nthis._workingDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._workingDir.Location = new System.Drawing.Point(122, 68);\n+ this._workingDir.Location = new System.Drawing.Point(181, 68);\nthis._workingDir.Name = \"_workingDir\";\nthis._workingDir.Size = new System.Drawing.Size(620, 20);\nthis._workingDir.TabIndex = 7;\n// _browseDirectory\n//\nthis._browseDirectory.AutoSize = true;\n- this._browseDirectory.Location = new System.Drawing.Point(748, 68);\n+ this._browseDirectory.Location = new System.Drawing.Point(807, 68);\nthis._browseDirectory.Name = \"_browseDirectory\";\nthis._browseDirectory.Size = new System.Drawing.Size(26, 23);\nthis._browseDirectory.TabIndex = 8;\n//\nthis._launchUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._launchUrl.Location = new System.Drawing.Point(122, 97);\n+ this._launchUrl.Location = new System.Drawing.Point(181, 97);\nthis._launchUrl.Name = \"_launchUrl\";\nthis._launchUrl.Size = new System.Drawing.Size(620, 20);\nthis._launchUrl.TabIndex = 10;\n//\n// _nodejsPort\n//\n- this._nodejsPort.Location = new System.Drawing.Point(122, 123);\n+ this._nodejsPort.Location = new System.Drawing.Point(181, 123);\nthis._nodejsPort.Name = \"_nodejsPort\";\nthis._nodejsPort.Size = new System.Drawing.Size(105, 20);\nthis._nodejsPort.TabIndex = 12;\n//\nthis._envVars.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._envVars.Location = new System.Drawing.Point(122, 149);\n+ this._envVars.Location = new System.Drawing.Point(181, 149);\nthis._envVars.Multiline = true;\nthis._envVars.Name = \"_envVars\";\nthis._envVars.ScrollBars = System.Windows.Forms.ScrollBars.Both;\nthis._envVars.TabIndex = 14;\nthis._envVars.TextChanged += new System.EventHandler(this.Changed);\n//\n- // _startBrowser\n+ // _startBrowserCheckBox\n//\n- this._startBrowser.AutoSize = true;\n- this.overallPanel.SetColumnSpan(this._startBrowser, 3);\n- this._startBrowser.Location = new System.Drawing.Point(3, 239);\n- this._startBrowser.Name = \"_startBrowser\";\n- this._startBrowser.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n- this._startBrowser.Size = new System.Drawing.Size(100, 17);\n- this._startBrowser.TabIndex = 15;\n- this._startBrowser.Text = \"_startBrowser\";\n- this._startBrowser.UseVisualStyleBackColor = true;\n- this._startBrowser.CheckedChanged += new System.EventHandler(this.Changed);\n+ this._startBrowserCheckBox.AutoSize = true;\n+ this.overallPanel.SetColumnSpan(this._startBrowserCheckBox, 3);\n+ this._startBrowserCheckBox.Location = new System.Drawing.Point(3, 239);\n+ this._startBrowserCheckBox.Name = \"_startBrowserCheckBox\";\n+ this._startBrowserCheckBox.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._startBrowserCheckBox.Size = new System.Drawing.Size(149, 17);\n+ this._startBrowserCheckBox.TabIndex = 15;\n+ this._startBrowserCheckBox.Text = \"_startBrowserCheckBox\";\n+ this._startBrowserCheckBox.UseVisualStyleBackColor = true;\n+ this._startBrowserCheckBox.CheckedChanged += new System.EventHandler(this.Changed);\n//\n// _nodeExePathLabel\n//\nthis._nodeExePathLabel.AutoSize = true;\n- this._nodeExePathLabel.Location = new System.Drawing.Point(3, 275);\n+ this._nodeExePathLabel.Location = new System.Drawing.Point(3, 298);\nthis._nodeExePathLabel.Margin = new System.Windows.Forms.Padding(3);\nthis._nodeExePathLabel.Name = \"_nodeExePathLabel\";\nthis._nodeExePathLabel.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n| System.Windows.Forms.AnchorStyles.Right)));\nthis._nodeExePath.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;\nthis._nodeExePath.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;\n- this._nodeExePath.Location = new System.Drawing.Point(122, 275);\n+ this._nodeExePath.Location = new System.Drawing.Point(181, 298);\nthis._nodeExePath.Name = \"_nodeExePath\";\nthis._nodeExePath.Size = new System.Drawing.Size(620, 20);\n- this._nodeExePath.TabIndex = 18;\n+ this._nodeExePath.TabIndex = 17;\nthis._nodeExePath.TextChanged += new System.EventHandler(this.NodeExePathChanged);\n//\n// _browsePath\n//\nthis._browsePath.AutoSize = true;\n- this._browsePath.Location = new System.Drawing.Point(748, 275);\n+ this._browsePath.Location = new System.Drawing.Point(807, 298);\nthis._browsePath.Name = \"_browsePath\";\nthis._browsePath.Size = new System.Drawing.Size(26, 23);\n- this._browsePath.TabIndex = 19;\n+ this._browsePath.TabIndex = 18;\nthis._browsePath.Text = \"...\";\nthis._browsePath.UseVisualStyleBackColor = true;\nthis._browsePath.Click += new System.EventHandler(this.BrowsePathClick);\n//\nthis._nodeExeArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n| System.Windows.Forms.AnchorStyles.Right)));\n- this._nodeExeArguments.Location = new System.Drawing.Point(122, 304);\n+ this._nodeExeArguments.Location = new System.Drawing.Point(181, 327);\nthis._nodeExeArguments.Name = \"_nodeExeArguments\";\nthis._nodeExeArguments.Size = new System.Drawing.Size(620, 20);\n- this._nodeExeArguments.TabIndex = 20;\n+ this._nodeExeArguments.TabIndex = 19;\nthis._nodeExeArguments.TextChanged += new System.EventHandler(this.Changed);\n//\n// _debuggerPort\n//\n- this._debuggerPort.Location = new System.Drawing.Point(122, 330);\n+ this._debuggerPort.Location = new System.Drawing.Point(181, 353);\nthis._debuggerPort.Name = \"_debuggerPort\";\nthis._debuggerPort.Size = new System.Drawing.Size(105, 20);\n- this._debuggerPort.TabIndex = 22;\n+ this._debuggerPort.TabIndex = 20;\nthis._debuggerPort.TextChanged += new System.EventHandler(this.PortChanged);\n//\n// _nodeExeErrorProvider\n//\nthis._nodeExeErrorProvider.ContainerControl = this;\n//\n+ // _storeInProjectFileCheckBox\n+ //\n+ this._storeInProjectFileCheckBox.AutoSize = true;\n+ this._storeInProjectFileCheckBox.Location = new System.Drawing.Point(3, 275);\n+ this._storeInProjectFileCheckBox.Name = \"_storeInProjectFileCheckBox\";\n+ this._storeInProjectFileCheckBox.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);\n+ this._storeInProjectFileCheckBox.Size = new System.Drawing.Size(172, 17);\n+ this._storeInProjectFileCheckBox.TabIndex = 16;\n+ this._storeInProjectFileCheckBox.Text = \"_storeInProjectFileCheckBox\";\n+ this._storeInProjectFileCheckBox.UseVisualStyleBackColor = true;\n+ this._storeInProjectFileCheckBox.CheckedChanged += new System.EventHandler(this.Changed);\n+ //\n// NodejsGeneralPropertyPageControl\n//\nthis.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\nprivate System.Windows.Forms.TextBox _nodejsPort;\nprivate System.Windows.Forms.TextBox _debuggerPort;\nprivate System.Windows.Forms.TextBox _envVars;\n- private System.Windows.Forms.CheckBox _startBrowser;\n+ private System.Windows.Forms.CheckBox _startBrowserCheckBox;\nprivate System.Windows.Forms.ToolTip _tooltip;\nprivate System.Windows.Forms.ErrorProvider _nodeExeErrorProvider;\nprivate System.Windows.Forms.Label _nodeArgumentsLabel;\nprivate System.Windows.Forms.Label _nodeHeaderLabel;\nprivate System.Windows.Forms.Label nodeHeaderLabelLine;\nprivate System.Windows.Forms.Label _nodeExePathLabel;\n+ private System.Windows.Forms.CheckBox _storeInProjectFileCheckBox;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs", "diff": "@@ -45,9 +45,10 @@ namespace Microsoft.NodejsTools.Project\nthis._nodePortLabel.Text = Resources.PropertiesNodePort;\nthis._debuggerPortLabel.Text = Resources.PropertiesDebuggerPort;\nthis._envVarsLabel.Text = Resources.PropertiesEnvVars;\n- this._startBrowser.Text = Resources.PropertiesStartBrowser;\n+ this._startBrowserCheckBox.Text = Resources.PropertiesStartBrowser;\nthis._startActionHeaderLabel.Text = Resources.StartActionHeader;\nthis._nodeHeaderLabel.Text = Resources.NodeHeader;\n+ this._storeInProjectFileCheckBox.Text = Resources.StoreNodeSettingsInProjectFile;\nthis._browsePath.AccessibleName = Resources.PropertiesBrowsePathAccessibleName;\nthis._browseDirectory.AccessibleName = Resources.PropertiesBrowseDirectoryAccessibleName;\n@@ -60,7 +61,7 @@ namespace Microsoft.NodejsTools.Project\nthis._tooltip.SetToolTip(this._scriptFile, Resources.ScriptFileTooltip);\nthis._tooltip.SetToolTip(this._scriptArguments, Resources.ScriptArgumentsToolTip);\nthis._tooltip.SetToolTip(this._nodejsPort, Resources.NodejsPortToolTip);\n- this._tooltip.SetToolTip(this._startBrowser, Resources.StartBrowserToolTip);\n+ this._tooltip.SetToolTip(this._startBrowserCheckBox, Resources.StartBrowserToolTip);\nthis._tooltip.SetToolTip(this._workingDir, Resources.WorkingDirToolTip);\nthis._tooltip.SetToolTip(this._launchUrl, Resources.LaunchUrlToolTip);\nthis._tooltip.SetToolTip(this._debuggerPort, Resources.DebuggerPort);\n@@ -135,11 +136,11 @@ namespace Microsoft.NodejsTools.Project\n{\nget\n{\n- return this._startBrowser.Checked;\n+ return this._startBrowserCheckBox.Checked;\n}\nset\n{\n- this._startBrowser.Checked = value;\n+ this._startBrowserCheckBox.Checked = value;\n}\n}\n@@ -195,6 +196,18 @@ namespace Microsoft.NodejsTools.Project\n}\n}\n+ public bool StoreNodeSettingsInProject\n+ {\n+ get\n+ {\n+ return this._storeInProjectFileCheckBox.Checked;\n+ }\n+ set\n+ {\n+ this._storeInProjectFileCheckBox.Checked = value;\n+ }\n+ }\n+\nprivate void Changed(object sender, EventArgs e)\n{\nthis.IsDirty = true;\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -1756,6 +1756,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to &amp;Apply Node.js settings to all users (store in project file).\n+ /// </summary>\n+ internal static string StoreNodeSettingsInProjectFile {\n+ get {\n+ return ResourceManager.GetString(\"StoreNodeSettingsInProjectFile\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Test Framework.\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -740,4 +740,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"BrowseWorkingDirDialogTitle\" xml:space=\"preserve\">\n<value>Select Working Dir</value>\n</data>\n+ <data name=\"StoreNodeSettingsInProjectFile\" xml:space=\"preserve\">\n+ <value>&amp;Apply Node.js settings to all users (store in project file)</value>\n+ </data>\n</root>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -718,6 +718,8 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\nprotected string FileName => this.filename;\n+ protected string UserProjectFilename => this.FileName + PerUserFileExtension;\n+\n/// <summary>\n/// Gets the configuration provider.\n/// </summary>\n@@ -1971,10 +1973,8 @@ namespace Microsoft.VisualStudioTools.Project\n/// <summary>\n/// Return the value of a project property in it's unevalauted form.\n- ///\n- /// New in 1.5.\n/// </summary>\n- /// <param name=\"propertyName\">Name of the property to get</param>\n+ /// <param name=\"propertyName\">Name of the property to get, or null if the property doesn't exist</param>\npublic virtual string GetUnevaluatedProperty(string propertyName)\n{\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\n@@ -1988,23 +1988,62 @@ namespace Microsoft.VisualStudioTools.Project\nreturn null;\n}\n+ public virtual void MovePropertyToProjectFile(string propertyName)\n+ {\n+ this.Site.GetUIThread().MustBeCalledFromUIThread();\n+\n+ var prop = this.userBuildProject.GetProperty(propertyName);\n+ if (prop != null)\n+ {\n+ this.buildProject.SetProperty(prop.Name, prop.UnevaluatedValue);\n+ this.userBuildProject.RemoveProperty(prop);\n+ }\n+ }\n+\n+ public virtual void MovePropertyToUserFile(string propertyName)\n+ {\n+ this.Site.GetUIThread().MustBeCalledFromUIThread();\n+ this.EnsureUserProjectFile();\n+\n+ var prop = this.buildProject.GetProperty(propertyName);\n+ if (prop != null)\n+ {\n+ this.userBuildProject.SetProperty(prop.Name, prop.UnevaluatedValue);\n+ this.buildProject.RemoveProperty(prop);\n+ }\n+ }\n+\n/// <summary>\n/// Set value of project property\n/// </summary>\n/// <param name=\"propertyName\">Name of property</param>\n/// <param name=\"propertyValue\">Value of property</param>\n- public virtual void SetProjectProperty(string propertyName, string propertyValue)\n+ public virtual bool SetProjectProperty(string propertyName, string propertyValue)\n+ {\n+ return this.SetProjectProperty(propertyName, propertyValue, userProjectFile: false);\n+ }\n+\n+ /// <summary>\n+ /// Set value of user project property\n+ /// </summary>\n+ /// <param name=\"propertyName\">Name of property</param>\n+ /// <param name=\"propertyValue\">Value of property</param>\n+ public virtual bool SetUserProjectProperty(string propertyName, string propertyValue)\n{\n+ return this.SetProjectProperty(propertyName, propertyValue, userProjectFile: true);\n+ }\n+\n+ private bool SetProjectProperty(string propertyName, string propertyValue, bool userProjectFile) {\nUtilities.ArgumentNotNull(\"propertyName\", propertyName);\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\nvar oldValue = GetUnevaluatedProperty(propertyName) ?? string.Empty;\npropertyValue = propertyValue ?? string.Empty;\n- if (oldValue.Equals(propertyValue, StringComparison.Ordinal))\n+ if (StringComparer.Ordinal.Equals(oldValue, propertyValue))\n{\n// Property is unchanged or unspecified, so don't set it.\n- return;\n+ return false;\n}\n// Check out the project file.\n@@ -2013,22 +2052,24 @@ namespace Microsoft.VisualStudioTools.Project\nthrow Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);\n}\n+ if (userProjectFile)\n+ {\n+ this.EnsureUserProjectFile();\n+ this.UserBuildProject.SetProperty(propertyName, propertyValue);\n+ }\n+ else\n+ {\nvar newProp = this.buildProject.SetProperty(propertyName, propertyValue);\n+ }\nRaiseProjectPropertyChanged(propertyName, oldValue, propertyValue);\n// property cache will need to be updated\nthis.currentConfig = null;\n+ return true;\n}\n- /// <summary>\n- /// Set value of user project property\n- /// </summary>\n- /// <param name=\"propertyName\">Name of property</param>\n- /// <param name=\"propertyValue\">Value of property</param>\n- public virtual void SetUserProjectProperty(string propertyName, string propertyValue)\n+ private void EnsureUserProjectFile()\n{\n- Utilities.ArgumentNotNull(\"propertyName\", propertyName);\n-\nif (this.userBuildProject == null)\n{\n// user project file doesn't exist yet, create it.\n@@ -2036,7 +2077,6 @@ namespace Microsoft.VisualStudioTools.Project\nthis.userBuildProject = new MSBuild.Project(root, null, null, this.BuildProject.ProjectCollection);\nthis.userBuildProject.FullPath = this.FileName + PerUserFileExtension;\n}\n- this.userBuildProject.SetProperty(propertyName, propertyValue ?? string.Empty);\n}\n/// <summary>\n@@ -2547,10 +2587,9 @@ namespace Microsoft.VisualStudioTools.Project\nSetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, this.filename, this.buildProject));\n- var userProjectFilename = this.FileName + PerUserFileExtension;\n- if (File.Exists(userProjectFilename))\n+ if (File.Exists(this.UserProjectFilename))\n{\n- this.userBuildProject = this.BuildProject.ProjectCollection.LoadProject(userProjectFilename);\n+ this.userBuildProject = this.BuildProject.ProjectCollection.LoadProject(this.UserProjectFilename);\n}\n// Load the guid\n@@ -3658,7 +3697,7 @@ namespace Microsoft.VisualStudioTools.Project\nflags, // no per file flags\nattributes, // no per file file attributes\nout var verdict,\n- out var moreInfo // ignore additional results\n+ out var _ // ignore additional results\n);\nvar qer = (tagVSQueryEditResult)verdict;\n@@ -3691,7 +3730,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\ninternal bool QueryEditProjectFile(bool suppressUI)\n{\n- return QueryEditFiles(suppressUI, this.filename);\n+ return QueryEditFiles(suppressUI, this.filename, this.UserProjectFilename);\n}\ninternal bool QueryFolderAdd(HierarchyNode targetFolder, string path)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add option to store node.js settings in user file This fixes #602
410,217
13.11.2017 14:52:53
28,800
dff1149a6f42778408ba028b69d2b36fed67a302
More prep to make the actual change better readable
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "diff": "@@ -253,42 +253,42 @@ namespace Microsoft.NodejsTools.Repl\ninternal class ListenerThread : JsonListener, IDisposable\n{\n- private readonly NodejsReplEvaluator _eval;\n- private readonly Process _process;\n- private readonly object _socketLock = new object();\n- private Socket _acceptSocket;\n- internal bool _connected;\n- private TaskCompletionSource<ExecutionResult> _completion;\n- private string _executionText;\n- private readonly JavaScriptSerializer _serializer = new JavaScriptSerializer();\n+ private readonly NodejsReplEvaluator eval;\n+ private readonly Process process;\n+ private readonly object socketLock = new object();\n+ private Socket acceptSocket;\n+ internal bool connected;\n+ private TaskCompletionSource<ExecutionResult> completion;\n+ private string executionText;\n+ private readonly JavaScriptSerializer serializer = new JavaScriptSerializer();\nprivate bool disposed;\n#if DEBUG\n- private Thread _socketLockedThread;\n+ private Thread socketLockedThread;\n#endif\n- private static string _noReplProcess = Resources.InteractiveWindowNoProcessErrorMessage + Environment.NewLine;\n+ private static string noReplProcess = Resources.InteractiveWindowNoProcessErrorMessage + Environment.NewLine;\npublic ListenerThread(NodejsReplEvaluator eval, Process process, Socket socket)\n{\n- this._eval = eval;\n- this._process = process;\n- this._acceptSocket = socket;\n+ this.eval = eval;\n+ this.process = process;\n+ this.acceptSocket = socket;\n- this._acceptSocket.BeginAccept(this.SocketConnectionAccepted, null);\n+ this.acceptSocket.BeginAccept(this.SocketConnectionAccepted, null);\n- this._process.OutputDataReceived += new DataReceivedEventHandler(this.StdOutReceived);\n- this._process.ErrorDataReceived += new DataReceivedEventHandler(this.StdErrReceived);\n- this._process.EnableRaisingEvents = true;\n- this._process.Exited += this.ProcessExited;\n+ this.process.OutputDataReceived += new DataReceivedEventHandler(this.StdOutReceived);\n+ this.process.ErrorDataReceived += new DataReceivedEventHandler(this.StdErrReceived);\n+ this.process.EnableRaisingEvents = true;\n+ this.process.Exited += this.ProcessExited;\n- this._process.BeginOutputReadLine();\n- this._process.BeginErrorReadLine();\n+ this.process.BeginOutputReadLine();\n+ this.process.BeginErrorReadLine();\n}\nprivate void StdOutReceived(object sender, DataReceivedEventArgs args)\n{\nif (args.Data != null)\n{\n- this._eval.window.WriteOutput(args.Data + Environment.NewLine);\n+ this.eval.window.WriteOutput(args.Data + Environment.NewLine);\n}\n}\n@@ -296,7 +296,7 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (args.Data != null)\n{\n- this._eval.window.WriteError(args.Data + Environment.NewLine);\n+ this.eval.window.WriteError(args.Data + Environment.NewLine);\n}\n}\n@@ -307,36 +307,36 @@ namespace Microsoft.NodejsTools.Repl\nprivate void ProcessExitedWorker()\n{\n- this._eval.window.WriteError(Resources.InteractiveWindowProcessExitedMessage + Environment.NewLine);\n+ this.eval.window.WriteError(Resources.InteractiveWindowProcessExitedMessage + Environment.NewLine);\nusing (new SocketLock(this))\n{\n- if (this._completion != null)\n+ if (this.completion != null)\n{\n- this._completion.SetResult(ExecutionResult.Failure);\n+ this.completion.SetResult(ExecutionResult.Failure);\n}\n- this._completion = null;\n+ this.completion = null;\n}\n}\nprivate void SocketConnectionAccepted(IAsyncResult result)\n{\n- this.Socket = this._acceptSocket.EndAccept(result);\n- this._acceptSocket.Close();\n+ this.Socket = this.acceptSocket.EndAccept(result);\n+ this.acceptSocket.Close();\nusing (new SocketLock(this))\n{\n- this._connected = true;\n+ this.connected = true;\n}\nusing (new SocketLock(this))\n{\n- if (this._executionText != null)\n+ if (this.executionText != null)\n{\n#if DEBUG\n- Debug.WriteLine(\"Executing delayed text: \" + this._executionText);\n+ Debug.WriteLine(\"Executing delayed text: \" + this.executionText);\n#endif\n- SendExecuteText(this._executionText);\n- this._executionText = null;\n+ SendExecuteText(this.executionText);\n+ this.executionText = null;\n}\n}\n@@ -351,14 +351,14 @@ namespace Microsoft.NodejsTools.Repl\n#endif\nusing (new SocketLock(this))\n{\n- if (!this._connected)\n+ if (!this.connected)\n{\n// delay executing the text until we're connected\n#if DEBUG\nDebug.WriteLine(\"Delayed executing text\");\n#endif\n- this._completion = completion = new TaskCompletionSource<ExecutionResult>();\n- this._executionText = text;\n+ this.completion = completion = new TaskCompletionSource<ExecutionResult>();\n+ this.executionText = text;\nreturn completion.Task;\n}\n@@ -366,17 +366,17 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (!this.Socket.Connected)\n{\n- this._eval.window.WriteError(_noReplProcess);\n+ this.eval.window.WriteError(noReplProcess);\nreturn ExecutionResult.Failed;\n}\n- this._completion = completion = new TaskCompletionSource<ExecutionResult>();\n+ this.completion = completion = new TaskCompletionSource<ExecutionResult>();\nSendExecuteText(text);\n}\ncatch (SocketException)\n{\n- this._eval.window.WriteError(_noReplProcess);\n+ this.eval.window.WriteError(noReplProcess);\nreturn ExecutionResult.Failed;\n}\n@@ -389,7 +389,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate void SendExecuteText(string text)\n{\n- AllowSetForegroundWindow(this._process.Id);\n+ AllowSetForegroundWindow(this.process.Id);\nvar request = new Dictionary<string, object>() {\n{ \"type\", \"execute\" },\n{ \"code\", text },\n@@ -400,7 +400,7 @@ namespace Microsoft.NodejsTools.Repl\ninternal void SendRequest(Dictionary<string, object> request)\n{\n- var json = this._serializer.Serialize(request);\n+ var json = this.serializer.Serialize(request);\nvar bytes = System.Text.Encoding.UTF8.GetBytes(json);\nvar length = \"Content-length: \" + bytes.Length + \"\\r\\n\\r\\n\";\n@@ -415,7 +415,7 @@ namespace Microsoft.NodejsTools.Repl\nprotected override void ProcessPacket(JsonResponse response)\n{\n- var cmd = this._serializer.Deserialize<Dictionary<string, object>>(response.Body);\n+ var cmd = this.serializer.Deserialize<Dictionary<string, object>>(response.Body);\nif (cmd.TryGetValue(\"type\", out var type) && type is string)\n{\n@@ -425,26 +425,26 @@ namespace Microsoft.NodejsTools.Repl\nobject result;\nif (cmd.TryGetValue(\"result\", out result))\n{\n- this._eval.window.WriteLine(result.ToString());\n- this._completion.SetResult(ExecutionResult.Success);\n+ this.eval.window.WriteLine(result.ToString());\n+ this.completion.SetResult(ExecutionResult.Success);\n}\nelse if (cmd.TryGetValue(\"error\", out result))\n{\n- this._eval.window.WriteError(result.ToString());\n- this._completion.SetResult(ExecutionResult.Failure);\n+ this.eval.window.WriteError(result.ToString());\n+ this.completion.SetResult(ExecutionResult.Failure);\n}\n- this._completion = null;\n+ this.completion = null;\nbreak;\ncase \"output\":\nif (cmd.TryGetValue(\"output\", out result))\n{\n- this._eval.window.WriteOutput(FixOutput(result));\n+ this.eval.window.WriteOutput(FixOutput(result));\n}\nbreak;\n- case \"output_error\":\n+ case \"outputerror\":\nif (cmd.TryGetValue(\"output\", out result))\n{\n- this._eval.window.WriteError(FixOutput(result));\n+ this.eval.window.WriteError(FixOutput(result));\n}\nbreak;\n#if DEBUG\n@@ -492,10 +492,10 @@ namespace Microsoft.NodejsTools.Repl\ninternal void Disconnect()\n{\n- if (this._completion != null)\n+ if (this.completion != null)\n{\n- this._completion.SetResult(ExecutionResult.Failure);\n- this._completion = null;\n+ this.completion.SetResult(ExecutionResult.Failure);\n+ this.completion = null;\n}\n}\n@@ -509,14 +509,14 @@ namespace Microsoft.NodejsTools.Repl\n{\nif (!this.disposed)\n{\n- if (this._process != null && !this._process.HasExited)\n+ if (this.process != null && !this.process.HasExited)\n{\ntry\n{\n//Disconnect our event since we are forceably killing the process off\n// We'll synchronously send the message to the user\n- this._process.Exited -= this.ProcessExited;\n- this._process.Kill();\n+ this.process.Exited -= this.ProcessExited;\n+ this.process.Kill();\n}\ncatch (InvalidOperationException)\n{\n@@ -530,9 +530,9 @@ namespace Microsoft.NodejsTools.Repl\nProcessExitedWorker();\n}\n- if (this._process != null)\n+ if (this.process != null)\n{\n- this._process.Dispose();\n+ this.process.Dispose();\n}\nthis.disposed = true;\n}\n@@ -553,10 +553,10 @@ namespace Microsoft.NodejsTools.Repl\npublic SocketLock(ListenerThread evaluator)\n{\n- Monitor.Enter(evaluator._socketLock);\n+ Monitor.Enter(evaluator.socketLock);\n#if DEBUG\n- Debug.Assert(evaluator._socketLockedThread == null);\n- evaluator._socketLockedThread = Thread.CurrentThread;\n+ Debug.Assert(evaluator.socketLockedThread == null);\n+ evaluator.socketLockedThread = Thread.CurrentThread;\n#endif\nthis.evaluator = evaluator;\n}\n@@ -564,9 +564,9 @@ namespace Microsoft.NodejsTools.Repl\npublic void Dispose()\n{\n#if DEBUG\n- this.evaluator._socketLockedThread = null;\n+ this.evaluator.socketLockedThread = null;\n#endif\n- Monitor.Exit(this.evaluator._socketLock);\n+ Monitor.Exit(this.evaluator.socketLock);\n}\n}\n#endregion\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -1631,7 +1631,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Clears the contents of the REPL editor window..\n+ /// Looks up a localized string similar to Save the current REPL session to a file..\n/// </summary>\ninternal static string ReplSaveDescription {\nget {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "@@ -676,7 +676,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Resets the context object to an empty object and clears any multi-line expression.</value>\n</data>\n<data name=\"ReplSaveDescription\" xml:space=\"preserve\">\n- <value>Clears the contents of the REPL editor window.</value>\n+ <value>Save the current REPL session to a file.</value>\n</data>\n<data name=\"ReplSaveFailed\" xml:space=\"preserve\">\n<value>Failed to save: '{0}'.</value>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
More prep to make the actual change better readable
410,217
14.11.2017 13:37:42
28,800
662732ae2b4ae0f5a1f9b040ddb43c72fb62fcbc
disable default warnings as errors
[ { "change_type": "MODIFY", "old_path": "Build/Common.Build.CSharp.settings", "new_path": "Build/Common.Build.CSharp.settings", "diff": "<Language>C#</Language> <!-- Duplicated from the C# targets file -->\n<Platform Condition=\"'$(Platform)'==''\">AnyCPU</Platform>\n- <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>\n- <!-- This eliminates the warning CA0060, EnvDTE Version=7.0 not found, for VS 10 installations. -->\n- <CodeAnalysisAdditionalOptions> /assemblycomparemode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>\n+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>\n</PropertyGroup>\n<PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
disable default warnings as errors
410,217
15.11.2017 12:39:19
28,800
98bec7c4b165bb4c68500396cf8f8eb6628946cb
Add support for npm commands in folder view Adds a right-click menu item to package.json with the following commands: * Install Missing Packages * Update Packages * Install New Package (opens UI)
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Guids.cs", "new_path": "Nodejs/Product/Nodejs/Guids.cs", "diff": "@@ -12,6 +12,7 @@ namespace Microsoft.NodejsTools\npublic const string NodejsCmdSetString = \"695e37e2-c6df-4e0a-8833-f688e4c65f1f\";\npublic const string NodejsDebugLanguageString = \"{65791609-BA29-49CF-A214-DBFF8AEC3BC2}\";\npublic const string NodejsNpmCmdSetString = \"9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA\";\n+ public const string NodeToolsWorkspaceCmdSetString = \"{0D701F33-94A3-421C-9865-6F65E7E4B689}\";\npublic const string NodejsProjectFactoryString = \"3AF33F2E-1136-4D97-BBB7-1795711AC8B8\";\npublic const string NodejsBaseProjectFactoryString = \"9092AA53-FB77-4645-B42D-1CCCA6BD08BD\";\npublic const string TypeScriptLanguageInfoString = \"4a0dddb5-7a95-4fbf-97cc-616d07737a77\";\n@@ -35,6 +36,9 @@ namespace Microsoft.NodejsTools\npublic static readonly Guid NodejsCmdSet = new Guid(NodejsCmdSetString);\npublic static readonly Guid NodejsDebugLanguage = new Guid(NodejsDebugLanguageString);\npublic static readonly Guid NodejsNpmCmdSet = new Guid(NodejsNpmCmdSetString);\n+ public static readonly Guid NodeToolsWorkspaceCmdSet = new Guid(NodeToolsWorkspaceCmdSetString);\n+\n+\npublic static readonly Guid TypeScriptLanguageInfo = new Guid(TypeScriptLanguageInfoString);\npublic static readonly Guid TypeScriptDebugLanguage = new Guid(TypeScriptDebuggerLanguageInfoString);\n@@ -58,5 +62,9 @@ namespace Microsoft.NodejsTools\n// UWP project flavor guid\npublic const string NodejsUwpProjectFlavor = \"00251F00-BA30-4CE4-96A2-B8A1085F37AA\";\n+\n+ // Workspace guids\n+ public const string PackageJsonContextTypeString = \"{78F43160-2968-4FCA-8829-7E30E9B610CF}\";\n+ public readonly static Guid PackageJsonContextType = new Guid(PackageJsonContextTypeString);\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<EmbedInteropTypes>True</EmbedInteropTypes>\n</Reference>\n<Reference Include=\"Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n+ <Reference Include=\"Microsoft.VisualStudio.Workspace, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n+ <Reference Include=\"Microsoft.VisualStudio.Workspace.Extensions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n+ <Reference Include=\"Microsoft.VisualStudio.Workspace.Extensions.VS, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"Microsoft.VisualStudio.Workspace.VSIntegration.Contracts, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<EmbedInteropTypes>True</EmbedInteropTypes>\n<Compile Include=\"Debugger\\SteppingKind.cs\" />\n<Compile Include=\"Project\\NodejsFileNodeProperties.cs\" />\n<Compile Include=\"Jade\\JadeEditorFactory.cs\" />\n+ <Compile Include=\"Workspace\\NpmActionProviderFactory.cs\" />\n+ <Compile Include=\"Workspace\\PackageJsonContextProviderFactory.cs\" />\n</ItemGroup>\n<ItemGroup>\n<Compile Include=\"Project\\ProjectResources.cs\" />\n<PackageReference Include=\"Microsoft.VisualStudio.Threading\">\n<Version>15.5.13-beta</Version>\n</PackageReference>\n- <PackageReference Include=\"Microsoft.VisualStudio.Workspaces\">\n- <Version>15.0.215-pre</Version>\n- </PackageReference>\n<PackageReference Include=\"Newtonsoft.Json\">\n<Version>9.0.1</Version>\n</PackageReference>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NodejsTools.vsct", "new_path": "Nodejs/Product/Nodejs/NodejsTools.vsct", "diff": "<Group guid=\"guidNodeToolsCmdSet\" id=\"AddNewFileGroup\" priority=\"0x0900\">\n<Parent guid=\"guidSHLMainMenu\" id=\"IDM_VS_CSCD_PROJECT_ADD\"/>\n</Group>\n+\n+ <Group guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"WorkspaceGroup\" priority=\"0x1000\">\n+ <Parent guid=\"guidWorkspaceExplorerToolWindowCmdSet\" id=\"idmWSE_ContextMenu\"/>\n+ </Group>\n</Groups>\n<Menus>\n<CommandName>Import Existing Project...</CommandName>\n</Strings>\n</Button>\n+\n+ <Button guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"cmdidWorkSpaceNpmInstallMissing\" priority=\"0x010\" type=\"Button\">\n+ <Parent guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"WorkspaceGroup\"/>\n+ <CommandFlag>DefaultInvisible</CommandFlag>\n+ <CommandFlag>DynamicVisibility</CommandFlag>\n+ <Strings>\n+ <ButtonText>Install Missing npm Packages...</ButtonText>\n+ </Strings>\n+ </Button>\n+\n+ <Button guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"cmdidWorkSpaceNpmInstallNew\" priority=\"0x011\" type=\"Button\">\n+ <Parent guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"WorkspaceGroup\"/>\n+ <CommandFlag>DefaultInvisible</CommandFlag>\n+ <CommandFlag>DynamicVisibility</CommandFlag>\n+ <Strings>\n+ <ButtonText>Install New npm Packages...</ButtonText>\n+ </Strings>\n+ </Button>\n+\n+ <Button guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"cmdidWorkSpaceNpmUpdate\" priority=\"0x012\" type=\"Button\">\n+ <Parent guid=\"guidNodeToolsWorkspaceCmdSet\" id=\"WorkspaceGroup\"/>\n+ <CommandFlag>DefaultInvisible</CommandFlag>\n+ <CommandFlag>DynamicVisibility</CommandFlag>\n+ <Strings>\n+ <ButtonText>Update npm Packages...</ButtonText>\n+ </Strings>\n+ </Button>\n</Buttons>\n<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->\n<!-- This is the package guid. -->\n<GuidSymbol name=\"guidNodeToolsPkg\" value=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" />\n+ <!-- Solution Explorer folder mode GUIDs and IDs. -->\n+ <GuidSymbol name=\"guidWorkspaceExplorerToolWindowCmdSet\" value=\"{cfb400f1-5c60-4f3c-856e-180d28def0b7}\">\n+ <IDSymbol name=\"idmWSE_ContextMenu\" value=\"0x0002\"/>\n+ </GuidSymbol>\n+\n<!-- This is our command set GUID and associated commands -->\n<GuidSymbol name=\"guidNodeToolsCmdSet\" value=\"{695e37e2-c6df-4e0a-8833-f688e4c65f1f}\">\n<IDSymbol name=\"cmdidReplWindow\" value=\"0x200\" />\n<IDSymbol name=\"NpmMenu\" value=\"0x3000\"/>\n</GuidSymbol>\n+ <GuidSymbol name=\"guidNodeToolsWorkspaceCmdSet\" value=\"{0D701F33-94A3-421C-9865-6F65E7E4B689}\">\n+ <IDSymbol name=\"WorkspaceGroup\" value=\"0x4000\"/>\n+ <IDSymbol name=\"cmdidWorkSpaceNpmInstallMissing\" value=\"0x4001\"/>\n+ <IDSymbol name=\"cmdidWorkSpaceNpmInstallNew\" value=\"0x4002\"/>\n+ <IDSymbol name=\"cmdidWorkSpaceNpmUpdate\" value=\"0x4003\"/>\n+ </GuidSymbol>\n+\n<GuidSymbol name=\"guidCommandPromptImage\" value=\"{6CFD0EC5-3818-4439-AC50-71365BD2A756}\" />\n<GuidSymbol name=\"guidReplImage\" value=\"{31C0C4BE-487E-4CCB-BEA2-A2EE8D23EDBB}\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add support for npm commands in folder view Adds a right-click menu item to package.json with the following commands: * Install Missing Packages * Update Packages * Install New Package (opens UI)
410,217
16.11.2017 11:25:42
28,800
01f163e0ce5392b9e1bcdb33070462b410ff8917
Ensure jasmine.js is always copied to the output directory
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "diff": "<Content Include=\"TestFrameworks\\find_tests.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n- <Content Include=\"TestFrameworks\\Jasmine\\jasmine.js\" />\n+ <Content Include=\"TestFrameworks\\Jasmine\\jasmine.js\">\n+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n+ </Content>\n<Content Include=\"TestFrameworks\\mocha\\mocha.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Ensure jasmine.js is always copied to the output directory
410,217
21.11.2017 11:32:10
28,800
2478b799ef672d745327ae6ced01eddaed6611e7
Fix interactive window colors
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "diff": "@@ -359,7 +359,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate static InteractiveWindowColor Change(InteractiveWindowColor? from, InteractiveWindowColor to)\n{\n- return ((from ?? InteractiveWindowColor.Black) & InteractiveWindowColor.DarkGray) | to;\n+ return ((from ?? InteractiveWindowColor.Foreground) & InteractiveWindowColor.DarkGray) | to;\n}\nprivate static InteractiveWindowColor? GetColorFromEscape(string text, ref int start)\n@@ -410,7 +410,7 @@ namespace Microsoft.NodejsTools.Repl\n}\nelse\n{\n- for (int j = 0; j < codes.Count; j++)\n+ for (var j = 0; j < codes.Count; j++)\n{\nswitch (codes[j])\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs", "diff": "@@ -165,7 +165,11 @@ namespace Microsoft.NodejsTools.Repl\nreturn ExecutionResult.Failure;\n}\n- var npmReplRedirector = new NpmReplRedirector(window);\n+ var evaluator = window.Evaluator as NodejsReplEvaluator;\n+\n+ Debug.Assert(evaluator != null, \"How did we end up with an evaluator that's not the nodetools evaluator?\");\n+\n+ var npmReplRedirector = new NpmReplRedirector(evaluator);\nawait ExecuteNpmCommandAsync(\nnpmReplRedirector,\nnpmPath,\n@@ -261,7 +265,7 @@ namespace Microsoft.NodejsTools.Repl\nreturn standardOutputLines;\n}\n- internal class NpmReplRedirector : Redirector\n+ internal sealed class NpmReplRedirector : Redirector\n{\ninternal const string ErrorAnsiColor = \"\\x1b[31;1m\";\ninternal const string WarnAnsiColor = \"\\x1b[33;22m\";\n@@ -270,11 +274,11 @@ namespace Microsoft.NodejsTools.Repl\nprivate const string ErrorText = \"npm ERR!\";\nprivate const string WarningText = \"npm WARN\";\n- private readonly IInteractiveWindow window;\n+ private readonly NodejsReplEvaluator evaluator;\n- public NpmReplRedirector(IInteractiveWindow window)\n+ public NpmReplRedirector(NodejsReplEvaluator evaluator)\n{\n- this.window = window;\n+ this.evaluator = evaluator;\nthis.HasErrors = false;\n}\n@@ -303,13 +307,13 @@ namespace Microsoft.NodejsTools.Repl\noutputString += NormalAnsiColor + substring;\n- this.window.WriteLine(outputString);\n+ this.evaluator.WriteLine(outputString);\nDebug.WriteLine(decodedString, \"REPL npm\");\n}\npublic override void WriteErrorLine(string line)\n{\n- this.window.WriteError(line);\n+ this.evaluator.WriteError(line);\n}\n}\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix interactive window colors
410,217
27.11.2017 14:25:36
28,800
1ef1ab95461cc89be4d230005572ba3c55b92639
Simplify the API to read package.json files
[ { "change_type": "DELETE", "old_path": "Nodejs/Product/Npm/DirectoryPackageJsonSource.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System.IO;\n-\n-namespace Microsoft.NodejsTools.Npm\n-{\n- public class DirectoryPackageJsonSource : IPackageJsonSource\n- {\n- private readonly FilePackageJsonSource source;\n-\n- public DirectoryPackageJsonSource(string fullDirectoryPath)\n- {\n- this.source = new FilePackageJsonSource(Path.Combine(fullDirectoryPath, \"package.json\"));\n- }\n-\n- public dynamic Package => this.source.Package;\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Npm/FilePackageJsonSource.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.Globalization;\n-using System.IO;\n-using System.Threading;\n-\n-namespace Microsoft.NodejsTools.Npm\n-{\n- public class FilePackageJsonSource : IPackageJsonSource\n- {\n- private readonly ReaderPackageJsonSource source;\n-\n- public FilePackageJsonSource(string fullPathToFile)\n- {\n- if (File.Exists(fullPathToFile))\n- {\n- int retryInterval = 500;\n- int attempts = 5;\n-\n- // populate _source with retries for recoverable errors.\n- while (--attempts >= 0)\n- {\n- try\n- {\n- using (var fin = new FileStream(fullPathToFile, FileMode.Open, FileAccess.Read, FileShare.Read))\n- using (var reader = new StreamReader(fin))\n- {\n- this.source = new ReaderPackageJsonSource(reader);\n- break;\n- }\n- }\n- catch (PackageJsonException pje)\n- {\n- WrapExceptionAndRethrow(fullPathToFile, pje);\n- }\n- catch (IOException)\n- {\n- if (attempts <= 0) { throw; }\n- }\n- catch (UnauthorizedAccessException)\n- {\n- if (attempts <= 0) { throw; }\n- }\n-\n- Thread.Sleep(retryInterval);\n- retryInterval *= 2; // exponential backoff\n- }\n- }\n- }\n-\n- private void WrapExceptionAndRethrow(\n- string fullPathToFile,\n- Exception ex)\n- {\n- throw new PackageJsonException(\n- string.Format(CultureInfo.CurrentCulture, @\"Error reading package.json at '{0}': {1}\", fullPathToFile, ex.Message),\n- ex);\n- }\n-\n- public dynamic Package => this.source?.Package;\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Npm/IPackageJsonSource.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-namespace Microsoft.NodejsTools.Npm\n-{\n- public interface IPackageJsonSource\n- {\n- dynamic Package { get; }\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Npm/Npm.csproj", "new_path": "Nodejs/Product/Npm/Npm.csproj", "diff": "<Compile Include=\"SPI\\AbstractNpmSearchComparer.cs\" />\n<Compile Include=\"DependencyType.cs\" />\n<Compile Include=\"DependencyUrlType.cs\" />\n- <Compile Include=\"DirectoryPackageJsonSource.cs\" />\n- <Compile Include=\"FilePackageJsonSource.cs\" />\n<Compile Include=\"IBundledDependencies.cs\" />\n<Compile Include=\"IDependencies.cs\" />\n<Compile Include=\"IDependency.cs\" />\n<Compile Include=\"INpmPathProvider.cs\" />\n<Compile Include=\"IPackage.cs\" />\n<Compile Include=\"IPackageJson.cs\" />\n- <Compile Include=\"IPackageJsonSource.cs\" />\n<Compile Include=\"IPerson.cs\" />\n<Compile Include=\"IPkgStringArray.cs\" />\n<Compile Include=\"IRootPackage.cs\" />\n<Compile Include=\"PackageJsonException.cs\" />\n<Compile Include=\"PackageJsonFactory.cs\" />\n<Compile Include=\"Properties\\AssemblyInfo.cs\" />\n- <Compile Include=\"ReaderPackageJsonSource.cs\" />\n<Compile Include=\"Resources.Designer.cs\">\n<AutoGen>True</AutoGen>\n<DesignTime>True</DesignTime>\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Npm/ReaderPackageJsonSource.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.IO;\n-using Newtonsoft.Json;\n-using Newtonsoft.Json.Linq;\n-using System.Globalization;\n-\n-namespace Microsoft.NodejsTools.Npm\n-{\n- public class ReaderPackageJsonSource : IPackageJsonSource\n- {\n- public ReaderPackageJsonSource(TextReader reader)\n- {\n- try\n- {\n- var text = reader.ReadToEnd();\n- try\n- {\n- // JsonConvert and JObject.Parse exhibit slightly different behavior,\n- // so fall back to JObject.Parse if JsonConvert does not properly deserialize\n- // the object.\n- this.Package = JsonConvert.DeserializeObject(text);\n- }\n- catch (ArgumentException)\n- {\n- this.Package = JObject.Parse(text);\n- }\n- }\n- catch (JsonReaderException jre)\n- {\n- WrapExceptionAndRethrow(jre);\n- }\n- catch (JsonSerializationException jse)\n- {\n- WrapExceptionAndRethrow(jse);\n- }\n- catch (FormatException fe)\n- {\n- WrapExceptionAndRethrow(fe);\n- }\n- catch (ArgumentException ae)\n- {\n- throw new PackageJsonException(\n- string.Format(CultureInfo.CurrentCulture, @\"Error reading package.json. The file may be parseable JSON but may contain objects with duplicate properties.\n-\n-The following error occurred:\n-\n-{0}\", ae.Message),\n- ae);\n- }\n- }\n-\n- private void WrapExceptionAndRethrow(\n- Exception ex)\n- {\n- throw new PackageJsonException(\n- string.Format(CultureInfo.CurrentCulture, @\"Unable to read package.json. Please ensure the file is valid JSON.\n-\n-Reading failed because the following error occurred:\n-\n-{0}\", ex.Message),\n- ex);\n- }\n-\n- public dynamic Package { get; }\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Npm/SPI/RootPackage.cs", "new_path": "Nodejs/Product/Npm/SPI/RootPackage.cs", "diff": "@@ -25,7 +25,7 @@ namespace Microsoft.NodejsTools.Npm.SPI\n{\nif (packageJsonFile.Length < 260)\n{\n- this.PackageJson = PackageJsonFactory.Create(new DirectoryPackageJsonSource(fullPathToRootDirectory));\n+ this.PackageJson = PackageJsonFactory.Create(packageJsonFile);\n}\n}\ncatch (RuntimeBinderException rbe)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Simplify the API to read package.json files
410,217
30.11.2017 14:16:42
28,800
15df3527bb80c627594b134ae9dd2c92241d0903
Integrate Output window support
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"Repl\\ReplOutputClassificationFormatDefinitions.cs\" />\n<Compile Include=\"Repl\\ReplOutputClassifier.cs\" />\n<Compile Include=\"Repl\\ReplOutputClassifierProvider.cs\" />\n+ <Compile Include=\"SharedProject\\OutputWindowWrapper.cs\" />\n<Compile Include=\"SourceMapping\\FunctionInfo.cs\" />\n<Compile Include=\"SourceMapping\\JavaScriptSourceMapInfo.cs\" />\n<Compile Include=\"Debugger\\NodeConstants.cs\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/NpmActionProviderFactory.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/NpmActionProviderFactory.cs", "diff": "using System;\nusing System.Collections.Generic;\n+using System.ComponentModel.Composition;\nusing System.IO;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.NodejsTools.Npm;\nusing Microsoft.NodejsTools.NpmUI;\n+using Microsoft.VisualStudio.Threading;\nusing Microsoft.VisualStudio.Workspace;\nusing Microsoft.VisualStudio.Workspace.Extensions.VS;\n+using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Workspace\n{\n@@ -17,45 +20,48 @@ namespace Microsoft.NodejsTools.Workspace\n{\nprivate const string ProviderType = \"{971EA159-8F0F-44FF-A279-B11DF1D7F319}\";\n+ [Import]\n+ private OutputPaneWrapper OutputPane { get; set; }\n+\npublic IFileContextActionProvider CreateProvider(IWorkspace workspaceContext)\n{\n- return new FileContextActionProvider(workspaceContext);\n+ return new FileContextActionProvider(workspaceContext, OutputPane);\n}\nprivate class FileContextActionProvider : IFileContextActionProvider\n{\n- private IWorkspace workspaceContext;\n+ public readonly IWorkspace workspaceContext;\n+ public readonly OutputPaneWrapper outputPane;\n- public FileContextActionProvider(IWorkspace workspaceContext)\n+ public FileContextActionProvider(IWorkspace workspaceContext, OutputPaneWrapper outputPane)\n{\nthis.workspaceContext = workspaceContext;\n+ this.outputPane = outputPane;\n}\n- public Task<IReadOnlyList<IFileContextAction>> GetActionsAsync(string filePath, FileContext fileContext, CancellationToken cancellationToken)\n+ public async Task<IReadOnlyList<IFileContextAction>> GetActionsAsync(string filePath, FileContext fileContext, CancellationToken cancellationToken)\n{\n- return Task.FromResult<IReadOnlyList<IFileContextAction>>(new IFileContextAction[] {\n- new InstallMissingNpmPackagesAction(filePath, fileContext),\n- new InstallNewNpmPackagesAction(filePath, fileContext),\n- new UpdateNpmPackagesAction(filePath, fileContext)\n- });\n+ await this.workspaceContext.JTF.SwitchToMainThreadAsync();\n+ this.outputPane.ShowWindow();\n+\n+ return new IFileContextAction[] {\n+ new InstallMissingNpmPackagesAction(filePath, fileContext, this),\n+ new InstallNewNpmPackagesAction(filePath, fileContext, this),\n+ new UpdateNpmPackagesAction(filePath, fileContext, this)\n+ };\n}\n}\nprivate class InstallMissingNpmPackagesAction : NpmPackagesAction\n{\n- public InstallMissingNpmPackagesAction(string packageJsonPath, FileContext fileContext) :\n- base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmInstallMissing)\n+ public InstallMissingNpmPackagesAction(string packageJsonPath, FileContext fileContext, FileContextActionProvider provider) :\n+ base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmInstallMissing, provider)\n{\n}\npublic override async Task<IFileContextActionResult> ExecuteAsync(IProgress<IFileContextActionProgressUpdate> progress, CancellationToken cancellationToken)\n{\n- var projectHome = Path.GetDirectoryName(this.PackageJsonPath);\n-\n- var npmController = NpmControllerFactory.Create(\n- projectHome,\n- NodejsConstants.NpmCachePath);\n-\n+ using (var npmController = this.CreateController())\nusing (var commander = npmController.CreateNpmCommander())\n{\nvar result = await commander.Install();\n@@ -66,44 +72,34 @@ namespace Microsoft.NodejsTools.Workspace\nprivate class InstallNewNpmPackagesAction : NpmPackagesAction\n{\n- public InstallNewNpmPackagesAction(string packageJsonPath, FileContext fileContext) :\n- base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmInstallNew)\n+ public InstallNewNpmPackagesAction(string packageJsonPath, FileContext fileContext, FileContextActionProvider provider) :\n+ base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmInstallNew, provider)\n{\n}\n- public override Task<IFileContextActionResult> ExecuteAsync(IProgress<IFileContextActionProgressUpdate> progress, CancellationToken cancellationToken)\n+ public override async Task<IFileContextActionResult> ExecuteAsync(IProgress<IFileContextActionProgressUpdate> progress, CancellationToken cancellationToken)\n{\n- var projectHome = Path.GetDirectoryName(this.PackageJsonPath);\n-\n- var npmController = NpmControllerFactory.Create(\n- projectHome,\n- NodejsConstants.NpmCachePath);\n-\n+ using (var npmController = this.CreateController())\nusing (var npmWorker = new NpmWorker(npmController))\nusing (var manager = new NpmPackageInstallWindow(npmController, npmWorker))\n{\nmanager.ShowModal();\n}\n- return Task.FromResult<IFileContextActionResult>(new FileContextActionResult(true));\n+ return new FileContextActionResult(true);\n}\n}\nprivate class UpdateNpmPackagesAction : NpmPackagesAction\n{\n- public UpdateNpmPackagesAction(string packageJsonPath, FileContext fileContext) :\n- base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmUpdate)\n+ public UpdateNpmPackagesAction(string packageJsonPath, FileContext fileContext, FileContextActionProvider provider) :\n+ base(packageJsonPath, fileContext, PkgCmdId.cmdidWorkSpaceNpmUpdate, provider)\n{\n}\npublic override async Task<IFileContextActionResult> ExecuteAsync(IProgress<IFileContextActionProgressUpdate> progress, CancellationToken cancellationToken)\n{\n- var projectHome = Path.GetDirectoryName(this.PackageJsonPath);\n-\n- var npmController = NpmControllerFactory.Create(\n- projectHome,\n- NodejsConstants.NpmCachePath);\n-\n+ using (var npmController = this.CreateController())\nusing (var commander = npmController.CreateNpmCommander())\n{\nvar result = await commander.UpdatePackagesAsync();\n@@ -111,23 +107,56 @@ namespace Microsoft.NodejsTools.Workspace\n}\n}\n}\n- }\n- public abstract class NpmPackagesAction : IFileContextAction, IVsCommandItem\n+ private abstract class NpmPackagesAction : IFileContextAction, IVsCommandItem\n{\n- public NpmPackagesAction(string packageJsonPath, FileContext source, uint commandId)\n+ public NpmPackagesAction(string packageJsonPath, FileContext source, uint commandId, FileContextActionProvider provider)\n{\nthis.Source = source;\nthis.CommandId = commandId;\nthis.PackageJsonPath = packageJsonPath;\n+ this.WriteLine = provider.outputPane.WriteLine;\n+ this.JTF = provider.workspaceContext.JTF;\n}\n+ public INpmController CreateController()\n+ {\n+ var projectHome = Path.GetDirectoryName(this.PackageJsonPath);\n+\n+ var npmController = NpmControllerFactory.Create(\n+ projectHome,\n+ NodejsConstants.NpmCachePath);\n+\n+ npmController.ErrorLogged += this.WriteNpmOutput;\n+ npmController.ExceptionLogged += this.WriteNpmException;\n+ npmController.OutputLogged += this.WriteNpmOutput;\n+\n+ return npmController;\n+ }\n+\n+ private void WriteNpmException(object sender, NpmExceptionEventArgs e)\n+ {\n+ this.WriteLine(ErrorHelper.GetExceptionDetailsText(e.Exception));\n+ }\n+\n+ private void WriteNpmOutput(object sender, NpmLogEventArgs e)\n+ {\n+ if (!string.IsNullOrWhiteSpace(e.LogText))\n+ {\n+ this.WriteLine(e.LogText.TrimEnd('\\r', '\\n'));\n+ }\n+ }\n+\n+ protected readonly Action<string> WriteLine;\n+\n+ protected readonly JoinableTaskFactory JTF;\n+\npublic FileContext Source { get; }\npublic string PackageJsonPath { get; }\n// Unused, since we also implement IVsCommandItem the Display Name used comes from the vsct file\n- public string DisplayName => \"\";\n+ public string DisplayName => null;\npublic Guid CommandGroup { get; } = Guids.NodeToolsWorkspaceCmdSet;\n@@ -136,3 +165,4 @@ namespace Microsoft.NodejsTools.Workspace\npublic abstract Task<IFileContextActionResult> ExecuteAsync(IProgress<IFileContextActionProgressUpdate> progress, CancellationToken cancellationToken);\n}\n}\n+}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Integrate Output window support
410,217
30.11.2017 15:05:44
28,800
cfcd34e0559323fedc13b64b2857f27f161e1076
Make the package comparer handle null correctly And don't create a new instance each time, since there is no state.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/AbstractNpmNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/AbstractNpmNode.cs", "diff": "@@ -14,12 +14,12 @@ namespace Microsoft.NodejsTools.Project\n{\ninternal abstract class AbstractNpmNode : HierarchyNode\n{\n- protected readonly NodejsProjectNode _projectNode;\n+ protected readonly NodejsProjectNode projectNode;\nprotected AbstractNpmNode(NodejsProjectNode root)\n: base(root)\n{\n- this._projectNode = root;\n+ this.projectNode = root;\nthis.ExcludeNodeFromScc = true;\n}\n@@ -32,25 +32,17 @@ namespace Microsoft.NodejsTools.Project\n/// <summary>\n/// Disable inline editing of Caption.\n/// </summary>\n- public sealed override string GetEditLabel()\n- {\n- return null;\n- }\n+ public sealed override string GetEditLabel() => null;\nprotected override bool SupportsIconMonikers => true;\n/// <summary>\n/// Returns the icon to use.\n/// </summary>\n- protected override ImageMoniker GetIconMoniker(bool open)\n- {\n- return KnownMonikers.Reference;\n- }\n+ protected override ImageMoniker GetIconMoniker(bool open) => KnownMonikers.Reference;\n+\n+ protected override NodeProperties CreatePropertiesObject() => new NpmNodeProperties(this);\n- protected override NodeProperties CreatePropertiesObject()\n- {\n- return new NpmNodeProperties(this);\n- }\n#endregion\npublic abstract void ManageNpmModules();\n@@ -95,7 +87,7 @@ namespace Microsoft.NodejsTools.Project\n}\nelse\n{\n- child = new DependencyNode(this._projectNode, parent as DependencyNode, package);\n+ child = new DependencyNode(this.projectNode, parent as DependencyNode, package);\nparent.AddChild(child);\nnewModules.Add(package);\n}\n@@ -131,7 +123,7 @@ namespace Microsoft.NodejsTools.Project\ncontinue;\n}\n- if (modules != null && modules.Contains(dep.Package, new PackageEqualityComparer()))\n+ if (modules != null && modules.Contains(dep.Package, PackageEqualityComparer.Instance))\n{\nrecycle[dep.Package.Name] = dep;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodeModulesNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodeModulesNode.cs", "diff": "@@ -56,7 +56,7 @@ namespace Microsoft.NodejsTools.Project\npublic NodeModulesNode(NodejsProjectNode root)\n: base(root)\n{\n- this.NpmController = DefaultNpmController(this._projectNode.ProjectHome, new NpmPathProvider(this));\n+ this.NpmController = DefaultNpmController(this.projectNode.ProjectHome, new NpmPathProvider(this));\nRegisterWithNpmController(this.NpmController);\nthis._devModulesNode = new LocalModulesNode(root, this, \"dev\", \"DevelopmentModules\", DependencyType.Development);\n@@ -177,7 +177,7 @@ namespace Microsoft.NodejsTools.Project\n#region Logging and status bar updates\n- private OutputWindowRedirector NpmOutputPane => this._projectNode.NpmOutputPane;\n+ private OutputWindowRedirector NpmOutputPane => this.projectNode.NpmOutputPane;\nprivate void ForceUpdateStatusBarWithNpmActivity(string activity)\n{\n@@ -191,7 +191,7 @@ namespace Microsoft.NodejsTools.Project\nactivity = string.Format(CultureInfo.CurrentCulture, \"npm: {0}\", activity);\n}\n- var statusBar = (IVsStatusbar)this._projectNode.GetService(typeof(SVsStatusbar));\n+ var statusBar = (IVsStatusbar)this.projectNode.GetService(typeof(SVsStatusbar));\nif (null != statusBar)\n{\nstatusBar.SetText(activity);\n@@ -287,7 +287,7 @@ namespace Microsoft.NodejsTools.Project\nStopNpmIdleTimer();\nthis._npmIdleTimer = new Timer(\n- _ => this.ProjectMgr.Site.GetUIThread().Invoke(() => this._projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()),\n+ _ => this.ProjectMgr.Site.GetUIThread().Invoke(() => this.projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()),\nnull, 1000, Timeout.Infinite);\n}\n@@ -519,7 +519,7 @@ namespace Microsoft.NodejsTools.Project\nvar packageJsonFileName = Path.Combine(rootPath, \"package.json\");\nvar packageJsonLockFileName = Path.Combine(rootPath, \"package-lock.json\");\n- var queryEditService = (IVsQueryEditQuerySave2)this._projectNode.GetService(typeof(SVsQueryEditQuerySave));\n+ var queryEditService = (IVsQueryEditQuerySave2)this.projectNode.GetService(typeof(SVsQueryEditQuerySave));\nvar hr = queryEditService.QueryEditFiles((uint)tagVSQueryEditFlags.QEF_DisallowInMemoryEdits, 1, new[] { packageJsonFileName, packageJsonLockFileName }, null, null, out var result, out var _);\nreturn ErrorHandler.Succeeded(hr) && result == (uint)tagVSQueryEditResult.QER_EditOK;\n}\n@@ -628,7 +628,7 @@ namespace Microsoft.NodejsTools.Project\npublic void UpdateModules()\n{\n- var t = UpdateModules(this._projectNode.GetSelectedNodes());\n+ var t = UpdateModules(this.projectNode.GetSelectedNodes());\n}\npublic async System.Threading.Tasks.Task UpdateModule(DependencyNode node)\n@@ -645,7 +645,7 @@ namespace Microsoft.NodejsTools.Project\npublic System.Threading.Tasks.Task UninstallModules()\n{\n- var selected = this._projectNode.GetSelectedNodes();\n+ var selected = this.projectNode.GetSelectedNodes();\nreturn RunNpmCommand(async commander =>\n{\nforeach (var node in selected.OfType<DependencyNode>().Where(this.CheckValidCommandTarget))\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make the package comparer handle null correctly And don't create a new instance each time, since there is no state.
410,217
30.11.2017 17:06:43
28,800
f547f2fb69a9236ea09b1bd9221d70fde649c813
Ensure the settings are writting to the right file When editing the settings in the project properties in solution explorer, the settings are now writting to the right file.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPage.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPage.cs", "diff": "@@ -59,7 +59,10 @@ namespace Microsoft.NodejsTools.Project\nif (this.Project.SetProjectProperty(NodeProjectProperty.SaveNodeJsSettingsInProjectFile, this.control.StoreNodeSettingsInProject.ToString()))\n{\n- // if this setting changed we should move the properties to the right file\n+ // We move the settings first to the right file, and then write them.\n+ // Ideally we would delete them first, and then write the correct value to the correct file,\n+ // however there is some caching happening in the Project Code, which we can't reliably break.\n+ // Further, writing them is a no-op if the value hasn't changed.\nif (this.control.StoreNodeSettingsInProject)\n{\nthis.Project.MovePropertyToProjectFile(NodeProjectProperty.NodeExePath);\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs", "diff": "@@ -761,7 +761,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Arguments to Node.exe.\n+ /// Looks up a localized string similar to Node.exe options.\n/// </summary>\ninternal static string NodeExeArguments {\nget {\n@@ -887,7 +887,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Node.js Port.\n+ /// Looks up a localized string similar to Application port.\n/// </summary>\ninternal static string NodejsPort {\nget {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Resources.resx", "new_path": "Nodejs/Product/Nodejs/Resources.resx", "diff": "<value>Specifies the URL to open in the browser. If unspecified http://localhost:port is used.\\r\\nIf a port is specified, it needs to be specified here as well.</value>\n</data>\n<data name=\"NodeExeArguments\" xml:space=\"preserve\">\n- <value>Arguments to Node.exe</value>\n+ <value>Node.exe options</value>\n</data>\n<data name=\"NodeExeArgumentsDescription\" xml:space=\"preserve\">\n<value>Specifies the options provided to node.exe, such as -e or -i.</value>\n<value>Specifies the path to the node.exe executable.</value>\n</data>\n<data name=\"NodejsPort\" xml:space=\"preserve\">\n- <value>Node.js Port</value>\n+ <value>Application port</value>\n</data>\n<data name=\"NodejsNotInstalled\" xml:space=\"preserve\">\n<value>Could not find a Node.js runtime on your computer. Please download and install the current Node.js release from https://nodejs.org, or specify the location of your Node.exe in the Visual Studio Node Project's properties page.</value>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Ensure the settings are writting to the right file When editing the settings in the project properties in solution explorer, the settings are now writting to the right file.
410,217
13.12.2017 16:50:44
28,800
5e651ebc78344beefe8f911897a87b27db163bd7
Move command to right location in ctx menu
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NodejsTools.vsct", "new_path": "Nodejs/Product/Nodejs/NodejsTools.vsct", "diff": "</Group>\n<!-- Group for Workspace context menu -->\n- <Group guid=\"guidNodeToolsWseContextMenuCmdSet\" id=\"idgWSE_ContextMenu_NodeToolsActions\" priority=\"0x0350\">\n- <Parent guid=\"guidWorkspaceExplorerToolWindowPackageCmdSet\" id=\"idgWSE_ContextMenu_BuildDebugActions\"/>\n+ <Group guid=\"guidNodeToolsWseContextMenuCmdSet\" id=\"idmNpm\" priority=\"0x0350\">\n+ <Parent guid=\"guidWorkspaceExplorerToolWindowPackageCmdSet\" id=\"idmWSE_ContextMenu\"/>\n</Group>\n<Group guid=\"guidNodeToolsWseContextMenuCmdSet\" id=\"idgNpm_PackageCommands\" priority=\"0x100\">\n<!-- workspace -->\n<CommandPlacement guid=\"guidNodeToolsWseContextMenuCmdSet\" id=\"idmNpm\" priority=\"0x340\">\n- <Parent guid=\"guidWorkspaceExplorerToolWindowPackageCmdSet\" id=\"idgWSE_ContextMenu_ShellActions\"/>\n+ <Parent guid=\"guidWorkspaceExplorerToolWindowPackageCmdSet\" id=\"idgWSE_ContextMenu_BuildDebugActions\"/>\n</CommandPlacement>\n<CommandPlacement guid=\"guidNodeToolsWseContextMenuCmdSet\" id=\"cmdidWorkSpaceNpmInstallMissing\" priority=\"0x100\">\n<IDSymbol name=\"idgWSE_ContextMenu_ShellActions\" value=\"0x015\"/>\n<IDSymbol name=\"idgWSE_ContextMenu_ScopeActions\" value=\"0x016\"/>\n<IDSymbol name=\"idgWSE_ContextMenu_FileContextActions\" value=\"0x017\" />\n-\n</GuidSymbol>\n</Symbols>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Move command to right location in ctx menu
410,217
15.12.2017 15:30:49
28,800
22fa2d58ffebc7fc65fc4315004633c59b6d287f
Put the progressbar back in the Npm UI
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs", "diff": "@@ -15,7 +15,7 @@ using Microsoft.VisualStudio.Shell;\nnamespace Microsoft.NodejsTools.NpmUI\n{\n- internal class NpmPackageInstallViewModel : INotifyPropertyChanged\n+ internal class NpmPackageInstallViewModel : INotifyPropertyChanged, IDisposable\n{\ninternal enum Indices\n{\n@@ -45,6 +45,7 @@ namespace Microsoft.NodejsTools.NpmUI\nprivate string filterText = string.Empty;\nprivate string arguments = string.Empty;\nprivate bool saveToPackageJson = true;\n+ private bool isExecutingCommand = false;\nprivate object selectedVersion;\nprivate readonly object filteredPackagesLock = new object();\n@@ -53,6 +54,8 @@ namespace Microsoft.NodejsTools.NpmUI\nprivate readonly Dispatcher dispatcher;\nprivate readonly NpmWorker npmWorker;\n+ private bool disposed = false;\n+\npublic NpmPackageInstallViewModel(\nNpmWorker npmWorker,\nDispatcher dispatcher\n@@ -61,21 +64,33 @@ namespace Microsoft.NodejsTools.NpmUI\nthis.dispatcher = dispatcher;\nthis.npmWorker = npmWorker;\n+ this.npmWorker.CommandStarted += this.NpmWorker_CommandStarted;\n+ this.npmWorker.CommandCompleted += this.NpmWorker_CommandCompleted;\nthis.filterTimer = new Timer(this.FilterTimer_Elapsed, null, Timeout.Infinite, Timeout.Infinite);\n}\n+ private void NpmWorker_CommandStarted(object sender, EventArgs e)\n+ {\n+ this.IsExecutingCommand = true;\n+ }\n+\n+ private void NpmWorker_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)\n+ {\n+ this.IsExecutingCommand = false;\n+ }\n+\npublic INpmController NpmController\n{\nget { return this.npmController; }\nset\n{\n- if (null != this.npmController)\n+ if (this.npmController != null)\n{\nthis.npmController.FinishedRefresh -= this.NpmController_FinishedRefresh;\n}\nthis.npmController = value;\nOnPropertyChanged();\n- if (null != this.npmController)\n+ if (this.npmController != null)\n{\nLoadCatalog();\nthis.npmController.FinishedRefresh += this.NpmController_FinishedRefresh;\n@@ -218,16 +233,11 @@ namespace Microsoft.NodejsTools.NpmUI\nif (filtered.Any())\n{\n- IRootPackage rootPackage = null;\n- var controller = this.npmController;\n- if (controller != null)\n- {\n- rootPackage = controller.RootPackage;\n- }\n+ var rootPackage = this.npmController?.RootPackage;\nnewItems.AddRange(filtered.Select(package => new ReadOnlyPackageCatalogEntryViewModel(\npackage,\n- rootPackage != null ? rootPackage.Modules[package.Name] : null)));\n+ rootPackage?.Modules[package.Name])));\n}\nawait this.dispatcher.BeginInvoke((Action)(() =>\n@@ -357,17 +367,64 @@ namespace Microsoft.NodejsTools.NpmUI\n}\n}\n+ public bool IsExecutingCommand\n+ {\n+ get\n+ {\n+ return this.isExecutingCommand;\n+ }\n+ set\n+ {\n+ this.isExecutingCommand = value;\n+\n+ OnPropertyChanged();\n+ OnPropertyChanged(\"ExecutionProgressVisibility\");\n+ }\n+ }\n+\n+ public Visibility ExecutionProgressVisibility\n+ {\n+ get { return IsExecutingCommand ? Visibility.Visible : Visibility.Collapsed; }\n+ }\n+\n#endregion\npublic event PropertyChangedEventHandler PropertyChanged;\nprotected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)\n{\n- var handler = this.PropertyChanged;\n- if (handler != null)\n+ this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n+ }\n+\n+ protected virtual void Dispose(bool disposing)\n+ {\n+ if (!disposed)\n+ {\n+ if (disposing)\n+ {\n+ this.filterTimer?.Dispose();\n+ }\n+\n+ var controller = this.npmController;\n+ if (controller != null)\n+ {\n+ this.npmController.FinishedRefresh -= this.NpmController_FinishedRefresh;\n+ }\n+ var worker = this.npmWorker;\n+ if (worker != null)\n{\n- handler(this, new PropertyChangedEventArgs(propertyName));\n+ this.npmWorker.CommandStarted -= this.NpmWorker_CommandStarted;\n+ this.npmWorker.CommandCompleted -= this.NpmWorker_CommandCompleted;\n+ }\n+ disposed = true;\n+ }\n}\n+\n+ // This code added to correctly implement the disposable pattern.\n+ public void Dispose()\n+ {\n+ // Do not change this code. Put cleanup code in Dispose(bool disposing) above.\n+ Dispose(true);\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml.cs", "diff": "@@ -26,7 +26,7 @@ namespace Microsoft.NodejsTools.NpmUI\npublic void Dispose()\n{\n- this.viewModel.NpmController = null;\n+ this.viewModel.Dispose();\n// The catalog refresh operation spawns many long-lived Gen 2 objects,\n// so the garbage collector will take a while to get to them otherwise.\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "diff": "@@ -28,6 +28,9 @@ namespace Microsoft.NodejsTools.NpmUI\nprivate QueuedNpmCommandInfo currentCommand;\n+ public event EventHandler CommandStarted;\n+ public event EventHandler<NpmCommandCompletedEventArgs> CommandCompleted;\n+\npublic NpmWorker(INpmController controller)\n{\nthis.npmController = controller;\n@@ -67,6 +70,8 @@ namespace Microsoft.NodejsTools.NpmUI\nDebug.Assert(Thread.CurrentThread == this.worker, \"The worked thread should be executing the NPM commands.\");\nvar cmdr = this.npmController.CreateNpmCommander();\n+ cmdr.CommandStarted += Cmdr_CommandStarted;\n+ cmdr.CommandCompleted += Cmdr_CommandCompleted;\ntry\n{\ncmdr.ExecuteNpmCommandAsync(info.Arguments).Wait();\n@@ -77,6 +82,21 @@ namespace Microsoft.NodejsTools.NpmUI\n// and should not tear down this thread.\n// Other exceptions are handled higher up the stack.\n}\n+ finally\n+ {\n+ cmdr.CommandStarted -= Cmdr_CommandStarted;\n+ cmdr.CommandCompleted -= Cmdr_CommandCompleted;\n+ }\n+\n+ void Cmdr_CommandStarted(object sender, EventArgs e)\n+ {\n+ this.CommandStarted?.Invoke(this, e);\n+ }\n+\n+ void Cmdr_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)\n+ {\n+ this.CommandCompleted?.Invoke(this, e);\n+ }\n}\nprivate void Run()\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Put the progressbar back in the Npm UI
410,217
29.11.2017 13:13:32
28,800
c571b29f7b4e37a057859d6e38b2933165bc1676
Clean up NPM UI
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ExceptionExtensions.cs\">\n<Link>SharedProject\\ExceptionExtensions.cs</Link>\n</Compile>\n- <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ILambdaConverterProvider.cs\">\n- <Link>SharedProject\\Wpf\\LambdaConverter\\ILambdaConverterProvider.cs</Link>\n- </Compile>\n- <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\LambdaConverter.cs\">\n- <Link>SharedProject\\Wpf\\LambdaConverter\\LambdaConverter.cs</Link>\n- </Compile>\n<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ProcessOutput.cs\">\n<Link>SharedProject\\ProcessOutput.cs</Link>\n</Compile>\n<Generator>MSBuild:Compile</Generator>\n<SubType>Designer</SubType>\n</Page>\n- <Compile Include=\"SharedProject\\Wpf\\LambdaConverter\\LambdaExtension.cs\" />\n- <Compile Include=\"SharedProject\\Wpf\\LambdaConverter\\LambdaProperties.cs\" />\n</ItemGroup>\n<ItemGroup>\n<EmbeddedResource Include=\"SharedProject\\WebPiComponentPickerControl.resx\">\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Nodejs/SharedProject/Wpf/LambdaConverter/LambdaExtension.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.Windows.Markup;\n-using System.Xaml;\n-\n-namespace Microsoft.VisualStudioTools.Wpf\n-{\n- [ContentProperty(\"Lambda\")]\n- public class LambdaExtension : MarkupExtension\n- {\n- public string Lambda { get; set; }\n-\n- public LambdaExtension()\n- {\n- }\n-\n- public LambdaExtension(string lambda)\n- {\n- this.Lambda = lambda;\n- }\n-\n- public override object ProvideValue(IServiceProvider serviceProvider)\n- {\n- if (this.Lambda == null)\n- {\n- throw new InvalidOperationException(\"Lambda not specified\");\n- }\n-\n- var rootProvider = (IRootObjectProvider)serviceProvider.GetService(typeof(IRootObjectProvider));\n- var root = rootProvider.RootObject;\n- if (root == null)\n- {\n- throw new InvalidOperationException(\"Cannot locate root object - service provider did not provide IRootObjectProvider\");\n- }\n-\n- var provider = root as ILambdaConverterProvider;\n- if (provider == null)\n- {\n- throw new InvalidOperationException(\"Root object does not implement ILambdaConverterProvider - code generator not run\");\n- }\n-\n- return provider.GetConverterForLambda(this.Lambda);\n- }\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "Nodejs/Product/Nodejs/SharedProject/Wpf/LambdaConverter/LambdaProperties.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System.Windows;\n-\n-namespace Microsoft.VisualStudioTools.Wpf\n-{\n- public static class LambdaProperties\n- {\n- public static readonly DependencyProperty ImportedNamespacesProperty = DependencyProperty.RegisterAttached(\n- \"ImportedNamespaces\", typeof(string), typeof(LambdaProperties));\n-\n- public static string GetImportedNamespaces(object obj) => null;\n-\n- public static void SetImportedNamespaces(object obj, string value)\n- {\n- }\n- }\n-}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Clean up NPM UI
410,217
19.12.2017 15:01:27
28,800
3d5f0259d28310e04258240625dd7bed7d95b74f
Delete LambdaConverter for WPF Only used in a single location, and caused file locks during build
[ { "change_type": "DELETE", "old_path": "Common/Product/SharedProject/ILambdaConverterProvider.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-namespace Microsoft.VisualStudioTools.Wpf\n-{\n- public interface ILambdaConverterProvider\n- {\n- LambdaConverter GetConverterForLambda(string lambda);\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "Common/Product/SharedProject/LambdaConverter.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.Diagnostics;\n-using System.Globalization;\n-using System.Windows;\n-using System.Windows.Data;\n-\n-namespace Microsoft.VisualStudioTools.Wpf\n-{\n- public class LambdaConverter : IValueConverter, IMultiValueConverter\n- {\n- private readonly Func<object, object> lambda;\n- private readonly Func<object[], object> multiLambda;\n-\n- private LambdaConverter(Func<object, object> lambda)\n- {\n- this.lambda = lambda;\n- this.multiLambda = (args) =>\n- {\n- Debug.Assert(args.Length == 1);\n- return lambda(args[0]);\n- };\n- }\n-\n- private LambdaConverter(Func<object[], object> multiLambda)\n- {\n- this.multiLambda = multiLambda;\n- this.lambda = (arg) => multiLambda(new[] { arg });\n- }\n-\n- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\n- {\n- return this.lambda(value);\n- }\n-\n- public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)\n- {\n- return this.multiLambda(values);\n- }\n-\n- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\n- {\n- throw new NotImplementedException();\n- }\n-\n- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)\n- {\n- throw new NotImplementedException();\n- }\n-\n- public static LambdaConverter Create(Func<dynamic, object> lambda)\n- {\n- return Create<dynamic>(lambda);\n- }\n-\n- public static LambdaConverter Create<T1>(Func<T1, object> lambda)\n- {\n- return new LambdaConverter(arg =>\n- {\n- if (arg == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n-\n- return lambda((T1)arg);\n- });\n- }\n-\n- public static LambdaConverter Create(Func<dynamic, dynamic, object> lambda)\n- {\n- return Create<dynamic, dynamic>(lambda);\n- }\n-\n- public static LambdaConverter Create<T1, T2>(Func<T1, T2, object> lambda)\n- {\n- return new LambdaConverter(\n- (args) =>\n- {\n- Debug.Assert(args.Length == 2);\n-\n- if (args[0] == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n- if (args[1] == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n-\n- return lambda((T1)args[0], (T2)args[1]);\n- });\n- }\n-\n- public static LambdaConverter Create(Func<dynamic, dynamic, dynamic, object> lambda)\n- {\n- return Create<dynamic, dynamic, dynamic>(lambda);\n- }\n-\n- public static LambdaConverter Create<T1, T2, T3>(Func<T1, T2, T3, object> lambda)\n- {\n- return new LambdaConverter(\n- (args) =>\n- {\n- Debug.Assert(args.Length == 3);\n-\n- if (args[0] == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n- if (args[1] == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n- if (args[2] == DependencyProperty.UnsetValue)\n- {\n- return DependencyProperty.UnsetValue;\n- }\n-\n- return lambda((T1)args[0], (T2)args[1], (T3)args[2]);\n- });\n- }\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "Common/Tools/BuildTasks/ExtractLambdasFromXaml.cs", "new_path": null, "diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.CodeDom;\n-using System.CodeDom.Compiler;\n-using System.Collections.Generic;\n-using System.ComponentModel;\n-using System.Configuration;\n-using System.IO;\n-using System.Reflection;\n-using System.Xaml;\n-using System.Xml;\n-using Microsoft.Build.Framework;\n-using Microsoft.Build.Utilities;\n-using Microsoft.VisualStudioTools.Wpf;\n-\n-namespace Microsoft.VisualStudioTools.BuildTasks\n-{\n- public class ExtractLambdasFromXaml : Task\n- {\n- private struct LambdaInfo\n- {\n- public string Code;\n- public int LineNumber;\n- }\n-\n- private static readonly string ToolName = typeof(ExtractLambdasFromXaml).Assembly.ManifestModule.Name;\n-\n- [Required]\n- public ITaskItem InputFileName { get; set; }\n-\n- [Required]\n- [Output]\n- public ITaskItem OutputFileName { get; set; }\n-\n- public string Language { get; set; }\n-\n- private CodeDomProvider codeDomProvider;\n-\n- private TypeConverter typeAttributesConverter;\n-\n- private string className;\n-\n- private int classNameLineNumber;\n-\n- private string classModifier;\n-\n- private int classModifierLineNumber;\n-\n- private readonly List<LambdaInfo> lambdas = new List<LambdaInfo>();\n-\n- private int importedNamespacesLineNumber = 0;\n-\n- private readonly List<string> importedNamespaces = new List<string>\n- {\n- \"System\",\n- \"System.Collections\",\n- \"System.Collections.Generic\",\n- \"System.Linq\",\n- \"System.Text\",\n- \"System.Windows\",\n- \"System.Windows.Controls\",\n- \"System.Windows.Input\",\n- \"System.Windows.Media\",\n- \"System.Windows.Navigation\"\n- };\n-\n- public ExtractLambdasFromXaml()\n- {\n- this.Language = \"CSharp\";\n- }\n-\n- public override bool Execute()\n- {\n- try\n- {\n- try\n- {\n- this.codeDomProvider = CodeDomProvider.CreateProvider(this.Language);\n- }\n- catch (ConfigurationErrorsException)\n- {\n- LogError(this.classNameLineNumber, 1, \"CodeDom provider for language '\" + this.Language + \"' not found.\");\n- return false;\n- }\n-\n- this.typeAttributesConverter = this.codeDomProvider.GetConverter(typeof(TypeAttributes));\n-\n- if (!ParseInput())\n- {\n- return false;\n- }\n-\n- if (this.lambdas.Count == 0)\n- {\n- this.OutputFileName = null;\n- return true;\n- }\n-\n- if (this.className == null)\n- {\n- LogError(this.classNameLineNumber, 1501, \"x:Class not found on root element.\");\n- return false;\n- }\n- if (!this.className.Contains(\".\"))\n- {\n- LogError(this.classNameLineNumber, 1502, \"x:Class does not include namespace name.\");\n- return false;\n- }\n-\n- return GenerateOutput();\n- }\n- catch (Exception ex)\n- {\n- LogError(null, 0, 0, ex.Message);\n- return false;\n- }\n- }\n-\n- private void LogError(string source, int line, int code, string text)\n- {\n- string xalCode = string.Format(\"XAL{0:D4}\", code);\n-\n- if (source == null)\n- {\n- source = ToolName;\n- }\n-\n- if (this.BuildEngine != null)\n- {\n- this.Log.LogError(null, xalCode, null, source, line, 0, 0, 0, text);\n- }\n- else\n- {\n- string pos = (line != 0) ? (\"(\" + line + \")\") : \" \";\n- Console.Error.WriteLine(\"{0}{1}: error {2}: {3}\", source, pos, xalCode, text);\n- }\n- }\n-\n- private void LogError(int code, string text)\n- {\n- LogError(this.InputFileName.ItemSpec, 0, code, text);\n- }\n-\n- private void LogError(int line, int code, string text)\n- {\n- LogError(this.InputFileName.ItemSpec, line, code, text);\n- }\n-\n- private bool ParseInput()\n- {\n- XamlXmlReader reader = null;\n- try\n- {\n- try\n- {\n- reader = new XamlXmlReader(this.InputFileName.ItemSpec, new XamlXmlReaderSettings { ProvideLineInfo = true });\n- }\n- catch (FileNotFoundException ex)\n- {\n- LogError(1001, ex.Message);\n- return false;\n- }\n-\n- bool classNameExpected = false, classModifierExpected = false;\n- bool lambdaBodyExpected = false, importedNamespacesExpected = false;\n- int nestingLevel = 0, lambdaNestingLevel = -1;\n- while (reader.Read())\n- {\n- switch (reader.NodeType)\n- {\n- case XamlNodeType.GetObject:\n- ++nestingLevel;\n- break;\n-\n- case XamlNodeType.StartObject:\n- ++nestingLevel;\n- if (nestingLevel == 1)\n- {\n- this.classNameLineNumber = reader.LineNumber;\n- }\n- if ((reader.Type.Name == \"Lambda\" || reader.Type.Name == \"LambdaExtension\") && IsLambdaNamespace(reader.Type.PreferredXamlNamespace))\n- {\n- lambdaNestingLevel = nestingLevel;\n- }\n- break;\n-\n- case XamlNodeType.EndObject:\n- --nestingLevel;\n- if (nestingLevel < lambdaNestingLevel)\n- {\n- lambdaNestingLevel = -1;\n- }\n- break;\n-\n- case XamlNodeType.StartMember:\n- if (nestingLevel == 1)\n- {\n- if (reader.Member.PreferredXamlNamespace == XamlLanguage.Xaml2006Namespace)\n- {\n- switch (reader.Member.Name)\n- {\n- case \"Class\":\n- {\n- classNameExpected = true;\n- }\n- break;\n-\n- case \"ClassModifier\":\n- {\n- classModifierExpected = true;\n- }\n- break;\n- }\n- }\n- else if (reader.Member.DeclaringType != null && IsLambdaNamespace(reader.Member.DeclaringType.PreferredXamlNamespace))\n- {\n- if (reader.Member.Name == \"ImportedNamespaces\" && reader.Member.DeclaringType.Name == \"LambdaProperties\")\n- {\n- importedNamespacesExpected = true;\n- }\n- }\n- }\n- else if (nestingLevel == lambdaNestingLevel)\n- {\n- if (reader.Member == XamlLanguage.UnknownContent || reader.Member == XamlLanguage.PositionalParameters || reader.Member.Name == \"Lambda\")\n- {\n- lambdaBodyExpected = true;\n- }\n- }\n- break;\n-\n- case XamlNodeType.EndMember:\n- classNameExpected = lambdaBodyExpected = importedNamespacesExpected = false;\n- break;\n-\n- case XamlNodeType.Value:\n- if (classNameExpected)\n- {\n- classNameExpected = false;\n- this.className = (string)reader.Value;\n- this.classNameLineNumber = reader.LineNumber;\n- }\n- else if (classModifierExpected)\n- {\n- classModifierExpected = false;\n- this.classModifier = (string)reader.Value;\n- this.classModifierLineNumber = reader.LineNumber;\n- }\n- else if (importedNamespacesExpected)\n- {\n- this.importedNamespaces.Clear();\n- this.importedNamespaces.AddRange(((string)reader.Value).Split(\" \\f\\n\\r\\t\".ToCharArray(), StringSplitOptions.RemoveEmptyEntries));\n- this.importedNamespacesLineNumber = reader.LineNumber;\n- }\n- else if (lambdaBodyExpected)\n- {\n- this.lambdas.Add(new LambdaInfo { Code = (string)reader.Value, LineNumber = reader.LineNumber });\n- }\n- break;\n- }\n- }\n- }\n- catch (IOException ex)\n- {\n- LogError(1002, ex.Message);\n- return false;\n- }\n- catch (XmlException ex)\n- {\n- LogError(1003, ex.Message);\n- return false;\n- }\n- catch (XamlException ex)\n- {\n- LogError(1004, ex.Message);\n- return false;\n- }\n- finally\n- {\n- if (reader != null)\n- {\n- reader.Close();\n- }\n- }\n-\n- return true;\n- }\n-\n- private bool GenerateOutput()\n- {\n- string shortClassName, classNamespace;\n- int dot = this.className.LastIndexOf('.');\n- if (dot >= 0)\n- {\n- classNamespace = this.className.Substring(0, dot);\n- shortClassName = this.className.Substring(dot + 1);\n- }\n- else\n- {\n- classNamespace = null;\n- shortClassName = this.className;\n- }\n-\n- bool isPrivate = false;\n- if (this.classModifier != null)\n- {\n- string publicModifier = null, privateModifier = null;\n- if (this.typeAttributesConverter != null || this.typeAttributesConverter.CanConvertTo(typeof(string)))\n- {\n- try\n- {\n- publicModifier = this.typeAttributesConverter.ConvertTo(TypeAttributes.Public, typeof(string)) as string;\n- privateModifier = this.typeAttributesConverter.ConvertTo(TypeAttributes.NotPublic, typeof(string)) as string;\n- }\n- catch (NotSupportedException)\n- {\n- }\n- }\n-\n- if (string.Equals(this.classModifier, privateModifier, StringComparison.OrdinalIgnoreCase))\n- {\n- isPrivate = true;\n- }\n- else if (!string.Equals(this.classModifier, publicModifier, StringComparison.OrdinalIgnoreCase))\n- {\n- LogError(this.classModifierLineNumber, 1503, \"Language '\" + this.Language + \"' does not support x:ClassModifier '\" + this.classModifier + \"'.\");\n- return false;\n- }\n- }\n-\n- var unit = new CodeCompileUnit();\n-\n- var ns = new CodeNamespace(classNamespace);\n- unit.Namespaces.Add(ns);\n- foreach (string importName in this.importedNamespaces)\n- {\n- var import = new CodeNamespaceImport(importName);\n- if (this.importedNamespacesLineNumber != 0)\n- {\n- import.LinePragma = new CodeLinePragma(this.InputFileName.ItemSpec, this.importedNamespacesLineNumber);\n- }\n- ns.Imports.Add(import);\n- }\n- var type = new CodeTypeDeclaration\n- {\n- Name = shortClassName,\n- IsPartial = true,\n- BaseTypes = { typeof(ILambdaConverterProvider) }\n- };\n- ns.Types.Add(type);\n- if (isPrivate)\n- {\n- type.TypeAttributes &= ~TypeAttributes.Public;\n- }\n-\n- var method = new CodeMemberMethod\n- {\n- Name = \"GetConverterForLambda\",\n- PrivateImplementationType = new CodeTypeReference(typeof(ILambdaConverterProvider)),\n- ReturnType = new CodeTypeReference(typeof(LambdaConverter)),\n- Parameters =\n- {\n- new CodeParameterDeclarationExpression\n- {\n- Name = \"lambda__\",\n- Type = new CodeTypeReference(typeof(string))\n- }\n- },\n- CustomAttributes =\n- {\n- new CodeAttributeDeclaration(new CodeTypeReference(typeof(GeneratedCodeAttribute)))\n- {\n- Arguments =\n- {\n- new CodeAttributeArgument(new CodePrimitiveExpression(ToolName)),\n- new CodeAttributeArgument(new CodePrimitiveExpression(typeof(ExtractLambdasFromXaml).Assembly.GetName().Version.ToString()))\n- }\n- }\n- }\n- };\n- type.Members.Add(method);\n-\n- foreach (var lambda in this.lambdas)\n- {\n- var cond = new CodeConditionStatement\n- {\n- Condition = new CodeBinaryOperatorExpression\n- {\n- Operator = CodeBinaryOperatorType.ValueEquality,\n- Left = new CodeArgumentReferenceExpression(\"lambda__\"),\n- Right = new CodePrimitiveExpression(lambda.Code)\n- },\n- TrueStatements =\n- {\n- new CodeMethodReturnStatement\n- {\n- Expression = new CodeMethodInvokeExpression\n- {\n- Method = new CodeMethodReferenceExpression\n- {\n- TargetObject = new CodeTypeReferenceExpression(typeof(LambdaConverter)),\n- MethodName = \"Create\"\n- },\n- Parameters =\n- {\n- new CodeSnippetExpression(lambda.Code)\n- }\n- },\n- LinePragma = new CodeLinePragma\n- {\n- FileName = InputFileName.ItemSpec,\n- LineNumber = lambda.LineNumber\n- }\n- }\n- }\n- };\n-\n- method.Statements.Add(cond);\n- }\n-\n- method.Statements.Add(\n- new CodeThrowExceptionStatement\n- {\n- ToThrow = new CodeObjectCreateExpression\n- {\n- CreateType = new CodeTypeReference(typeof(ArgumentOutOfRangeException)),\n- Parameters =\n- {\n- new CodePrimitiveExpression(\"lambda__\")\n- }\n- }\n- });\n-\n- try\n- {\n- using (var writer = File.CreateText(this.OutputFileName.ItemSpec))\n- {\n- var options = new CodeGeneratorOptions();\n- this.codeDomProvider.GenerateCodeFromCompileUnit(unit, writer, options);\n- }\n- }\n- catch (IOException ex)\n- {\n- LogError(2002, ex.Message);\n- return false;\n- }\n-\n- return true;\n- }\n-\n- private static readonly string LambdaConverterClrNamespace = \"clr-namespace:\" + typeof(LambdaConverter).Namespace;\n- private static readonly string LambdaConverterClrNamespaceWithAssembly = LambdaConverterClrNamespace + \";assembly=\";\n-\n- private static bool IsLambdaNamespace(string ns)\n- {\n- return ns != null && (ns == LambdaConverterClrNamespace || ns.StartsWith(LambdaConverterClrNamespaceWithAssembly));\n- }\n-\n-#if CONSOLE_APP\n- internal static int Main(string[] args) {\n- var task = new ExtractLambdasFromXaml();\n-\n- bool argsError = false;\n- foreach (string arg in args) {\n- if (arg.StartsWith(\"/\") || arg.StartsWith(\"-\")) {\n- string[] opt = arg.Substring(1).Split(new[] { ':' }, 2);\n- string optName = opt[0].ToLowerInvariant();\n- string optArg = opt.Length == 2 ? opt[1] : null;\n- switch (optName) {\n- case \"language\": {\n- if (optArg != null) {\n- task.Language = optArg;\n- } else {\n- argsError = true;\n- }\n- } break;\n- default: {\n- argsError = true;\n- } break;\n- }\n- } else if (task.InputFileName == null) {\n- task.InputFileName = new TaskItem(arg);\n- } else if (task.OutputFileName == null) {\n- task.OutputFileName = new TaskItem(arg);\n- } else {\n- argsError = true;\n- }\n- }\n-\n- if (argsError || task.InputFileName == null || task.OutputFileName == null) {\n- Console.Error.WriteLine(\"Usage: {0} <input-file> <output-file> [/language:<language>]\", ToolName);\n- return 1;\n- }\n-\n- return task.Execute() ? 0 : 1;\n- }\n-#endif\n- }\n-}\n-\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"Debugger\\ScriptTree.cs\" />\n<Compile Include=\"Logging\\LiveLogger.cs\" />\n<Compile Include=\"NodejsPackage.Debugger.cs\" />\n+ <Compile Include=\"NpmUI\\FilterStateVisibilityConverter.cs\" />\n<Compile Include=\"NpmUI\\LastRefreshedMessageProvider.cs\" />\n<Compile Include=\"NpmUI\\NpmInstallWindowResources.Designer.cs\">\n<AutoGen>True</AutoGen>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "diff": "<!-- Theming -->\n<Window.Resources>\n<ResourceDictionary>\n+ <npmUi:FilterStateVisibilityConverter x:Key=\"filterStateConverter\" />\n+\n<Geometry x:Key=\"SearchGeometry\">F1 M 8.5,7.0 C 7.12,7.00 6.0,5.88 6.0,4.5 C 6.0,3.12 7.12,2.0 8.5,2.0 C 9.88,2.0 11.0,3.12 11.0,4.5 C 11.0,5.88 9.88,7.0 8.5,7.0 Z M 8.5,0.0 C 6.02,0.0 4.0,2.02 4.0,4.500 C 4.0,5.23 4.19,5.9 4.49,6.5 L 0.0,11.0 L 2.0,13.0 L 6.49,8.51 C 7.1,8.81 7.77,9.0 8.5,9.0 C 11.0,9.0 13.0,7.0 13.0,4.5 C 13.0,2.02 11.0,0.0 8.5,0.0 Z</Geometry>\n<Style x:Key=\"SearchStyle\" TargetType=\"ContentControl\">\n<Setter Property=\"ContentTemplate\">\nScrollViewer.HorizontalScrollBarVisibility=\"Disabled\"\nMinHeight=\"0\"\nTabIndex=\"2\"\n- Visibility=\"{Binding PackageFilterState, Converter={wpf:Lambda '(NpmPackageInstallViewModel.FilterState b) => NpmPackageInstallViewModel.FilterState.ResultsAvailable == b ? Visibility.Visible : Visibility.Hidden'}}\" />\n+ Visibility=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=ResultsAvailable}\" />\n<Border BorderBrush=\"{Binding ElementName=packageList, Path=BorderBrush}\"\nBorderThickness=\"{Binding ElementName=packageList,Path=BorderThickness}\">\n<Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\n<TextBlock HorizontalAlignment=\"Center\"\n- Visibility=\"{Binding PackageFilterState, Converter={wpf:Lambda '(NpmPackageInstallViewModel.FilterState b) => NpmPackageInstallViewModel.FilterState.NoFilterText == b ? Visibility.Visible : Visibility.Hidden'}}\"\n+ Visibility=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=NoFilterText}\"\nText=\"{x:Static resx:NpmInstallWindowResources.SearchPromptMessage}\" />\n<ProgressBar\nHorizontalAlignment=\"Stretch\"\nIsEnabled=\"True\"\nIsIndeterminate=\"True\"\n- Visibility=\"{Binding PackageFilterState, Converter={wpf:Lambda '(NpmPackageInstallViewModel.FilterState b) => NpmPackageInstallViewModel.FilterState.Filtering == b ? Visibility.Visible : Visibility.Hidden'}}\"/>\n+ Visibility=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=Filtering}\"/>\n<TextBlock\nHorizontalAlignment=\"Center\"\n- Visibility=\"{Binding PackageFilterState, Converter={wpf:Lambda '(NpmPackageInstallViewModel.FilterState b) => NpmPackageInstallViewModel.FilterState.NoResults == b ? Visibility.Visible : Visibility.Hidden'}}\"\n+ Visibility=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=NoResults}\"\nText=\"{x:Static resx:NpmInstallWindowResources.NoResultsFoundMessage}\" />\n</Grid>\n</Border>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Delete LambdaConverter for WPF Only used in a single location, and caused file locks during build
410,217
19.12.2017 15:10:48
28,800
8afe9c528e4e475dc3a083164cf1542f14044a6b
Remove task from build
[ { "change_type": "MODIFY", "old_path": "Build/Common.Build.CSharp.targets", "new_path": "Build/Common.Build.CSharp.targets", "diff": "</EmbeddedResource>\n</ItemGroup>\n</Target>\n-\n- <!--\n- Processes {Lambda} converters in WPF XAML files and generates code for them.\n- -->\n-\n- <PropertyGroup>\n- <BuildTasksProjectDir>$(BuildRoot)\\Common\\Tools\\BuildTasks</BuildTasksProjectDir>\n- <BuildTasksAssembly>$(BuildOutputRoot)\\ToolBinaries\\BuildTasks\\Microsoft.VisualStudioTools.BuildTasks.dll</BuildTasksAssembly>\n- </PropertyGroup>\n- <ItemGroup>\n- <BuildTasksSourceFiles Include=\"$(BuildTasksProjectDir)\\*.csproj\"/>\n- <BuildTasksSourceFiles Include=\"$(BuildTasksProjectDir)\\**\\*.cs\"/>\n- </ItemGroup>\n-\n- <!-- Use Exec rather than MSBuild here to completely isolate the task build - otherwise it interferes with the main build.\n- To avoid spawning a new msbuild.exe process again and again unnecessarily, do a quick up-to-date check (effectively\n- duplicating the one done by .csproj) on the target. -->\n- <Target Name=\"BuildBuildTasks\" Inputs=\"@(BuildTasksSourceFiles)\" Outputs=\"$(BuildTasksAssembly)\">\n- <Exec Command='\"$(MSBuildBinPath)\\msbuild.exe\" \"$(BuildRoot)\\Common\\Tools\\BuildTasks\\BuildTasks.csproj\" /p:Configuration=$(Configuration) /p:VSTarget=$(VSTarget)'/>\n- </Target>\n-\n- <UsingTask AssemblyFile=\"$(BuildTasksAssembly)\" TaskName=\"Microsoft.VisualStudioTools.BuildTasks.ExtractLambdasFromXaml\"/>\n-\n- <Target Name=\"ExtractLambdasFromXaml\"\n- DependsOnTargets=\"BuildBuildTasks\"\n- Inputs=\"@(Page)\"\n- Outputs=\"@(Page->'$(IntermediateOutputPath)%(Filename).g.lambdas$(DefaultLanguageSourceExtension)')\">\n- <ExtractLambdasFromXaml InputFileName=\"@(Page->'%(FullPath)')\" OutputFileName=\"$(IntermediateOutputPath)%(Filename).g.lambdas$(DefaultLanguageSourceExtension)\" Language=\"$(Language)\">\n- <Output TaskParameter=\"OutputFileName\" ItemName=\"Compile\"/>\n- <Output TaskParameter=\"OutputFileName\" ItemName=\"FileWrites\"/>\n- </ExtractLambdasFromXaml>\n- </Target>\n-\n- <PropertyGroup>\n- <CoreCompileDependsOn>\n- ExtractLambdasFromXaml;\n- $(CoreCompileDependsOn)\n- </CoreCompileDependsOn>\n- </PropertyGroup>\n-\n</Project>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Remove task from build
410,217
19.12.2017 17:58:10
28,800
713df3da153c26afd2184b126fd3bab9d4686e86
Remove unused FileWatcher class
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"SharedProject\\CommonPropertyPage.cs\" />\n<Compile Include=\"SharedProject\\CommonReferenceContainerNode.cs\" />\n<Compile Include=\"SharedProject\\ConfigProvider.cs\" />\n- <Compile Include=\"SharedProject\\FileWatcher.cs\" />\n<Compile Include=\"SharedProject\\FlavoredProjectFactoryBase.cs\" />\n<Compile Include=\"SharedProject\\DataObject.cs\" />\n<Compile Include=\"SharedProject\\DependentFileNode.cs\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -507,7 +507,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthis._fileSystemChanges.Clear(); // none of the other changes matter now, we'll rescan the world\nthis._currentMerger = null; // abort any current merge now that we have a new one\n- this._fileSystemChanges.Enqueue(new FileSystemChange(this, WatcherChangeTypes.All, null, watcher: sender as FileWatcher));\n+ this._fileSystemChanges.Enqueue(new FileSystemChange(this, WatcherChangeTypes.All, path: null));\nTriggerIdle();\n}\n}\n@@ -656,14 +656,12 @@ namespace Microsoft.VisualStudioTools.Project\nprivate readonly string _initialDir;\nprivate readonly Stack<DirState> _remainingDirs = new Stack<DirState>();\nprivate readonly CommonProjectNode _project;\n- private readonly FileWatcher _watcher;\n- public DiskMerger(CommonProjectNode project, HierarchyNode parent, string dir, FileWatcher watcher = null)\n+ public DiskMerger(CommonProjectNode project, HierarchyNode parent, string dir)\n{\nthis._project = project;\nthis._initialDir = dir;\nthis._remainingDirs.Push(new DirState(dir, parent));\n- this._watcher = watcher;\n}\n/// <summary>\n@@ -675,11 +673,8 @@ namespace Microsoft.VisualStudioTools.Project\npublic bool ContinueMerge(bool hierarchyCreated = true)\n{\nif (this._remainingDirs.Count == 0)\n- { // all done\n- if (this._watcher != null)\n{\n- this._watcher.EnableRaisingEvents = true;\n- }\n+ // all done\nthis._project.BoldStartupItem();\nreturn false;\n}\n@@ -1138,7 +1133,7 @@ namespace Microsoft.VisualStudioTools.Project\n#endif\nif (change._type == WatcherChangeTypes.All)\n{\n- this._currentMerger = new DiskMerger(this, this, this.ProjectHome, change._watcher);\n+ this._currentMerger = new DiskMerger(this, this, this.ProjectHome);\ncontinue;\n}\nelse\n@@ -1164,18 +1159,17 @@ namespace Microsoft.VisualStudioTools.Project\nprivate class FileSystemChange\n{\nprivate readonly CommonProjectNode _project;\n- internal readonly WatcherChangeTypes _type;\nprivate readonly string _path;\nprivate readonly bool _isRename;\n- internal readonly FileWatcher _watcher;\n- public FileSystemChange(CommonProjectNode node, WatcherChangeTypes changeType, string path, bool isRename = false, FileWatcher watcher = null)\n+ internal readonly WatcherChangeTypes _type;\n+\n+ public FileSystemChange(CommonProjectNode node, WatcherChangeTypes changeType, string path, bool isRename = false)\n{\nthis._project = node;\nthis._type = changeType;\nthis._path = path;\nthis._isRename = isRename;\n- this._watcher = watcher;\n}\npublic override string ToString()\n@@ -1205,7 +1199,9 @@ namespace Microsoft.VisualStudioTools.Project\ncase WatcherChangeTypes.Deleted:\nChildDeleted(child);\nbreak;\n- case WatcherChangeTypes.Created: ChildCreated(child); break;\n+ case WatcherChangeTypes.Created:\n+ ChildCreated(child);\n+ break;\ncase WatcherChangeTypes.Changed:\n// we only care about the attributes\nif (this._project.IsFileHidden(this._path))\n@@ -1338,7 +1334,8 @@ namespace Microsoft.VisualStudioTools.Project\nfolderNode.ExpandItem(folderNodeWasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n}\nelse if (File.Exists(this._path))\n- { // rapid changes can arrive out of order, make sure the file still exists\n+ {\n+ // rapid changes can arrive out of order, make sure the file still exists\nthis._project.AddAllFilesFile(parent, this._path);\nif (StringComparer.OrdinalIgnoreCase.Equals(this._project.GetStartupFile(), this._path))\n{\n@@ -1376,11 +1373,13 @@ namespace Microsoft.VisualStudioTools.Project\nthis._projectDocListenerForStartupFileUpdates.Dispose();\nthis._projectDocListenerForStartupFileUpdates = null;\n}\n+\nvar libraryManager = this.Site.GetService(GetLibraryManagerType()) as LibraryManager;\nif (null != libraryManager)\n{\nlibraryManager.UnregisterHierarchy(this.InteropSafeHierarchy);\n}\n+\nif (this._watcher != null)\n{\nthis._watcher.EnableRaisingEvents = false;\n@@ -1410,6 +1409,7 @@ namespace Microsoft.VisualStudioTools.Project\npublic override void Load(string filename, string location, string name, uint flags, ref Guid iidProject, out int canceled)\n{\nbase.Load(filename, location, name, flags, ref iidProject, out canceled);\n+\nvar libraryManager = this.Site.GetService(GetLibraryManagerType()) as LibraryManager;\nif (null != libraryManager)\n{\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Remove unused FileWatcher class
410,217
20.12.2017 12:55:16
28,800
0aacfc8d6d70cbbf6be9fb3726f9a38ecb6c12f6
Make sure Readonly Arrays are readonly
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs", "new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs", "diff": "@@ -20,8 +20,6 @@ namespace Microsoft.NodejsTools\ninternal const string HTML = \"HTML\";\ninternal const string Nodejs = \"Node.js\";\n- internal const string IssueTrackerUrl = \"https://go.microsoft.com/fwlink/?LinkId=507637\";\n-\ninternal const string ProjectFileFilter = \"Node.js Project File (*.njsproj)\\n*.njsproj\\nAll Files (*.*)\\n*.*\\n\";\ninternal const string NodeModulesFolder = \"node_modules\";\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "diff": "@@ -71,7 +71,7 @@ namespace Microsoft.NodejsTools.Project\n}\n}\n- private readonly static string[] _excludedAvailableItems = new[] {\n+ private readonly static IReadOnlyCollection<string> ExcludedAvailableItems = new[] {\n\"ApplicationDefinition\",\n\"Page\",\n\"Resource\",\n@@ -87,7 +87,7 @@ namespace Microsoft.NodejsTools.Project\n{\n// Remove a couple of available item names which show up from imports we\n// can't control out of Microsoft.Common.targets.\n- return base.GetAvailableItemNames().Except(_excludedAvailableItems);\n+ return base.GetAvailableItemNames().Except(ExcludedAvailableItems);\n}\npublic Dictionary<NodejsProjectImageName, int> ImageIndexFromNameDictionary => this._imageIndexFromNameDictionary;\n@@ -105,7 +105,7 @@ namespace Microsoft.NodejsTools.Project\nAddProjectImage(NodejsProjectImageName.DependencyMissing, \"Microsoft.VisualStudioTools.Resources.Icons.PackageWarning_16x.png\");\n}\n- public bool IsTypeScriptProject => StringComparer.OrdinalIgnoreCase.Equals(GetProjectProperty(NodeProjectProperty.EnableTypeScript), \"true\");\n+ public bool IsTypeScriptProject => StringComparer.OrdinalIgnoreCase.Equals(this.GetProjectProperty(NodeProjectProperty.EnableTypeScript, false), \"true\");\nprotected override bool SupportsIconMonikers => true;\nprotected override ImageMoniker GetIconMoniker(bool open)\n@@ -123,13 +123,11 @@ namespace Microsoft.NodejsTools.Project\npublic override Guid SharedCommandGuid => Guids.NodejsCmdSet;\n- internal override string IssueTrackerUrl => NodejsConstants.IssueTrackerUrl;\n-\nprotected override void AddNewFileNodeToHierarchy(HierarchyNode parentNode, string fileName)\n{\nbase.AddNewFileNodeToHierarchy(parentNode, fileName);\n- if (IsProjectTypeScriptSourceFile(fileName) && !this.IsTypeScriptProject)\n+ if (!this.IsTypeScriptProject && IsProjectTypeScriptSourceFile(fileName))\n{\n// enable TypeScript on the project automatically...\nSetProjectProperty(NodeProjectProperty.EnableTypeScript, \"true\");\n@@ -149,14 +147,6 @@ namespace Microsoft.NodejsTools.Project\n&& !NodejsConstants.ContainsNodeModulesOrBowerComponentsFolder(path);\n}\n- internal static bool IsNodejsFile(string strFileName)\n- {\n- var ext = Path.GetExtension(strFileName);\n-\n- return StringComparer.OrdinalIgnoreCase.Equals(ext, NodejsConstants.JavaScriptExtension) ||\n- StringComparer.OrdinalIgnoreCase.Equals(ext, NodejsConstants.JavaScriptJsxExtension);\n- }\n-\ninternal override string GetItemType(string filename)\n{\nvar absFileName =\n@@ -227,14 +217,14 @@ namespace Microsoft.NodejsTools.Project\nreturn false;\n}\n- private static readonly string[] codeFileExtensions = new[] {\n+ private static readonly IReadOnlyCollection<string> codeFileExtensions = new[] {\nNodejsConstants.JavaScriptExtension,\nNodejsConstants.JavaScriptJsxExtension,\nNodejsConstants.TypeScriptExtension,\nNodejsConstants.TypeScriptJsxExtension\n};\n- public override string[] CodeFileExtensions => codeFileExtensions;\n+ public override IReadOnlyCollection<string> CodeFileExtensions => codeFileExtensions;\nprotected internal override FolderNode CreateFolderNode(ProjectElement element)\n{\n@@ -277,7 +267,7 @@ namespace Microsoft.NodejsTools.Project\nvar res = base.GetConfigurationDependentPropertyPages();\nvar enableTs = GetProjectProperty(NodeProjectProperty.EnableTypeScript, resetCache: false);\n- if (enableTs != null && Boolean.TryParse(enableTs, out var fEnableTs) && fEnableTs)\n+ if (enableTs != null && bool.TryParse(enableTs, out var fEnableTs) && fEnableTs)\n{\nvar typeScriptPages = GetProjectProperty(NodeProjectProperty.TypeScriptCfgProperty);\nif (typeScriptPages != null)\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "diff": "@@ -13,7 +13,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\ninternal class FileChangeManager : IVsFileChangeEvents\n{\n- #region nested objects\n/// <summary>\n/// Defines a data structure that can link a item moniker to the item and its file change cookie.\n/// </summary>\n@@ -61,9 +60,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n}\n- #endregion\n- #region Fields\n/// <summary>\n/// Event that is raised when one of the observed file names have changed on disk.\n/// </summary>\n@@ -84,21 +81,17 @@ namespace Microsoft.VisualStudioTools.Project\n/// Has Disposed already been called?\n/// </summary>\nprivate bool disposed;\n- #endregion\n- #region Constructor\n/// <summary>\n/// Overloaded ctor.\n/// </summary>\n/// <param name=\"nodeParam\">An instance of a project item.</param>\ninternal FileChangeManager(IServiceProvider serviceProvider)\n{\n- #region input validation\nif (serviceProvider == null)\n{\nthrow new ArgumentNullException(nameof(serviceProvider));\n}\n- #endregion\nthis.fileChangeService = (IVsFileChangeEx)serviceProvider.GetService(typeof(SVsFileChangeEx));\n@@ -108,9 +101,7 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new InvalidOperationException();\n}\n}\n- #endregion\n- #region IDisposable Members\n/// <summary>\n/// Disposes resources.\n/// </summary>\n@@ -133,9 +124,7 @@ namespace Microsoft.VisualStudioTools.Project\n// Clean the observerItems list\nthis.observedItems.Clear();\n}\n- #endregion\n- #region IVsFileChangeEvents Members\n/// <summary>\n/// Called when one of the file have changed on disk.\n/// </summary>\n@@ -155,16 +144,13 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentNullException(nameof(flags));\n}\n- if (this.FileChangedOnDisk != null)\n- {\nfor (var i = 0; i < numberOfFilesChanged; i++)\n{\nvar fullFileName = Utilities.CanonicalizeFileName(filesChanged[i]);\nif (this.observedItems.ContainsKey(fullFileName))\n{\nvar info = this.observedItems[fullFileName];\n- this.FileChangedOnDisk(this, new FileChangedOnDiskEventArgs(fullFileName, info.ItemID, (_VSFILECHANGEFLAGS)flags[i]));\n- }\n+ this.FileChangedOnDisk?.Invoke(this, new FileChangedOnDiskEventArgs(fullFileName, info.ItemID, (_VSFILECHANGEFLAGS)flags[i]));\n}\n}\n@@ -180,9 +166,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nreturn VSConstants.S_OK;\n}\n- #endregion\n- #region helpers\n/// <summary>\n/// Observe when the given file is updated on disk. In this case we do not care about the item id that represents the file in the hierarchy.\n/// </summary>\n@@ -199,12 +183,10 @@ namespace Microsoft.VisualStudioTools.Project\n/// <param name=\"id\">The item id of the item to observe.</param>\ninternal void ObserveItem(string fileName, uint id)\n{\n- #region Input validation\nif (string.IsNullOrEmpty(fileName))\n{\nthrow new ArgumentException(SR.GetString(SR.InvalidParameter), nameof(fileName));\n}\n- #endregion\nvar fullFileName = Utilities.CanonicalizeFileName(fileName);\nif (!this.observedItems.ContainsKey(fullFileName))\n@@ -228,12 +210,10 @@ namespace Microsoft.VisualStudioTools.Project\n/// <param name=\"ignore\">Flag indicating whether or not to ignore changes (1 to ignore, 0 to stop ignoring).</param>\ninternal void IgnoreItemChanges(string fileName, bool ignore)\n{\n- #region Input validation\nif (string.IsNullOrEmpty(fileName))\n{\nthrow new ArgumentException(SR.GetString(SR.InvalidParameter), nameof(fileName));\n}\n- #endregion\nvar fullFileName = Utilities.CanonicalizeFileName(fileName);\nif (this.observedItems.ContainsKey(fullFileName))\n@@ -249,12 +229,10 @@ namespace Microsoft.VisualStudioTools.Project\n/// <param name=\"fileName\">File to stop observing.</param>\ninternal void StopObservingItem(string fileName)\n{\n- #region Input validation\nif (string.IsNullOrEmpty(fileName))\n{\nthrow new ArgumentException(SR.GetString(SR.InvalidParameter), nameof(fileName));\n}\n- #endregion\nvar fullFileName = Utilities.CanonicalizeFileName(fileName);\n@@ -272,6 +250,5 @@ namespace Microsoft.VisualStudioTools.Project\nErrorHandler.ThrowOnFailure(this.fileChangeService.UnadviseFileChange(itemInfo.FileChangeCookie));\n}\n}\n- #endregion\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -310,11 +310,6 @@ namespace Microsoft.VisualStudioTools.Project\nget;\n}\n- internal abstract string IssueTrackerUrl\n- {\n- get;\n- }\n-\n#endregion\n#region virtual properties\n@@ -2254,7 +2249,7 @@ namespace Microsoft.VisualStudioTools.Project\nreturn false;\n}\n- public virtual string[] CodeFileExtensions => Array.Empty<string>();\n+ public virtual IReadOnlyCollection<string> CodeFileExtensions => Array.Empty<string>();\n/// <summary>\n/// Determines whether the given file is a resource file (resx file).\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make sure Readonly Arrays are readonly
410,217
28.12.2017 13:47:04
28,800
3f7688e5c7b5d5ad7cd95ed600c9ba26dc4ab2d5
Delay the enumeration of files not showing in the solution explorer. This improves Project load time in the most common scenario. Tested with Ember sample project, reduced from 13,000 to 1,700
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "diff": "@@ -326,7 +326,12 @@ namespace Microsoft.NodejsTools.Project\nbase.Reload();\n- SyncFileSystem();\n+ if (this.IsShowingAllFiles)\n+ {\n+ // We only need to sync the files on load if we're actually showing them\n+ // otherwise we'll sync on idle.\n+ this.SyncFileSystem();\n+ }\nthis.ModulesNode.ReloadHierarchySafe();\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Delay the enumeration of files not showing in the solution explorer. This improves Project load time in the most common scenario. Tested with Ember sample project, reduced from 13,000 to 1,700
410,217
02.01.2018 10:48:27
28,800
042cfc7dfc9315a63e7568041244c2ab8ee74ab4
Set correct main script for template.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json", "new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json", "diff": "\"name\": \"$npmsafeprojectname$\",\n\"version\": \"0.0.0\",\n\"description\": \"$projectname$\",\n- \"main\": \"app.js\",\n+ \"main\": \"server.js\",\n\"author\": {\n\"name\": \"\"\n},\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Set correct main script for template.
410,217
02.01.2018 11:12:12
28,800
ab79636640dfc3c477fdb42d2a9dfa6e59adb4af
Ignore file content changes This reduces the number of errors we get from the FileSystemWatcher. With each error we would scan the entire folder tree from the project root, which includes node_modules.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "diff": "@@ -61,7 +61,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (child != null)\n{\n- // attributes must of changed to hidden, remove the file\n+ // attributes must have changed to hidden, remove the file\nChildDeleted(child);\n}\n}\n@@ -69,7 +69,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (child == null)\n{\n- // attributes must of changed from hidden, add the file\n+ // attributes must have changed from hidden, add the file\nChildCreated(child);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -44,7 +44,6 @@ namespace Microsoft.VisualStudioTools.Project\nprivate int suppressFileWatcherCount;\nprivate bool isShowingAllFiles;\nprivate object automationObject;\n- private readonly Dictionary<string, FileSystemEventHandler> fileChangedHandlers = new Dictionary<string, FileSystemEventHandler>();\nprivate ConcurrentQueue<FileSystemChange> fileSystemChanges = new ConcurrentQueue<FileSystemChange>();\nprivate readonly Dictionary<string, FileSystemWatcher> symlinkWatchers = new Dictionary<string, FileSystemWatcher>();\n@@ -438,13 +437,12 @@ namespace Microsoft.VisualStudioTools.Project\n{\nInternalBufferSize = 1024 * 4, // 4k is minimum buffer size\nIncludeSubdirectories = true\n+ /* don't need to set NotifyFilters, since default LastWrite, FileName, and DirectoryName works for us */\n};\n// Set Event Handlers\nwatcher.Created += this.FileExistanceChanged;\nwatcher.Deleted += this.FileExistanceChanged;\n- watcher.Changed += this.FileContentsChanged;\n- watcher.Renamed += this.FileContentsChanged;\nwatcher.Renamed += this.FileNameChanged;\nwatcher.Error += this.WatcherError;\n@@ -783,19 +781,6 @@ namespace Microsoft.VisualStudioTools.Project\nparent.AddChild(newNode);\n}\n- private void FileContentsChanged(object sender, FileSystemEventArgs e)\n- {\n- if (this.IsClosed)\n- {\n- return;\n- }\n-\n- if (this.fileChangedHandlers.TryGetValue(e.FullPath, out var handler))\n- {\n- handler(sender, e);\n- }\n- }\n-\nprivate void FileAttributesChanged(object sender, FileSystemEventArgs e)\n{\nif (NoPendingFileSystemRescan())\n@@ -810,16 +795,6 @@ namespace Microsoft.VisualStudioTools.Project\nreturn !this.fileSystemChanges.TryPeek(out var change) || change.Type != WatcherChangeTypes.All;\n}\n- internal void RegisterFileChangeNotification(FileNode node, FileSystemEventHandler handler)\n- {\n- this.fileChangedHandlers[node.Url] = handler;\n- }\n-\n- internal void UnregisterFileChangeNotification(FileNode node)\n- {\n- this.fileChangedHandlers.Remove(node.Url);\n- }\n-\nprotected override ReferenceContainerNode CreateReferenceContainerNode()\n{\nreturn new CommonReferenceContainerNode(this);\n@@ -1005,8 +980,6 @@ namespace Microsoft.VisualStudioTools.Project\nthis.attributesWatcher = null;\n}\n- this.fileChangedHandlers.Clear();\n-\nforeach (var pair in this.symlinkWatchers)\n{\npair.Value.Dispose();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Ignore file content changes This reduces the number of errors we get from the FileSystemWatcher. With each error we would scan the entire folder tree from the project root, which includes node_modules.
410,217
02.01.2018 12:40:45
28,800
a1e6a3fbf0ee3e27ac47930cb9ddd1707c12ffa2
ExceptionExtensions is not used outside nodejs project
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonUtils.cs\">\n<Link>SharedProject\\CommonUtils.cs</Link>\n</Compile>\n- <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ExceptionExtensions.cs\">\n- <Link>SharedProject\\ExceptionExtensions.cs</Link>\n- </Compile>\n<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ProcessOutput.cs\">\n<Link>SharedProject\\ProcessOutput.cs</Link>\n</Compile>\n<Compile Include=\"Repl\\ReplOutputClassifier.cs\" />\n<Compile Include=\"Repl\\ReplOutputClassifierProvider.cs\" />\n<Compile Include=\"SharedProject\\CommonProjectNode.FileSystemChange.cs\" />\n+ <Compile Include=\"SharedProject\\ExceptionExtensions.cs\" />\n<Compile Include=\"SharedProject\\OutputWindowWrapper.cs\" />\n<Compile Include=\"SourceMapping\\FunctionInfo.cs\" />\n<Compile Include=\"SourceMapping\\JavaScriptSourceMapInfo.cs\" />\n" }, { "change_type": "RENAME", "old_path": "Common/Product/SharedProject/ExceptionExtensions.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ExceptionExtensions.cs", "diff": "" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/ProjectWizard/ProjectWizard.csproj", "new_path": "Nodejs/Product/ProjectWizard/ProjectWizard.csproj", "diff": "</Reference>\n</ItemGroup>\n<ItemGroup>\n- <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ExceptionExtensions.cs\">\n- <Link>ExceptionExtensions.cs</Link>\n- </Compile>\n<Compile Include=\"..\\Nodejs\\Guids.cs\">\n<Link>Guids.cs</Link>\n</Compile>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
ExceptionExtensions is not used outside nodejs project
410,217
29.12.2017 17:12:15
28,800
04327989990dc143af0936d778a1311f337dc65a
Make DiskMerger class Async, so we don't block the UI thread Switches to using the VS FileWatcher service, and uses async/await
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/AssemblyReferenceNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/AssemblyReferenceNode.cs", "diff": "@@ -74,7 +74,7 @@ namespace Microsoft.VisualStudioTools.Project\nif (File.Exists(this.assemblyPath))\n{\n- this.fileChangeListener.ObserveItem(this.assemblyPath);\n+ this.fileChangeListener.ObserveFile(this.assemblyPath);\n}\nvar include = this.ItemNode.GetMetadata(ProjectFileConstants.Include);\n@@ -108,7 +108,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.assemblyPath = assemblyPath;\n// We register with listeningto chnages onteh path here. The rest of teh cases will call into resolving the assembly and registration is done there.\n- this.fileChangeListener.ObserveItem(this.assemblyPath);\n+ this.fileChangeListener.ObserveFile(this.assemblyPath);\n}\nelse\n{\n@@ -358,7 +358,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.assemblyPath = fullPath;\n// We have a new item to listen too, since the assembly reference is resolved from a different place.\n- this.fileChangeListener.ObserveItem(this.assemblyPath);\n+ this.fileChangeListener.ObserveFile(this.assemblyPath);\n}\nthis.resolvedAssemblyName = name;\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "diff": "using System;\nusing System.Diagnostics;\nusing System.IO;\n+using System.Threading.Tasks;\nusing Microsoft.VisualStudio.Shell.Interop;\nnamespace Microsoft.VisualStudioTools.Project\n@@ -40,7 +41,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- public void ProcessChange()\n+ public async Task ProcessChangeAsync()\n{\nvar child = this.project.FindNodeByFullPath(this.path);\nif ((this.Type == WatcherChangeTypes.Deleted || this.Type == WatcherChangeTypes.Changed) && child == null)\n@@ -50,10 +51,10 @@ namespace Microsoft.VisualStudioTools.Project\nswitch (this.Type)\n{\ncase WatcherChangeTypes.Deleted:\n- ChildDeleted(child);\n+ await ChildDeletedAsync(child);\nbreak;\ncase WatcherChangeTypes.Created:\n- ChildCreated(child);\n+ await ChildCreatedAsync(child);\nbreak;\ncase WatcherChangeTypes.Changed:\n// we only care about the attributes\n@@ -62,7 +63,7 @@ namespace Microsoft.VisualStudioTools.Project\nif (child != null)\n{\n// attributes must have changed to hidden, remove the file\n- ChildDeleted(child);\n+ await ChildDeletedAsync(child);\n}\n}\nelse\n@@ -70,7 +71,7 @@ namespace Microsoft.VisualStudioTools.Project\nif (child == null)\n{\n// attributes must have changed from hidden, add the file\n- ChildCreated(child);\n+ await ChildCreatedAsync(child);\n}\n}\nbreak;\n@@ -95,7 +96,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private void ChildDeleted(HierarchyNode child)\n+ private async Task ChildDeletedAsync(HierarchyNode child)\n{\nif (child != null)\n{\n@@ -134,7 +135,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private void ChildCreated(HierarchyNode child)\n+ private async Task ChildCreatedAsync(HierarchyNode child)\n{\nif (child != null)\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -19,6 +19,7 @@ using Microsoft.VisualStudio.Shell.Interop;\nusing Microsoft.VisualStudioTools.Navigation;\nusing Microsoft.VisualStudioTools.Project.Automation;\nusing MSBuild = Microsoft.Build.Evaluation;\n+using TPL = System.Threading.Tasks;\nusing VsCommands2K = Microsoft.VisualStudio.VSConstants.VSStd2KCmdID;\nusing VSConstants = Microsoft.VisualStudio.VSConstants;\n@@ -39,8 +40,9 @@ namespace Microsoft.VisualStudioTools.Project\nprivate Guid mruPageGuid = new Guid(CommonConstants.AddReferenceMRUPageGuid);\nprivate VSLangProj.VSProject vsProject = null;\nprivate ProjectDocumentsListenerForStartupFileUpdates projectDocListenerForStartupFileUpdates;\n- private FileSystemWatcher watcher;\n- private FileSystemWatcher attributesWatcher;\n+\n+ private readonly FileChangeManager fileWatcher;\n+\nprivate int suppressFileWatcherCount;\nprivate bool isShowingAllFiles;\nprivate object automationObject;\n@@ -78,6 +80,8 @@ namespace Microsoft.VisualStudioTools.Project\nthis.idleManager = new IdleManager(this.Site);\nthis.idleManager.OnIdle += this.OnIdle;\n+\n+ this.fileWatcher = new FileChangeManager(serviceProvider);\n}\npublic override int QueryService(ref Guid guidService, out object result)\n@@ -379,13 +383,6 @@ namespace Microsoft.VisualStudioTools.Project\nOnProjectPropertyChanged += this.CommonProjectNode_OnProjectPropertyChanged;\n- // track file creation/deletes and update our glyphs when files start/stop existing for files in the project.\n- if (this.watcher != null)\n- {\n- this.watcher.EnableRaisingEvents = false;\n- this.watcher.Dispose();\n- }\n-\nbool? showAllFiles = null;\nif (this.UserBuildProject != null)\n{\n@@ -396,8 +393,8 @@ namespace Microsoft.VisualStudioTools.Project\nGetShowAllFilesSetting(this.BuildProject.GetPropertyValue(CommonConstants.ProjectView)) ??\nfalse;\n- this.watcher = CreateFileSystemWatcher(this.ProjectHome);\n- this.attributesWatcher = CreateAttributesWatcher(this.ProjectHome);\n+ this.CreateFileSystemWatcher();\n+ // this.attributesWatcher = CreateAttributesWatcher(this.ProjectHome);\nthis.currentMerger = new DiskMerger(this, this, this.ProjectHome);\n}\n@@ -412,9 +409,9 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthis.currentMerger = new DiskMerger(this, this, this.ProjectHome);\n}\n- while (this.currentMerger.ContinueMerge(this.ParentHierarchy != null))\n- {\n- }\n+ //while (this.currentMerger.ContinueMerge(this.ParentHierarchy != null))\n+ //{\n+ //}\nthis.currentMerger = null;\n}\n@@ -431,26 +428,19 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private FileSystemWatcher CreateFileSystemWatcher(string dir)\n+ private void CreateFileSystemWatcher()\n{\n- var watcher = new FileSystemWatcher(dir)\n- {\n- InternalBufferSize = 1024 * 4, // 4k is minimum buffer size\n- IncludeSubdirectories = true\n- // don't need to set NotifyFilters,\n- // since the default (LastWrite, FileName, and DirectoryName) works for us\n- };\n+ this.StopWatchingFiles();\n- // Set Event Handlers\n- watcher.Created += this.FileExistanceChanged;\n- watcher.Deleted += this.FileExistanceChanged;\n- watcher.Renamed += this.FileNameChanged;\n- watcher.Error += this.WatcherError;\n-\n- // Delay setting EnableRaisingEvents until everything else is initialized.\n- watcher.EnableRaisingEvents = true;\n+ this.fileWatcher.ObserveFolder(this.ProjectHome);\n+ this.fileWatcher.FolderChangedOnDisk += this.FolderChangedOnDisk;\n+ }\n- return watcher;\n+ private void StopWatchingFiles()\n+ {\n+ // stop watching old dir\n+ // track file creation/deletes and update our glyphs when files start/stop existing for files in the project.\n+ this.fileWatcher.StopObservingFolder(this.ProjectHome);\n}\nprivate FileSystemWatcher CreateAttributesWatcher(string dir)\n@@ -613,10 +603,10 @@ namespace Microsoft.VisualStudioTools.Project\nreturn showAllFiles;\n}\n- private void MergeDiskNodes(HierarchyNode curParent, string dir)\n+ private async TPL.Task MergeDiskNodes(HierarchyNode curParent, string dir)\n{\nvar merger = new DiskMerger(this, curParent, dir);\n- while (merger.ContinueMerge(this.ParentHierarchy != null))\n+ while (await merger.ContinueMergeAsync(this.ParentHierarchy != null))\n{\n}\n}\n@@ -801,6 +791,20 @@ namespace Microsoft.VisualStudioTools.Project\nreturn new CommonReferenceContainerNode(this);\n}\n+ private void FolderChangedOnDisk(object sender, FolderChangedEventArgs e)\n+ {\n+ // todo: does this make sense\n+ var file = e.FileName;\n+ if (File.Exists(file))\n+ {\n+ this.QueueFileSystemChanges(new FileSystemChange(this, WatcherChangeTypes.Changed, file));\n+ }\n+ else\n+ {\n+ this.QueueFileSystemChanges(new FileSystemChange(this, WatcherChangeTypes.Deleted, file));\n+ }\n+ }\n+\nprivate void FileNameChanged(object sender, RenamedEventArgs e)\n{\n// we just generate a delete and creation here - we're just updating the hierarchy\n@@ -862,7 +866,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\ncurDir = curDir + Path.DirectorySeparatorChar;\n}\n- this.symlinkWatchers[curDir] = CreateFileSystemWatcher(curDir);\n+ // this.symlinkWatchers[curDir] = CreateFileSystemWatcher(curDir);\n}\ninternal bool TryDeactivateSymLinkWatcher(HierarchyNode child)\n@@ -877,7 +881,7 @@ namespace Microsoft.VisualStudioTools.Project\nreturn false;\n}\n- private void OnIdle(object sender, ComponentManagerEventArgs e)\n+ private async void OnIdle(object sender, ComponentManagerEventArgs e)\n{\nInterlocked.Exchange(ref this.idleTriggered, 0);\ndo\n@@ -904,7 +908,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\n// we have more file merges to process, do this\n// before reflecting any other pending updates...\n- if (!merger.ContinueMerge(this.ParentHierarchy != null))\n+ if (!(await merger.ContinueMergeAsync(this.ParentHierarchy != null)))\n{\nthis.currentMerger = null;\n}\n@@ -921,7 +925,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\nelse\n{\n- change.ProcessChange();\n+ await change.ProcessChangeAsync();\n}\n#if DEBUG\n}\n@@ -967,19 +971,14 @@ namespace Microsoft.VisualStudioTools.Project\nlibraryManager.UnregisterHierarchy(this.InteropSafeHierarchy);\n}\n- if (this.watcher != null)\n- {\n- this.watcher.EnableRaisingEvents = false;\n- this.watcher.Dispose();\n- this.watcher = null;\n- }\n+ this.StopWatchingFiles();\n- if (this.attributesWatcher != null)\n- {\n- this.attributesWatcher.EnableRaisingEvents = false;\n- this.attributesWatcher.Dispose();\n- this.attributesWatcher = null;\n- }\n+ //if (this.attributesWatcher != null)\n+ //{\n+ // this.attributesWatcher.EnableRaisingEvents = false;\n+ // this.attributesWatcher.Dispose();\n+ // this.attributesWatcher = null;\n+ //}\nforeach (var pair in this.symlinkWatchers)\n{\n@@ -1474,8 +1473,7 @@ namespace Microsoft.VisualStudioTools.Project\nreturn VSConstants.OLE_E_PROMPTSAVECANCELLED;\n}\n- this.watcher.EnableRaisingEvents = false;\n- this.watcher.Dispose();\n+ this.StopWatchingFiles();\n// we don't use RenameProjectFile because it sends the OnAfterRenameProject event too soon\n// and causes VS to think the solution has changed on disk. We need to send it after all\n@@ -1520,8 +1518,8 @@ namespace Microsoft.VisualStudioTools.Project\nshell.RefreshPropertyBrowser(0);\n- this.watcher = CreateFileSystemWatcher(this.ProjectHome);\n- this.attributesWatcher = CreateAttributesWatcher(this.ProjectHome);\n+ CreateFileSystemWatcher();\n+ // this.attributesWatcher = CreateAttributesWatcher(this.ProjectHome);\nreturn VSConstants.S_OK;\n}\n@@ -1557,17 +1555,17 @@ namespace Microsoft.VisualStudioTools.Project\n#endregion\n- internal void SuppressFileChangeNotifications()\n+ internal void SuppressFileChangeNotifications(string folder)\n{\n- this.watcher.EnableRaisingEvents = false;\n+ this.fileWatcher.IgnoreItemChanges(folder, ignore: true);\nthis.suppressFileWatcherCount++;\n}\n- internal void RestoreFileChangeNotifications()\n+ internal void RestoreFileChangeNotifications(string folder)\n{\nif (--this.suppressFileWatcherCount == 0)\n{\n- this.watcher.EnableRaisingEvents = true;\n+ this.fileWatcher.IgnoreItemChanges(folder, ignore: false);\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -6248,8 +6248,6 @@ If the files in the existing folder have the same names as files in the folder y\n/// </summary>\ninternal HierarchyNode FindNodeByFullPath(string name)\n{\n- this.Site.GetUIThread().MustBeCalledFromUIThread();\n-\nDebug.Assert(Path.IsPathRooted(name));\nthis.DiskNodes.TryGetValue(name, out var node);\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make DiskMerger class Async, so we don't block the UI thread Switches to using the VS FileWatcher service, and uses async/await
410,217
08.01.2018 17:37:08
28,800
080e9e35151c597761fb53c122e2ebed46f5f38b
More Async and a fix for folders
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs", "diff": "@@ -326,13 +326,6 @@ namespace Microsoft.NodejsTools.Project\nbase.Reload();\n- if (this.IsShowingAllFiles)\n- {\n- // We only need to sync the files on load if we're actually showing them\n- // otherwise we'll sync on idle.\n- this.SyncFileSystem();\n- }\n-\nthis.ModulesNode.ReloadHierarchySafe();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs", "diff": "@@ -37,9 +37,8 @@ namespace Microsoft.VisualStudioTools.Project\n/// <summary>\n/// Continues processing the merge request, performing a portion of the full merge possibly\n/// returning before the merge has completed.\n- ///\n- /// Returns true if the merge needs to continue, or false if the merge has completed.\n/// </summary>\n+ /// <returns>Returns true if the merge needs to continue, or false if the merge has completed.</returns>\npublic async Task<bool> ContinueMergeAsync(bool hierarchyCreated)\n{\nif (this.remainingDirs.Count == 0)\n@@ -96,6 +95,7 @@ namespace Microsoft.VisualStudioTools.Project\ntry\n{\n+ var newFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\nforeach (var file in Directory.EnumerateFiles(dir.Name))\n{\nif (this.project.IsFileHidden(file))\n@@ -103,17 +103,18 @@ namespace Microsoft.VisualStudioTools.Project\ncontinue;\n}\n- // todo: batch files\nvar existing = this.project.FindNodeByFullPath(file);\nif (existing == null)\n{\n- existing = await this.InvokeOnUIThread(() => this.project.AddAllFilesFile(dir.Parent, file));\n+ newFiles.Add(file);\n}\nelse\n{\nmissingChildren.Remove(existing);\n}\n}\n+\n+ await this.InvokeOnUIThread(() => AddNewFilesAsync(dir.Parent, newFiles));\n}\ncatch\n{\n@@ -145,6 +146,16 @@ namespace Microsoft.VisualStudioTools.Project\nreturn true;\n}\n+ private void AddNewFilesAsync(HierarchyNode parent, HashSet<string> newFiles)\n+ {\n+ this.project.Site.GetUIThread().MustBeCalledFromUIThread();\n+\n+ foreach (var file in newFiles)\n+ {\n+ this.project.AddAllFilesFile(parent, file);\n+ }\n+ }\n+\nprivate Task InvokeOnUIThread(Action action)\n{\nreturn this.project.Site.GetUIThread().InvokeAsync(action);\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "diff": "@@ -54,8 +54,6 @@ namespace Microsoft.VisualStudioTools.Project\nawait ChildDeletedAsync(child);\nbreak;\ncase WatcherChangeTypes.Created:\n- await ChildCreatedAsync(child);\n- break;\ncase WatcherChangeTypes.Changed:\n// we only care about the attributes\nif (this.project.IsFileHidden(this.path))\n@@ -68,12 +66,10 @@ namespace Microsoft.VisualStudioTools.Project\n}\nelse\n{\n- if (child == null)\n- {\n- // attributes must have changed from hidden, add the file\n+ // either a new or attributes have changed\n+ // add the file\nawait ChildCreatedAsync(child);\n}\n- }\nbreak;\n}\n}\n@@ -101,7 +97,6 @@ namespace Microsoft.VisualStudioTools.Project\nif (child != null)\n{\nthis.project.TryDeactivateSymLinkWatcher(child);\n- this.project.Site.GetUIThread().MustBeCalledFromUIThread();\n// rapid changes can arrive out of order, if the file or directory\n// actually exists ignore the event.\n@@ -116,12 +111,15 @@ namespace Microsoft.VisualStudioTools.Project\n}\nif (child.ItemNode.IsExcluded)\n+ {\n+ await this.InvokeOnUIThread(() =>\n{\nthis.RemoveAllFilesChildren(child);\n// deleting a show all files item, remove the node.\nthis.project.OnItemDeleted(child);\nchild.Parent.RemoveChild(child);\nchild.Close();\n+ });\n}\nelse\n{\n@@ -129,7 +127,7 @@ namespace Microsoft.VisualStudioTools.Project\n// deleting an item in the project, fix the icon, also\n// fix the icon of all children which we may have not\n// received delete notifications for\n- this.RedrawIcon(child);\n+ await this.InvokeOnUIThread(() => this.RedrawIcon(child));\n}\n}\n}\n@@ -182,7 +180,7 @@ namespace Microsoft.VisualStudioTools.Project\nvar folderNodeWasExpanded = folderNode.GetIsExpanded();\n// then add the folder nodes\n- this.project.MergeDiskNodes(folderNode, this.path);\n+ await this.project.MergeDiskNodesAsync(folderNode, this.path);\nthis.project.OnInvalidateItems(folderNode);\nfolderNode.ExpandItem(folderNodeWasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n@@ -200,6 +198,16 @@ namespace Microsoft.VisualStudioTools.Project\nparent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n}\n}\n+\n+ private Task InvokeOnUIThread(Action action)\n+ {\n+ return this.project.Site.GetUIThread().InvokeAsync(action);\n+ }\n+\n+ private Task<T> InvokeOnUIThread<T>(Func<T> func)\n+ {\n+ return this.project.Site.GetUIThread().InvokeAsync(func);\n+ }\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -82,6 +82,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.idleManager.OnIdle += this.OnIdle;\nthis.fileWatcher = new FileChangeManager(serviceProvider);\n+ this.fileWatcher.FolderChangedOnDisk += this.FolderChangedOnDisk;\n}\npublic override int QueryService(ref Guid guidService, out object result)\n@@ -394,27 +395,10 @@ namespace Microsoft.VisualStudioTools.Project\nfalse;\nthis.CreateFileSystemWatcher();\n- // this.attributesWatcher = CreateAttributesWatcher(this.ProjectHome);\nthis.currentMerger = new DiskMerger(this, this, this.ProjectHome);\n}\n- /// <summary>\n- /// Called to ensure that the hierarchy's show all files nodes are in\n- /// sync with the file system.\n- /// </summary>\n- protected void SyncFileSystem()\n- {\n- if (this.currentMerger == null)\n- {\n- this.currentMerger = new DiskMerger(this, this, this.ProjectHome);\n- }\n- //while (this.currentMerger.ContinueMerge(this.ParentHierarchy != null))\n- //{\n- //}\n- this.currentMerger = null;\n- }\n-\nprivate void BoldStartupItem()\n{\nvar startupPath = GetStartupFile();\n@@ -433,7 +417,6 @@ namespace Microsoft.VisualStudioTools.Project\nthis.StopWatchingFiles();\nthis.fileWatcher.ObserveFolder(this.ProjectHome);\n- this.fileWatcher.FolderChangedOnDisk += this.FolderChangedOnDisk;\n}\nprivate void StopWatchingFiles()\n@@ -443,39 +426,6 @@ namespace Microsoft.VisualStudioTools.Project\nthis.fileWatcher.StopObservingFolder(this.ProjectHome);\n}\n- private FileSystemWatcher CreateAttributesWatcher(string dir)\n- {\n- var watcher = new FileSystemWatcher(dir)\n- {\n- IncludeSubdirectories = true,\n- NotifyFilter = NotifyFilters.Attributes,\n- InternalBufferSize = 1024 * 4, // 4k is minimum buffer size\n- };\n-\n- // Set Event Handlers\n- watcher.Changed += this.FileAttributesChanged;\n- watcher.Error += this.WatcherError;\n-\n- // Delay setting EnableRaisingEvents until everything else is initialized.\n- watcher.EnableRaisingEvents = true;\n-\n- return watcher;\n- }\n-\n- /// <summary>\n- /// When the file system watcher buffer overflows we need to scan the entire\n- /// directory for changes.\n- /// </summary>\n- private void WatcherError(object sender, ErrorEventArgs e)\n- {\n- var newFileSystemQueue = new ConcurrentQueue<FileSystemChange>();\n-\n- this.fileSystemChanges = newFileSystemQueue; // none of the other changes matter now, we'll rescan the world\n- this.currentMerger = null; // abort any current merge now that we have a new one\n- this.fileSystemChanges.Enqueue(new FileSystemChange(this, WatcherChangeTypes.All, path: null));\n- TriggerIdle();\n- }\n-\nprotected override void SaveMSBuildProjectFileAs(string newFileName)\n{\nbase.SaveMSBuildProjectFileAs(newFileName);\n@@ -518,6 +468,12 @@ namespace Microsoft.VisualStudioTools.Project\nthis.idleManager.OnIdle -= this.OnIdle;\nthis.idleManager.Dispose();\n}\n+\n+ if (this.fileWatcher != null)\n+ {\n+ this.fileWatcher.FolderChangedOnDisk -= this.FolderChangedOnDisk;\n+ this.fileWatcher.Dispose();\n+ }\n}\nbase.Dispose(disposing);\n@@ -603,7 +559,7 @@ namespace Microsoft.VisualStudioTools.Project\nreturn showAllFiles;\n}\n- private async TPL.Task MergeDiskNodes(HierarchyNode curParent, string dir)\n+ private async TPL.Task MergeDiskNodesAsync(HierarchyNode curParent, string dir)\n{\nvar merger = new DiskMerger(this, curParent, dir);\nwhile (await merger.ContinueMergeAsync(this.ParentHierarchy != null))\n@@ -793,9 +749,8 @@ namespace Microsoft.VisualStudioTools.Project\nprivate void FolderChangedOnDisk(object sender, FolderChangedEventArgs e)\n{\n- // todo: does this make sense\nvar file = e.FileName;\n- if (File.Exists(file))\n+ if (File.Exists(file) || Directory.Exists(file))\n{\nthis.QueueFileSystemChanges(new FileSystemChange(this, WatcherChangeTypes.Changed, file));\n}\n@@ -805,22 +760,6 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private void FileNameChanged(object sender, RenamedEventArgs e)\n- {\n- // we just generate a delete and creation here - we're just updating the hierarchy\n- // either changing icons or updating the non-project elements, so we don't need to\n- // generate rename events or anything like that. This saves us from having to\n- // handle updating the hierarchy in a special way for renames.\n- this.QueueFileSystemChanges(\n- new FileSystemChange(this, WatcherChangeTypes.Deleted, e.OldFullPath, isRename: true),\n- new FileSystemChange(this, WatcherChangeTypes.Created, e.FullPath, isRename: true));\n- }\n-\n- private void FileExistanceChanged(object sender, FileSystemEventArgs e)\n- {\n- this.QueueFileSystemChanges(new FileSystemChange(this, e.ChangeType, e.FullPath));\n- }\n-\nprivate void QueueFileSystemChanges(params FileSystemChange[] changes)\n{\nif (this.IsClosed)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
More Async and a fix for folders
410,217
09.01.2018 16:59:32
28,800
35a5cb6ac763607821e123304b2e6b8d60c01e81
Simplified switching to/from UI thread
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs", "diff": "@@ -53,11 +53,28 @@ namespace Microsoft.VisualStudioTools.Project\nreturn true;\n}\n+ return await this.InvokeOnUIThread(() => this.ContinueMergeAsyncWorker(dir, hierarchyCreated));\n+ }\n+\n+ private async Task<bool> ContinueMergeAsyncWorker((string Name, HierarchyNode Parent) dir, bool hierarchyCreated)\n+ {\nvar wasExpanded = hierarchyCreated ? dir.Parent.GetIsExpanded() : false;\nvar missingChildren = new HashSet<HierarchyNode>(dir.Parent.AllChildren);\n+\n+ var thread = this.project.Site.GetUIThread();\n+\ntry\n{\n- foreach (var curDir in Directory.EnumerateDirectories(dir.Name))\n+ // enumerate disk on worker thread\n+ var folders = await Task.Run(() =>\n+ {\n+ thread.MustNotBeCalledFromUIThread();\n+ return Directory.GetDirectories(dir.Name, \"*\", SearchOption.TopDirectoryOnly);\n+ }).ConfigureAwait(true);\n+\n+ thread.MustBeCalledFromUIThread();\n+\n+ foreach (var curDir in folders)\n{\nif (this.project.IsFileHidden(curDir))\n{\n@@ -78,7 +95,7 @@ namespace Microsoft.VisualStudioTools.Project\nvar existing = this.project.FindNodeByFullPath(curDir);\nif (existing == null)\n{\n- existing = await this.InvokeOnUIThread(() => this.project.AddAllFilesFolder(dir.Parent, curDir + Path.DirectorySeparatorChar, hierarchyCreated));\n+ existing = this.project.AddAllFilesFolder(dir.Parent, curDir + Path.DirectorySeparatorChar, hierarchyCreated);\n}\nelse\n{\n@@ -96,7 +113,16 @@ namespace Microsoft.VisualStudioTools.Project\ntry\n{\nvar newFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n- foreach (var file in Directory.EnumerateFiles(dir.Name))\n+\n+ var files = await Task.Run(() =>\n+ {\n+ thread.MustNotBeCalledFromUIThread();\n+ return Directory.GetFiles(dir.Name, \"*\", SearchOption.TopDirectoryOnly);\n+ }).ConfigureAwait(true);\n+\n+ thread.MustBeCalledFromUIThread();\n+\n+ foreach (var file in files)\n{\nif (this.project.IsFileHidden(file))\n{\n@@ -114,7 +140,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- await this.InvokeOnUIThread(() => AddNewFiles(dir.Parent, newFiles));\n+ AddNewFiles(dir.Parent, newFiles);\n}\ncatch\n{\n@@ -124,17 +150,17 @@ namespace Microsoft.VisualStudioTools.Project\n// state. Set it back to what it was\nif (hierarchyCreated)\n{\n- await this.InvokeOnUIThread(() => dir.Parent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder));\n+ dir.Parent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n}\nreturn true;\n}\n// remove the excluded children which are no longer there\n- await this.InvokeOnUIThread(() => this.RemoveMissingChildren(missingChildren));\n+ this.RemoveMissingChildren(missingChildren);\nif (hierarchyCreated)\n{\n- await this.InvokeOnUIThread(() => dir.Parent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder));\n+ dir.Parent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n}\nreturn true;\n@@ -168,9 +194,9 @@ namespace Microsoft.VisualStudioTools.Project\nreturn this.project.Site.GetUIThread().InvokeAsync(action);\n}\n- private Task<T> InvokeOnUIThread<T>(Func<T> func)\n+ private Task<T> InvokeOnUIThread<T>(Func<Task<T>> func)\n{\n- return this.project.Site.GetUIThread().InvokeAsync(func);\n+ return this.project.Site.GetUIThread().InvokeTask(func);\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs", "diff": "@@ -43,6 +43,8 @@ namespace Microsoft.VisualStudioTools.Project\npublic async Task ProcessChangeAsync()\n{\n+ this.project.Site.GetUIThread().MustBeCalledFromUIThread();\n+\nvar child = this.project.FindNodeByFullPath(this.path);\nif ((this.Type == WatcherChangeTypes.Deleted || this.Type == WatcherChangeTypes.Changed) && child == null)\n{\n@@ -51,7 +53,7 @@ namespace Microsoft.VisualStudioTools.Project\nswitch (this.Type)\n{\ncase WatcherChangeTypes.Deleted:\n- await ChildDeletedAsync(child);\n+ ChildDeleted(child);\nbreak;\ncase WatcherChangeTypes.Created:\ncase WatcherChangeTypes.Changed:\n@@ -61,7 +63,7 @@ namespace Microsoft.VisualStudioTools.Project\nif (child != null)\n{\n// attributes must have changed to hidden, remove the file\n- await ChildDeletedAsync(child);\n+ ChildDeleted(child);\n}\n}\nelse\n@@ -92,7 +94,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private async Task ChildDeletedAsync(HierarchyNode child)\n+ private void ChildDeleted(HierarchyNode child)\n{\nif (child != null)\n{\n@@ -111,15 +113,12 @@ namespace Microsoft.VisualStudioTools.Project\n}\nif (child.ItemNode.IsExcluded)\n- {\n- await this.InvokeOnUIThread(() =>\n{\nthis.RemoveAllFilesChildren(child);\n// deleting a show all files item, remove the node.\nthis.project.OnItemDeleted(child);\nchild.Parent.RemoveChild(child);\nchild.Close();\n- });\n}\nelse\n{\n@@ -127,7 +126,7 @@ namespace Microsoft.VisualStudioTools.Project\n// deleting an item in the project, fix the icon, also\n// fix the icon of all children which we may have not\n// received delete notifications for\n- await this.InvokeOnUIThread(() => this.RedrawIcon(child));\n+ this.RedrawIcon(child);\n}\n}\n}\n@@ -181,6 +180,10 @@ namespace Microsoft.VisualStudioTools.Project\n// then add the folder nodes\nawait this.project.MergeDiskNodesAsync(folderNode, this.path).ConfigureAwait(true);\n+\n+ // Assert we're back on the UI thread\n+ this.project.Site.GetUIThread().MustBeCalledFromUIThread();\n+\nthis.project.OnInvalidateItems(folderNode);\nfolderNode.ExpandItem(folderNodeWasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n@@ -198,16 +201,6 @@ namespace Microsoft.VisualStudioTools.Project\nparent.ExpandItem(wasExpanded ? EXPANDFLAGS.EXPF_ExpandFolder : EXPANDFLAGS.EXPF_CollapseFolder);\n}\n}\n-\n- private Task InvokeOnUIThread(Action action)\n- {\n- return this.project.Site.GetUIThread().InvokeAsync(action);\n- }\n-\n- private Task<T> InvokeOnUIThread<T>(Func<T> func)\n- {\n- return this.project.Site.GetUIThread().InvokeAsync(func);\n- }\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "diff": "using System;\nusing System.Collections.Concurrent;\n+using System.Diagnostics;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.Shell.Interop;\nusing IServiceProvider = System.IServiceProvider;\n@@ -90,17 +91,21 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentNullException(nameof(pszFile));\n}\n- this.fileChangeManager.FolderChangedOnDisk?.Invoke(this, new FolderChangedEventArgs(pszDirectory, pszFile, (_VSFILECHANGEFLAGS)0 /* default for now, untill VS implements API that returns actual change */));\n+ this.fileChangeManager.FolderChangedOnDisk?.Invoke(this, new FolderChangedEventArgs(pszDirectory, pszFile,\n+ (_VSFILECHANGEFLAGS)0 /* default for now, until VS implements API that returns actual change */));\nreturn VSConstants.S_OK;\n}\n}\n/// <summary>\n- /// Event that is raised when one of the observed file names have changed on disk.\n+ /// Event that is raised when one of the observed files have changed on disk.\n/// </summary>\npublic event EventHandler<FileChangedOnDiskEventArgs> FileChangedOnDisk;\n+ /// <summary>\n+ /// Event that is raised when one of the observed folders have changed on disk.\n+ /// </summary>\npublic event EventHandler<FolderChangedEventArgs> FolderChangedOnDisk;\n/// <summary>\n@@ -168,7 +173,10 @@ namespace Microsoft.VisualStudioTools.Project\n// Unsubscribe from the observed source files.\nforeach (var (ItemID, FileChangeCookie) in this.observedFiles.Values)\n{\n- ErrorHandler.ThrowOnFailure(this.fileChangeService.UnadviseFileChange(FileChangeCookie));\n+ var hr = this.fileChangeService.UnadviseFileChange(FileChangeCookie);\n+ if (ErrorHandler.Failed(hr)) { break; }\n+ // don't want to crash VS during cleanup\n+ Debug.Assert(ErrorHandler.Succeeded(hr), \"UnadviseFileChange failed\");\n}\n// Clean the observerItems list\n@@ -177,7 +185,10 @@ namespace Microsoft.VisualStudioTools.Project\n// Unsubscribe from the observed source files.\nforeach (var folderCookie in this.observedFolders.Values)\n{\n- ErrorHandler.ThrowOnFailure(this.fileChangeService.UnadviseDirChange(folderCookie));\n+ var hr = this.fileChangeService.UnadviseDirChange(folderCookie);\n+ if (ErrorHandler.Failed(hr)) { break; }\n+ // don't want to crash VS during cleanup\n+ Debug.Assert(ErrorHandler.Succeeded(hr), \"UnadviseFileChange failed\");\n}\n// Clean the observerItems list\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Simplified switching to/from UI thread
410,202
18.01.2018 18:05:20
28,800
d4ce104796ba6cca38057a2ee12914f7c72e30da
Added jsconfig template. Added common exclude directories to tsconfig.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<ZipItem Include=\"Templates\\Files\\EmptyLess\\EmptyLess.less\" />\n<ZipItem Include=\"Templates\\Files\\EmptyPug\\EmptyPug.pug\" />\n<Compile Include=\"SharedProject\\CommonProjectNode.DiskMerger.cs\" />\n+ <ZipItem Include=\"Templates\\Files\\TypeScriptTsConfig\\jsconfig.json\" />\n<None Include=\"Theme\\contrast.vstheme\">\n<SubType>Designer</SubType>\n</None>\n<ZipItem Include=\"Templates\\Files\\TypeScriptJasmineUnitTest\\UnitTest.vstemplate\">\n<SubType>Designer</SubType>\n</ZipItem>\n+ <ZipItem Include=\"Templates\\Files\\TypeScriptTsConfig\\jsconfig.vstemplate\">\n+ <SubType>Designer</SubType>\n+ </ZipItem>\n<Content Include=\"VSTemplateStore.pkgdef\">\n<IncludeInVSIX>false</IncludeInVSIX>\n<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptTsConfig/jsconfig.json", "diff": "+{\n+ \"exclude\": [\n+ \"**/bin\",\n+ \"**/bower_components\",\n+ \"**/jspm_packages\",\n+ \"**/node_modules\",\n+ \"**/obj\",\n+ \"**/platforms\",\n+ \"**/wwwroot/lib\"\n+ ]\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptTsConfig/jsconfig.vstemplate", "diff": "+<VSTemplate Version=\"3.0.0\" Type=\"Item\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\">\n+ <TemplateData>\n+ <Name Package=\"{2ffe45c4-5c73-493c-b187-f2e955ff875e}\" ID=\"1044\" />\n+ <Description Package=\"{2ffe45c4-5c73-493c-b187-f2e955ff875e}\" ID=\"1045\" />\n+ <!-- pulled from the asp.net v5 package -->\n+ <Icon Package=\"{AAB75614-2F8F-4DA6-B0A6-763C6DBB2969}\" ID=\"2200\"/>\n+ <DefaultName>jsconfig.json</DefaultName>\n+ <TemplateID>Node.jsconfig</TemplateID>\n+ <ProjectType>Node.js</ProjectType>\n+ <SortOrder>370</SortOrder>\n+ </TemplateData>\n+ <TemplateContent>\n+ <ProjectItem SubType=\"Code\" ReplaceParameters=\"true\">jsconfig.json</ProjectItem>\n+ </TemplateContent>\n+</VSTemplate>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptTsConfig/tsconfig.json", "new_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptTsConfig/tsconfig.json", "diff": "\"target\": \"es5\"\n},\n\"exclude\": [\n- \"node_modules\"\n+ \"**/bin\",\n+ \"**/bower_components\",\n+ \"**/jspm_packages\",\n+ \"**/node_modules\",\n+ \"**/obj\",\n+ \"**/platforms\",\n+ \"**/wwwroot/lib\"\n]\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Added jsconfig template. Added common exclude directories to tsconfig.
410,217
31.01.2018 15:41:56
28,800
9f30e0f56b83b22bede8248479ca09fe2ae57a35
Remove no longer used template. This template is not complete, and doesn't correctly size the components of the radiobutton. The only place we use this radiobutton control, is rendered as expected withouth this template.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/Wpf/Controls.xaml", "new_path": "Nodejs/Product/Nodejs/SharedProject/Wpf/Controls.xaml", "diff": "</Trigger>\n</Style.Triggers>\n- </Style>\n-\n- <Style TargetType=\"{x:Type RadioButton}\" BasedOn=\"{StaticResource {x:Type Control}}\">\n- <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\n- <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\n- <Setter Property=\"Template\">\n- <Setter.Value>\n- <ControlTemplate TargetType=\"{x:Type RadioButton}\">\n- <Grid Background=\"Transparent\">\n- <Grid.ColumnDefinitions>\n- <ColumnDefinition Width=\"Auto\" />\n- <ColumnDefinition Width=\"*\" />\n- </Grid.ColumnDefinitions>\n- <Ellipse Stroke=\"{TemplateBinding BorderBrush}\"\n- StrokeThickness=\"{TemplateBinding BorderThickness}\"\n- Fill=\"{TemplateBinding Background}\"\n- MinWidth=\"{Binding ActualHeight,RelativeSource={RelativeSource Self}}\"\n- MinHeight=\"{Binding ActualWidth,RelativeSource={RelativeSource Self}}\"/>\n- <Ellipse x:Name=\"optionMark\"\n- Fill=\"{TemplateBinding Foreground}\"\n- Margin=\"5\"\n- Opacity=\"0\" />\n- <Grid Grid.Column=\"1\" Margin=\"4 0 0 0\">\n- <Grid.ColumnDefinitions>\n- <ColumnDefinition Width=\"auto\" />\n- <ColumnDefinition Width=\"*\" />\n- </Grid.ColumnDefinitions>\n- <Rectangle x:Name=\"focusRect\"\n- Grid.Column=\"0\"\n- RenderOptions.EdgeMode=\"Aliased\"\n- Stroke=\"{DynamicResource {x:Static wpf:Controls.ForegroundKey}}\"\n- StrokeThickness=\"1\"\n- StrokeDashArray=\"1 1\"\n- Visibility=\"Hidden\" />\n- <ContentPresenter x:Name=\"contentPresenter\"\n- Grid.Column=\"0\"\n- ContentTemplate=\"{TemplateBinding ContentTemplate}\"\n- Content=\"{TemplateBinding Content}\"\n- ContentStringFormat=\"{TemplateBinding ContentStringFormat}\"\n- HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\n- Margin=\"{TemplateBinding Padding}\"\n- RecognizesAccessKey=\"True\"\n- VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\n- </Grid>\n- </Grid>\n- <ControlTemplate.Triggers>\n- <Trigger Property=\"IsFocused\" Value=\"True\">\n- <Setter Property=\"Visibility\" TargetName=\"focusRect\" Value=\"Visible\" />\n- </Trigger>\n- <Trigger Property=\"IsChecked\" Value=\"True\">\n- <Setter Property=\"Opacity\" TargetName=\"optionMark\" Value=\"1\" />\n- </Trigger>\n- </ControlTemplate.Triggers>\n- </ControlTemplate>\n- </Setter.Value>\n- </Setter>\n- <Style.Triggers>\n- <Trigger Property=\"IsMouseOver\" Value=\"True\">\n- <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBackgroundHoverKey}}\" />\n- <Setter Property=\"BorderBrush\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBorderHoverKey}}\" />\n- </Trigger>\n- <Trigger Property=\"IsPressed\" Value=\"True\">\n- <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBackgroundPressedKey}}\" />\n- <Setter Property=\"BorderBrush\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBorderPressedKey}}\" />\n- <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlForegroundPressedKey}}\" />\n- </Trigger>\n- <Trigger Property=\"IsEnabled\" Value=\"False\">\n- <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBackgroundDisabledKey}}\" />\n- <Setter Property=\"BorderBrush\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlBorderDisabledKey}}\" />\n- <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static wpf:Controls.ControlForegroundDisabledKey}}\" />\n- </Trigger>\n- </Style.Triggers>\n-\n</Style>\n<Style TargetType=\"{x:Type RepeatButton}\">\n<Setter Property=\"Background\" Value=\"{DynamicResource {x:Static wpf:Controls.ScrollBarArrowBackgroundKey}}\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Remove no longer used template. This template is not complete, and doesn't correctly size the components of the radiobutton. The only place we use this radiobutton control, is rendered as expected withouth this template.
410,217
01.02.2018 16:10:25
28,800
45b99817c9df96a0867f7ffe2a3eff67684681f8
Ensure the project file is saved next to the source files Saving the project file in a separate folder from the actual source files causes a whole range of isses, this is caused by the assumption in the LS that the workingdir is the project dir.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs", "new_path": "Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs", "diff": "@@ -35,11 +35,7 @@ namespace Microsoft.NodejsTools.Commands\nvar argItems = projectArgs.Split('|');\nDebug.Assert(argItems.Length == 4, \"expected 4 arguments\");\n- dlg.ImportSettings.ProjectPath = CommonUtils.GetAvailableFilename(\n- argItems[1],\n- argItems[0],\n- \".njsproj\"\n- );\n+ dlg.ImportSettings.ProjectName = argItems[0];\nvar projectLanguage = ProjectLanguage.JavaScript;\nif (int.TryParse(argItems[3], out var langId))\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "diff": "@@ -151,7 +151,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to We won&apos;t move any files, and you can use Save As to move the project file later..\n+ /// Looks up a localized string similar to The project file will be saved in the root of the folder that contains your Node.js code..\n/// </summary>\npublic static string SaveFileLocationHelpText {\nget {\n@@ -160,7 +160,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Select where to save your project file.\n+ /// Looks up a localized string similar to Enter the name for your project.\n/// </summary>\npublic static string SaveFileLocationTitle {\nget {\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "diff": "<value>_Next</value>\n</data>\n<data name=\"SaveFileLocationHelpText\" xml:space=\"preserve\">\n- <value>We won't move any files, and you can use Save As to move the project file later.</value>\n+ <value>The project file will be saved in the root of the folder that contains your Node.js code.</value>\n</data>\n<data name=\"SaveFileLocationTitle\" xml:space=\"preserve\">\n- <value>Select where to save your project file</value>\n+ <value>Enter the name for your project</value>\n</data>\n<data name=\"SaveProjectPageTitle\" xml:space=\"preserve\">\n<value>Save Project</value>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/ImportSettings.cs", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/ImportSettings.cs", "diff": "@@ -45,7 +45,7 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nprivate const string TypeScriptExtensions = \";*.ts;*.tsx\";\nprivate const string JavaScriptExtensions = \";*.js;*.jsx\";\n- private bool isAutoGeneratedProjectPath;\n+ private string ProjectPath => Path.Combine(this.SourcePath, this.ProjectName) + \".njsproj\";\npublic ImportSettings()\n{\n@@ -54,10 +54,10 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nthis.Filters = DefaultLanguageExtensionsFilter;\n}\n- public string ProjectPath\n+ public string ProjectName\n{\n- get { return (string)GetValue(ProjectPathProperty); }\n- set { SetValue(ProjectPathProperty, value); }\n+ get { return (string)GetValue(ProjectNameProperty); }\n+ set { SetValue(ProjectNameProperty, value); }\n}\npublic string SourcePath\n@@ -90,7 +90,13 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nset { SetValue(ProjectLanguageProperty, value); }\n}\n- public static readonly DependencyProperty ProjectPathProperty = DependencyProperty.Register(nameof(ProjectPath), typeof(string), typeof(ImportSettings), new PropertyMetadata(ProjectPath_Updated));\n+ public bool IsValid\n+ {\n+ get { return (bool)GetValue(IsValidProperty); }\n+ private set { SetValue(IsValidPropertyKey, value); }\n+ }\n+\n+ public static readonly DependencyProperty ProjectNameProperty = DependencyProperty.Register(nameof(ProjectName), typeof(string), typeof(ImportSettings), new PropertyMetadata(ProjectName_Updated));\npublic static readonly DependencyProperty SourcePathProperty = DependencyProperty.Register(nameof(SourcePath), typeof(string), typeof(ImportSettings), new PropertyMetadata(SourceOrLanguage_Updated));\npublic static readonly DependencyProperty FiltersProperty = DependencyProperty.Register(nameof(Filters), typeof(string), typeof(ImportSettings), new PropertyMetadata());\nprivate static readonly DependencyPropertyKey TopLevelScriptFilesPropertyKey = DependencyProperty.RegisterReadOnly(nameof(TopLevelScriptFiles), typeof(ObservableCollection<string>), typeof(ImportSettings), new PropertyMetadata());\n@@ -98,12 +104,6 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\npublic static readonly DependencyProperty StartupFileProperty = DependencyProperty.Register(nameof(StartupFile), typeof(string), typeof(ImportSettings), new PropertyMetadata());\npublic static readonly DependencyProperty ProjectLanguageProperty = DependencyProperty.Register(nameof(ProjectLanguage), typeof(ProjectLanguage), typeof(ImportSettings), new PropertyMetadata(SourceOrLanguage_Updated));\n- public bool IsValid\n- {\n- get { return (bool)GetValue(IsValidProperty); }\n- private set { SetValue(IsValidPropertyKey, value); }\n- }\n-\nprivate static void RecalculateIsValid(DependencyObject d, DependencyPropertyChangedEventArgs e)\n{\nif (!d.Dispatcher.CheckAccess())\n@@ -118,11 +118,16 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nd.SetValue(IsValidPropertyKey, false);\nreturn;\n}\n- d.SetValue(IsValidPropertyKey,\n+\n+ // Make sure the project name is not a relative path,\n+ // further validation is handled by checking the whole path.\n+ var isValid = !string.IsNullOrEmpty(s.ProjectName) &&\n+ s.ProjectName.IndexOfAny(new[] { '\\\\', '/' }) < 0 &&\nCommonUtils.IsValidPath(s.SourcePath) &&\nCommonUtils.IsValidPath(s.ProjectPath) &&\n- Directory.Exists(s.SourcePath)\n- );\n+ Directory.Exists(s.SourcePath);\n+\n+ d.SetValue(IsValidPropertyKey, isValid);\n}\nprivate static void SourceOrLanguage_Updated(DependencyObject d, DependencyPropertyChangedEventArgs e)\n@@ -141,12 +146,6 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nreturn;\n}\n- if (string.IsNullOrEmpty(settings.ProjectPath) || settings.isAutoGeneratedProjectPath)\n- {\n- settings.ProjectPath = CommonUtils.GetAvailableFilename(settings.SourcePath, Path.GetFileName(settings.SourcePath), \".njsproj\");\n- settings.isAutoGeneratedProjectPath = true;\n- }\n-\nvar sourcePath = settings.SourcePath;\nif (Directory.Exists(sourcePath))\n{\n@@ -224,12 +223,8 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\n}\n}\n- private static void ProjectPath_Updated(DependencyObject d, DependencyPropertyChangedEventArgs e)\n- {\n- if (d is ImportSettings self)\n+ private static void ProjectName_Updated(DependencyObject d, DependencyPropertyChangedEventArgs e)\n{\n- self.isAutoGeneratedProjectPath = false;\n- }\nRecalculateIsValid(d, e);\n}\n@@ -257,6 +252,29 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nreturn XmlWriter.Create(projectPath, settings);\n}\n+ private static void EnsurePackageJson(string sourcePath, string projectName)\n+ {\n+ var packageJson = Path.Combine(sourcePath, \"package.json\");\n+ if (!File.Exists(packageJson))\n+ {\n+ try\n+ {\n+ File.WriteAllText(packageJson,\n+$@\"{{\n+ \"\"name\"\": \"\"{projectName}\"\",\n+ \"\"version\"\": \"\"0.0.0\"\",\n+ \"\"description\"\": \"\"{projectName}\"\",\n+ \"\"author\"\": {{\n+ \"\"name\"\": \"\"\"\"\n+ }}\n+}}\");\n+ }\n+ catch (Exception exc) when (exc is UnauthorizedAccessException || exc is IOException)\n+ {\n+ }\n+ }\n+ }\n+\npublic string CreateRequestedProject()\n{\nvar task = CreateRequestedProjectAsync();\n@@ -271,6 +289,7 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nvar filters = this.Filters;\nvar startupFile = this.StartupFile;\nvar projectLanguage = this.ProjectLanguage;\n+ var projectName = this.ProjectName;\nreturn Task.Run<string>(() =>\n{\n@@ -278,6 +297,10 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\ntry\n{\nvar typeScriptVersion = GetLatestAvailableTypeScriptVersionFromSetup();\n+\n+ //ensure package.json\n+ EnsurePackageJson(sourcePath, projectName);\n+\nusing (var writer = GetDefaultWriter(projectPath))\n{\nWriteProjectXml(writer, projectPath, sourcePath, filters, startupFile, typeScriptVersion, projectLanguage);\n@@ -346,7 +369,7 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nwriter.WriteElementString(\"SchemaVersion\", \"2.0\");\nwriter.WriteElementString(\"ProjectGuid\", projectGuid.ToString(\"B\"));\n- writer.WriteElementString(\"ProjectHome\", projectHome);\n+ writer.WriteElementString(\"ProjectHome\", string.IsNullOrWhiteSpace(projectHome) ? \".\" : projectHome);\nwriter.WriteElementString(\"ProjectView\", \"ShowAllFiles\");\nif (CommonUtils.IsValidPath(startupFile))\n@@ -511,7 +534,7 @@ namespace Microsoft.NodejsTools.Project.ImportWizard\nprivate static IEnumerable<string> EnumerateAllFiles(string source, string filters, ProjectLanguage language)\n{\nvar files = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n- var patterns = filters.Split(';').Concat(new[] { \"*.js\" }).Select(p => p.Trim()).ToArray();\n+ var patterns = filters.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToArray();\nvar directories = new List<string>() { source };\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/SaveProjectPage.xaml", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/SaveProjectPage.xaml", "diff": "mc:Ignorable=\"d\"\nd:DesignHeight=\"300\" d:DesignWidth=\"500\"\nTitle=\"{x:Static resx:ImportWizardResources.SaveProjectPageTitle}\"\n- FocusManager.FocusedElement=\"{Binding ElementName=ProjectPathTextBox}\">\n+ FocusManager.FocusedElement=\"{Binding ElementName=ProjectNameTextBox}\">\n<Page.Resources>\n<ResourceDictionary Source=\"ImportWizardDictionary.xaml\" />\n<wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.SaveFileLocationTitle}\"\nHelpText=\"{x:Static resx:ImportWizardResources.SaveFileLocationHelpText}\"\nGrid.Row=\"0\">\n- <Grid>\n- <Grid.ColumnDefinitions>\n- <ColumnDefinition Width=\"*\" />\n- <ColumnDefinition Width=\"auto\"/>\n- </Grid.ColumnDefinitions>\n- <Grid.RowDefinitions>\n- <RowDefinition Height=\"auto\" />\n- </Grid.RowDefinitions>\n- <TextBox Grid.Column=\"0\" Text=\"{Binding Path=ProjectPath,Mode=TwoWay}\" Name=\"ProjectPathTextBox\" />\n- <Button Grid.Column=\"1\" Style=\"{StaticResource BrowseSaveFileButton}\"\n- CommandParameter=\"Node.js Project Files (*.njsproj)|*.njsproj|All Files (*.*)|*.*\"\n- CommandTarget=\"{Binding ElementName=ProjectPathTextBox}\" />\n- </Grid>\n+ <TextBox Grid.Column=\"0\" Text=\"{Binding Path=ProjectName,Mode=TwoWay}\" Name=\"ProjectNameTextBox\" />\n</wpf:LabelledControl>\n</Grid>\n</Page>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Ensure the project file is saved next to the source files Saving the project file in a separate folder from the actual source files causes a whole range of isses, this is caused by the assumption in the LS that the workingdir is the project dir.
410,217
01.02.2018 17:15:00
28,800
6013cd8354031281de4a8ed9704e374615f627c7
Fix accessibility bugs in From Existing Code wizard This fixes all accessibility bugs in the from existing code wizard
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "diff": "@@ -69,6 +69,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Browse to the folder containing your Node.js code.\n+ /// </summary>\n+ public static string BrowseNodeCodeAccessibleName {\n+ get {\n+ return ResourceManager.GetString(\"BrowseNodeCodeAccessibleName\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to _Cancel.\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "diff": "<data name=\"BackButtonLabel\" xml:space=\"preserve\">\n<value>_Back</value>\n</data>\n+ <data name=\"BrowseNodeCodeAccessibleName\" xml:space=\"preserve\">\n+ <value>Browse to the folder containing your Node.js code</value>\n+ </data>\n<data name=\"CancelButtonLabel\" xml:space=\"preserve\">\n<value>_Cancel</value>\n</data>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/FileSourcePage.xaml", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/FileSourcePage.xaml", "diff": "xmlns:resx=\"clr-namespace:Microsoft.NodejsTools\"\nmc:Ignorable=\"d\"\nd:DesignHeight=\"300\" d:DesignWidth=\"500\"\n- Title=\"{x:Static resx:ImportWizardResources.SourceFilesPageTitle}\"\n- FocusManager.FocusedElement=\"{Binding ElementName=SourcePathTextBox}\">\n+ Title=\"{x:Static resx:ImportWizardResources.SourceFilesPageTitle}\">\n<Page.Resources>\n<ResourceDictionary Source=\"ImportWizardDictionary.xaml\" />\n</Page.Resources>\nSelectionMode=\"Single\"\nSelectedItem=\"{Binding StartupFile,Mode=TwoWay}\"\nScrollViewer.HorizontalScrollBarVisibility=\"Auto\"\n- ScrollViewer.VerticalScrollBarVisibility=\"Disabled\">\n+ ScrollViewer.VerticalScrollBarVisibility=\"Disabled\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.F5FileSelectTitle}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.F5FileSelectHelpText}\">\n<ListView.ItemsPanel>\n<ItemsPanelTemplate>\n<WrapPanel Orientation=\"Vertical\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/SaveProjectPage.xaml", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/SaveProjectPage.xaml", "diff": "<wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.SaveFileLocationTitle}\"\nHelpText=\"{x:Static resx:ImportWizardResources.SaveFileLocationHelpText}\"\nGrid.Row=\"0\">\n- <TextBox Grid.Column=\"0\" Text=\"{Binding Path=ProjectName,Mode=TwoWay}\" Name=\"ProjectNameTextBox\" />\n+ <TextBox Grid.Column=\"0\" Text=\"{Binding Path=ProjectName,Mode=TwoWay}\" Name=\"ProjectNameTextBox\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.SaveFileLocationTitle}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.SaveFileLocationHelpText}\" />\n</wpf:LabelledControl>\n</Grid>\n</Page>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/StartupPage.xaml", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/StartupPage.xaml", "diff": "<Grid.RowDefinitions>\n<RowDefinition Height=\"auto\" />\n</Grid.RowDefinitions>\n- <TextBox Grid.Column=\"0\" Text=\"{Binding Path=SourcePath,Mode=TwoWay}\" Name=\"SourcePathTextBox\" />\n- <Button Grid.Column=\"1\" Style=\"{StaticResource BrowseFolderButton}\" CommandTarget=\"{Binding ElementName=SourcePathTextBox}\" />\n+ <TextBox Grid.Column=\"0\" Text=\"{Binding Path=SourcePath,Mode=TwoWay}\" Name=\"SourcePathTextBox\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.SelectNodeCodeTitle}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.SelectNodeCodeHelpText}\"/>\n+ <Button Grid.Column=\"1\" Style=\"{StaticResource BrowseFolderButton}\" CommandTarget=\"{Binding ElementName=SourcePathTextBox}\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.BrowseNodeCodeAccessibleName}\"/>\n</Grid>\n</wpf:LabelledControl>\n<wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.LanguageTitle}\"\nGrid.Row=\"1\">\n- <StackPanel Margin=\"3\">\n+ <StackPanel Margin=\"3\" AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.LanguageTitle}\">\n<RadioButton Name=\"JavaScriptRadioButton\" GroupName=\"LanguageGroup\" IsChecked=\"{Binding Path=ProjectLanguage,\n- Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=JavaScript}\">\n+ Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=JavaScript}\" AutomationProperties.LabeledBy=\"{Binding ElementName=JavaScriptLabel}\">\n<StackPanel>\n- <TextBlock>JavaScript</TextBlock>\n+ <TextBlock Name=\"JavaScriptLabel\">JavaScript</TextBlock>\n<TextBlock Text=\"{x:Static resx:ImportWizardResources.JavaScriptHelpText}\" Foreground=\"{DynamicResource {x:Static wpf:Controls.GrayTextKey}}\" />\n</StackPanel>\n</RadioButton>\n<RadioButton Name=\"TypeScriptRadioButton\" GroupName=\"LanguageGroup\" IsChecked=\"{Binding Path=ProjectLanguage,\n- Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=TypeScript}\">\n+ Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=TypeScript}\" AutomationProperties.LabeledBy=\"{Binding ElementName=TypeScriptLabel}\">\n<StackPanel>\n- <TextBlock>TypeScriptScript</TextBlock>\n+ <TextBlock Name=\"TypeScriptLabel\">TypeScript</TextBlock>\n<TextBlock Text=\"{x:Static resx:ImportWizardResources.TypeScriptHelpText}\" Foreground=\"{DynamicResource {x:Static wpf:Controls.GrayTextKey}}\" />\n</StackPanel>\n</RadioButton>\n<wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.FileFilterTitle}\"\nHelpText=\"{x:Static resx:ImportWizardResources.FileFilterHelpText}\"\nGrid.Row=\"2\">\n- <TextBox Text=\"{Binding Path=Filters,Mode=TwoWay}\" />\n+ <TextBox Text=\"{Binding Path=Filters,Mode=TwoWay}\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.FileFilterTitle}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.FileFilterHelpText}\" />\n</wpf:LabelledControl>\n</Grid>\n</Page>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix accessibility bugs in From Existing Code wizard This fixes all accessibility bugs in the from existing code wizard
410,217
05.02.2018 14:19:58
28,800
4cfa99a2daa274179f4b3ee93003879c6789831e
Fix accessiblity for language selection Since you can't set a header for a radiobutton list, I made each radionbutton self explanatory in the accessibilty case.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.Designer.cs", "diff": "@@ -132,6 +132,24 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Created project targets JavaScript..\n+ /// </summary>\n+ public static string FromExistingJavaScriptAccessibleName {\n+ get {\n+ return ResourceManager.GetString(\"FromExistingJavaScriptAccessibleName\", resourceCulture);\n+ }\n+ }\n+\n+ /// <summary>\n+ /// Looks up a localized string similar to Created project targets TypeScript..\n+ /// </summary>\n+ public static string FromExistingTypeScriptAccessibleName {\n+ get {\n+ return ResourceManager.GetString(\"FromExistingTypeScriptAccessibleName\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Files with a &apos;.js&apos;, or a &apos;.jsx&apos; extension, and &apos;jsconfig.json&apos; are automatically included..\n/// </summary>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "new_path": "Nodejs/Product/Nodejs/ImportWizardResources.resx", "diff": "<data name=\"FinishButtonLabel\" xml:space=\"preserve\">\n<value>_Finish</value>\n</data>\n+ <data name=\"FromExistingJavaScriptAccessibleName\" xml:space=\"preserve\">\n+ <value>Created project targets JavaScript.</value>\n+ </data>\n+ <data name=\"FromExistingTypeScriptAccessibleName\" xml:space=\"preserve\">\n+ <value>Created project targets TypeScript.</value>\n+ </data>\n<data name=\"JavaScriptHelpText\" xml:space=\"preserve\">\n<value>Files with a '.js', or a '.jsx' extension, and 'jsconfig.json' are automatically included.</value>\n</data>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/StartupPage.xaml", "new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/StartupPage.xaml", "diff": "</Grid>\n</wpf:LabelledControl>\n- <wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.LanguageTitle}\"\n- Grid.Row=\"1\">\n- <StackPanel Margin=\"3\" AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.LanguageTitle}\">\n+ <wpf:LabelledControl Title=\"{x:Static resx:ImportWizardResources.LanguageTitle}\" Grid.Row=\"1\">\n+ <StackPanel Margin=\"3\">\n<RadioButton Name=\"JavaScriptRadioButton\" GroupName=\"LanguageGroup\" IsChecked=\"{Binding Path=ProjectLanguage,\n- Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=JavaScript}\" AutomationProperties.LabeledBy=\"{Binding ElementName=JavaScriptLabel}\">\n+ Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=JavaScript}\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.FromExistingJavaScriptAccessibleName}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.JavaScriptHelpText}\">\n<StackPanel>\n<TextBlock Name=\"JavaScriptLabel\">JavaScript</TextBlock>\n<TextBlock Text=\"{x:Static resx:ImportWizardResources.JavaScriptHelpText}\" Foreground=\"{DynamicResource {x:Static wpf:Controls.GrayTextKey}}\" />\n</RadioButton>\n<RadioButton Name=\"TypeScriptRadioButton\" GroupName=\"LanguageGroup\" IsChecked=\"{Binding Path=ProjectLanguage,\n- Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=TypeScript}\" AutomationProperties.LabeledBy=\"{Binding ElementName=TypeScriptLabel}\">\n+ Mode=TwoWay, Converter={StaticResource projectLanguageBoolConverter}, ConverterParameter=TypeScript}\"\n+ AutomationProperties.Name=\"{x:Static resx:ImportWizardResources.FromExistingTypeScriptAccessibleName}\"\n+ AutomationProperties.HelpText=\"{x:Static resx:ImportWizardResources.TypeScriptHelpText}\">\n<StackPanel>\n<TextBlock Name=\"TypeScriptLabel\">TypeScript</TextBlock>\n<TextBlock Text=\"{x:Static resx:ImportWizardResources.TypeScriptHelpText}\" Foreground=\"{DynamicResource {x:Static wpf:Controls.GrayTextKey}}\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix accessiblity for language selection Since you can't set a header for a radiobutton list, I made each radionbutton self explanatory in the accessibilty case.
410,217
05.02.2018 15:06:48
28,800
38b1237e80c9eed265d46b076d9fa06a973c7980
Fix null reference in project properties
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -1881,7 +1881,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\n- var prop = this.userBuildProject.GetProperty(propertyName);\n+ var prop = this.userBuildProject?.GetProperty(propertyName);\nif (prop != null)\n{\nthis.buildProject.SetProperty(prop.Name, prop.UnevaluatedValue);\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix null reference in project properties
410,217
13.02.2018 10:37:30
28,800
22010f2895c29f6fc01b4675ceb135ded9c61fd2
Make sure `out _` is correct.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodeModulesNode.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodeModulesNode.cs", "diff": "@@ -520,7 +520,7 @@ namespace Microsoft.NodejsTools.Project\nvar packageJsonLockFileName = Path.Combine(rootPath, \"package-lock.json\");\nvar queryEditService = (IVsQueryEditQuerySave2)this.projectNode.GetService(typeof(SVsQueryEditQuerySave));\n- var hr = queryEditService.QueryEditFiles((uint)tagVSQueryEditFlags.QEF_DisallowInMemoryEdits, 1, new[] { packageJsonFileName, packageJsonLockFileName }, null, null, out var result, out var _);\n+ var hr = queryEditService.QueryEditFiles((uint)tagVSQueryEditFlags.QEF_DisallowInMemoryEdits, 1, new[] { packageJsonFileName, packageJsonLockFileName }, null, null, out var result, out _);\nreturn ErrorHandler.Succeeded(hr) && result == (uint)tagVSQueryEditResult.QER_EditOK;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs", "diff": "@@ -242,7 +242,7 @@ namespace Microsoft.NodejsTools.Repl\nRedirectStandardError = true,\nRedirectStandardOutput = true\n};\n- if (this.site.TryGetStartupFileAndDirectory(out var _, out var directory))\n+ if (this.site.TryGetStartupFileAndDirectory(out _, out var directory))\n{\npsi.WorkingDirectory = directory;\npsi.EnvironmentVariables[\"NODE_PATH\"] = directory;\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -565,7 +565,7 @@ namespace Microsoft.VisualStudioTools.Project\nRemoveSubTree(child);\n}\nnode.Parent.RemoveChild(node);\n- this.DiskNodes.TryRemove(node.Url, out var _);\n+ this.DiskNodes.TryRemove(node.Url, out _);\n}\nprivate static string GetFinalPathName(string dir)\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyNode.cs", "diff": "@@ -1114,10 +1114,10 @@ namespace Microsoft.VisualStudioTools.Project\nErrorHandler.ThrowOnFailure(pRdt.GetDocumentInfo(\ncookie[0],\n- out var _,\n- out var _,\n- out var _,\n- out var _,\n+ out _,\n+ out _,\n+ out _,\n+ out _,\nout var srpHier,\nout itemid,\nout var ppunkDocData));\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -2910,7 +2910,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.buildProject.FullPath = newFileName;\n- this.DiskNodes.TryRemove(this.filename, out var _);\n+ this.DiskNodes.TryRemove(this.filename, out _);\nthis.filename = newFileName;\nthis.DiskNodes[this.filename] = this;\n@@ -3562,7 +3562,7 @@ namespace Microsoft.VisualStudioTools.Project\nflags, // no per file flags\nattributes, // no per file file attributes\nout var verdict,\n- out var _ // ignore additional results\n+ out _ // ignore additional results\n);\nvar qer = (tagVSQueryEditResult)verdict;\n@@ -6523,7 +6523,7 @@ If the files in the existing folder have the same names as files in the folder y\nif (deletedItem is IDiskBasedNode diskNode)\n{\n- this.DiskNodes.TryRemove(diskNode.Url, out var _);\n+ this.DiskNodes.TryRemove(diskNode.Url, out _);\n}\nthis.RaiseItemDeleted(deletedItem);\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestMethodResolver.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestMethodResolver.cs", "diff": "@@ -61,9 +61,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n(uint)_VSRDTFLAGS.RDT_NoLock,\nfilePath,\nout hierarchy,\n- out var _,\n+ out _,\nout docData,\n- out var _);\n+ out _);\nErrorHandler.ThrowOnFailure(hr);\n}\nfinally\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make sure `out _` is correct.
410,217
15.02.2018 14:05:43
28,800
9108f89c35e846b6107718a561c5de69a486c0f5
Distinguish telemetry between in project and open folder.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs", "diff": "@@ -312,7 +312,7 @@ namespace Microsoft.NodejsTools.NpmUI\n{\nvar selectedVersion = this.SelectedVersion is SemverVersion ? ((SemverVersion)this.SelectedVersion).ToString() : string.Empty;\n- TelemetryHelper.LogInstallNpmPackage();\n+ TelemetryHelper.LogInstallNpmPackage(this.npmController.IsProject);\nthis.npmWorker.QueueCommand(\nNpmArgumentBuilder.GetNpmInstallArguments(\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmWorker.cs", "diff": "@@ -75,7 +75,7 @@ namespace Microsoft.NodejsTools.NpmUI\ncmdr.CommandCompleted += Cmdr_CommandCompleted;\ntry\n{\n- cmdr.ExecuteNpmCommandAsync(info.Arguments).Wait();\n+ cmdr.ExecuteNpmCommandAsync(info.Arguments, showConsole: false).Wait();\n}\ncatch (AggregateException e) when (e.InnerException is TaskCanceledException)\n{\n@@ -125,7 +125,7 @@ namespace Microsoft.NodejsTools.NpmUI\nreturn Enumerable.Empty<IPackage>();\n}\n- TelemetryHelper.LogSearchNpm();\n+ TelemetryHelper.LogSearchNpm(this.npmController.IsProject);\nif (filterText.Length == 1)\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Telemetry/TelemetryHelper.cs", "new_path": "Nodejs/Product/Nodejs/Telemetry/TelemetryHelper.cs", "diff": "@@ -18,35 +18,46 @@ namespace Microsoft.NodejsTools.Telemetry\npublic static void LogDebuggingStarted(string debuggerName, string nodeVersion, bool isProject = true)\n{\n- if (TelemetryService.DefaultSession != null)\n- {\n- var userTask = new UserTaskEvent(DebbugerStarted, TelemetryResult.Success);\n- userTask.Properties[DebuggerEngine] = debuggerName;\n- userTask.Properties[NodeVersion] = nodeVersion;\n- userTask.Properties[IsProject] = isProject;\n-\n- TelemetryService.DefaultSession.PostEvent(userTask);\n- }\n+ LogUserTaskEvent(DebbugerStarted, (DebuggerEngine, debuggerName), (NodeVersion, nodeVersion), (IsProject, isProject));\n}\n- public static void LogSearchNpm()\n+ public static void LogSearchNpm(bool isProject)\n{\n- TelemetryService.DefaultSession?.PostUserTask(SearchNpm, TelemetryResult.Success);\n+ LogUserTaskEvent(SearchNpm, isProject);\n}\n- public static void LogInstallNpmPackage()\n+ public static void LogInstallNpmPackage(bool isProject)\n{\n- TelemetryService.DefaultSession?.PostUserTask(InstallNpm, TelemetryResult.Success);\n+ LogUserTaskEvent(InstallNpm, isProject);\n}\n- public static void LogUnInstallNpmPackage()\n+ public static void LogUnInstallNpmPackage(bool isProject)\n{\n- TelemetryService.DefaultSession?.PostUserTask(UnInstallNpm, TelemetryResult.Success);\n+ LogUserTaskEvent(UnInstallNpm, isProject);\n}\npublic static void LogReplUse()\n{\nTelemetryService.DefaultSession?.PostUserTask(UsedRepl, TelemetryResult.Success);\n}\n+\n+ private static void LogUserTaskEvent(string eventName, bool isProject)\n+ {\n+ LogUserTaskEvent(eventName, (IsProject, isProject));\n+ }\n+\n+ private static void LogUserTaskEvent(string eventName, params (string PropertName, object Value)[] args)\n+ {\n+ if (TelemetryService.DefaultSession != null)\n+ {\n+ var userTask = new UserTaskEvent(DebbugerStarted, TelemetryResult.Success);\n+ foreach (var (PropertName, Value) in args)\n+ {\n+ userTask.Properties[PropertName] = Value;\n+ }\n+\n+ TelemetryService.DefaultSession.PostEvent(userTask);\n+ }\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "diff": "@@ -155,13 +155,12 @@ namespace Microsoft.NodejsTools.Workspace\nvar filePath = ((IFileNode)node).FullPath;\nif (TryGetCommand(nCmdID, filePath, out var commandName))\n{\n- var npmPath = NpmHelpers.GetPathToNpm();\n- await NpmWorker.ExecuteNpmCommandAsync(\n- npmPath,\n- executionDirectory: Path.GetDirectoryName(filePath),\n- arguments: new[] { \"run-script\", commandName },\n- visible: true); // show the CMD window\n+ using (var npmController = this.CreateController(node.Workspace))\n+ using (var commander = npmController.CreateNpmCommander())\n+ {\n+ await commander.ExecuteNpmCommandAsync($\"run-script {commandName}\", showConsole: true);\n+ }\n}\n}\n@@ -274,7 +273,8 @@ namespace Microsoft.NodejsTools.Workspace\nvar npmController = NpmControllerFactory.Create(\nprojectHome,\n- NodejsConstants.NpmCachePath);\n+ NodejsConstants.NpmCachePath,\n+ isProject: false);\nnpmController.ErrorLogged += this.WriteNpmOutput;\nnpmController.ExceptionLogged += this.WriteNpmException;\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Npm/SPI/NpmController.cs", "new_path": "Nodejs/Product/Npm/SPI/NpmController.cs", "diff": "@@ -29,9 +29,11 @@ namespace Microsoft.NodejsTools.Npm.SPI\npublic NpmController(\nstring fullPathToRootPackageDirectory,\nstring cachePath,\n+ bool isProject,\nbool showMissingDevOptionalSubPackages = false,\nINpmPathProvider npmPathProvider = null)\n{\n+ this.IsProject = isProject;\nthis.fullPathToRootPackageDirectory = fullPathToRootPackageDirectory;\nthis.cachePath = cachePath;\nthis.showMissingDevOptionalSubPackages = showMissingDevOptionalSubPackages;\n@@ -46,6 +48,8 @@ namespace Microsoft.NodejsTools.Npm.SPI\ncatch (NpmNotFoundException) { }\n}\n+ public bool IsProject { get; }\n+\ninternal string FullPathToRootPackageDirectory\n{\nget { return this.fullPathToRootPackageDirectory; }\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Distinguish telemetry between in project and open folder.
410,217
21.02.2018 13:42:58
28,800
4a2e9a97cbd2b4379e77e1d5553047a9bb317ec3
Improve error, when test name is invalid
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/NodejsTestInfo.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/NodejsTestInfo.cs", "diff": "@@ -11,7 +11,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nvar parts = fullyQualifiedName.Split(new[] { \"::\" }, StringSplitOptions.None);\nif (parts.Length != 3)\n{\n- throw new ArgumentException(\"Invalid fully qualified test name\", nameof(fullyQualifiedName));\n+ throw new ArgumentException($\"Invalid fully qualified test name. '{fullyQualifiedName}'\", nameof(fullyQualifiedName));\n}\nthis.ModulePath = parts[0];\nthis.TestName = parts[1];\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Improve error, when test name is invalid
410,217
26.02.2018 15:46:50
28,800
8fbd8c1747cac9585fa5788c3dc3d42ccedfe826
Fix null reference in build
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs", "diff": "@@ -171,10 +171,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\nprivate MSBuild.ProjectCollection buildEngine;\n- private IDEBuildLogger buildLogger;\n-\n- private bool useProvidedLogger;\n-\nprivate MSBuild.Project buildProject;\nprivate MSBuild.Project userBuildProject;\n@@ -604,18 +600,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// <summary>\n/// Gets or sets the build logger.\n/// </summary>\n- protected IDEBuildLogger BuildLogger\n- {\n- get\n- {\n- return this.buildLogger;\n- }\n- set\n- {\n- this.buildLogger = value;\n- this.useProvidedLogger = value != null;\n- }\n- }\n+ protected IDEBuildLogger BuildLogger { get; set; }\n/// <summary>\n/// Gets the taskprovider.\n@@ -1001,11 +986,11 @@ namespace Microsoft.VisualStudioTools.Project\nSetBuildProject(null);\n}\n- this.BuildLogger = null;\nif (this.BuildLogger is IDisposable logger)\n{\nlogger.Dispose();\n}\n+ this.BuildLogger = null;\nvar tasks = this.taskProvider;\nthis.taskProvider = null;\n@@ -2577,24 +2562,22 @@ namespace Microsoft.VisualStudioTools.Project\nprotected virtual void SetOutputLogger(IVsOutputWindowPane output)\n{\n// Create our logger, if it was not specified\n- if (!this.useProvidedLogger || this.buildLogger == null)\n+ if (this.BuildLogger == null)\n{\n// Create the logger\n- var logger = new IDEBuildLogger(output, this.TaskProvider, GetOuterInterface<IVsHierarchy>());\n- logger.ErrorString = this.ErrorString;\n- logger.WarningString = this.WarningString;\n- this.BuildLogger = logger;\n- if (this.BuildLogger is IDisposable oldLogger)\n+ var logger = new IDEBuildLogger(output, this.TaskProvider, GetOuterInterface<IVsHierarchy>())\n{\n- oldLogger.Dispose();\n- }\n+ ErrorString = this.ErrorString,\n+ WarningString = this.WarningString\n+ };\n+ this.BuildLogger = logger;\n}\nelse\n{\nthis.BuildLogger.OutputWindowPane = output;\n}\n- this.buildLogger.RefreshVerbosity();\n+ this.BuildLogger.RefreshVerbosity();\n}\n/// <summary>\n@@ -2659,7 +2642,7 @@ namespace Microsoft.VisualStudioTools.Project\nsubmission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData);\nif (accessor != null)\n{\n- ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.buildLogger));\n+ ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n}\nvar buildResult = submission.Execute();\n@@ -2716,16 +2699,16 @@ namespace Microsoft.VisualStudioTools.Project\nvar submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData);\ntry\n{\n- if (this.useProvidedLogger && this.buildLogger != null)\n+ if (this.BuildLogger != null)\n{\n- ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.buildLogger));\n+ ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n}\nsubmission.ExecuteAsync(sub =>\n{\nthis.Site.GetUIThread().Invoke(() =>\n{\n- var ideLogger = this.buildLogger;\n+ var ideLogger = this.BuildLogger;\nif (ideLogger != null)\n{\nideLogger.FlushBuildOutput();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix null reference in build
410,217
27.02.2018 12:44:43
28,800
d6672fed09ebb52c5bbef60dc9e681c704e48109
Make Guid strings uniform
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Guids.cs", "new_path": "Nodejs/Product/Nodejs/Guids.cs", "diff": "@@ -8,29 +8,29 @@ namespace Microsoft.NodejsTools\n{\ninternal static class Guids\n{\n- public const string NodejsPackageString = \"FE8A8C3D-328A-476D-99F9-2A24B75F8C7F\";\n- public const string NodejsCmdSetString = \"695e37e2-c6df-4e0a-8833-f688e4c65f1f\";\n+ public const string NodejsPackageString = \"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\";\n+ public const string NodejsCmdSetString = \"{695e37e2-c6df-4e0a-8833-f688e4c65f1f}\";\npublic const string NodejsDebugLanguageString = \"{65791609-BA29-49CF-A214-DBFF8AEC3BC2}\";\n- public const string NodejsNpmCmdSetString = \"9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA\";\n+ public const string NodejsNpmCmdSetString = \"{9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA}\";\npublic const string NodeToolsWorkspaceCmdSetString = \"{0D701F33-94A3-421C-9865-6F65E7E4B689}\";\n- public const string NodejsProjectFactoryString = \"3AF33F2E-1136-4D97-BBB7-1795711AC8B8\";\n- public const string NodejsBaseProjectFactoryString = \"9092AA53-FB77-4645-B42D-1CCCA6BD08BD\";\n- public const string TypeScriptLanguageInfoString = \"4a0dddb5-7a95-4fbf-97cc-616d07737a77\";\n- public const string TypeScriptDebuggerLanguageInfoString = \"87bdf188-e6e8-4fcf-a82a-9b8506e01847\";\n- public const string JadeEditorFactoryString = \"6CB69EF8-1329-4DC0-84B4-FA134EA59BE3\";\n+ public const string NodejsProjectFactoryString = \"{3AF33F2E-1136-4D97-BBB7-1795711AC8B8}\";\n+ public const string NodejsBaseProjectFactoryString = \"{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}\";\n+ public const string TypeScriptLanguageInfoString = \"{4a0dddb5-7a95-4fbf-97cc-616d07737a77}\";\n+ public const string TypeScriptDebuggerLanguageInfoString = \"{87bdf188-e6e8-4fcf-a82a-9b8506e01847}\";\n+ public const string JadeEditorFactoryString = \"{6CB69EF8-1329-4DC0-84B4-FA134EA59BE3}\";\npublic const string DefaultLanguageServiceString = \"{8239BEC4-EE87-11D0-8C98-00C04FC2AB22}\";\npublic static readonly Guid DefaultLanguageService = new Guid(DefaultLanguageServiceString);\n//Guid for our formatting service\n- internal const string JavaScriptFormattingServiceString = \"F414C260-6AC0-11CF-B6D1-00AA00BBBB58\";\n+ internal const string JavaScriptFormattingServiceString = \"{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}\";\npublic const string ScriptDebugLanguageString = \"{F7FA31DA-C32A-11D0-B442-00A0244A1DD2}\";\n// Debug guids\n- public const string DebugEngine = \"FC5B45BA-5B9C-46EA-887A-82073AE065FE\";\n- public const string DebugProgramProvider = \"472CD331-218C-451E-929E-98C9408F11DD\";\n- public const string RemoteDebugPortSupplier = \"A241707C-7DB3-464F-8D3E-F3D33E86AE99\";\n+ public const string DebugEngine = \"{FC5B45BA-5B9C-46EA-887A-82073AE065FE}\";\n+ public const string DebugProgramProvider = \"{472CD331-218C-451E-929E-98C9408F11DD}\";\n+ public const string RemoteDebugPortSupplier = \"{A241707C-7DB3-464F-8D3E-F3D33E86AE99}\";\npublic static readonly Guid NodejsBaseProjectFactory = new Guid(NodejsBaseProjectFactoryString);\npublic static readonly Guid NodejsCmdSet = new Guid(NodejsCmdSetString);\n@@ -43,11 +43,11 @@ namespace Microsoft.NodejsTools\npublic static readonly Guid ScriptDebugLanguage = new Guid(ScriptDebugLanguageString);\n- public static readonly Guid VenusCommandId = new Guid(\"c7547851-4e3a-4e5b-9173-fa6e9c8bd82c\");\n- public static readonly Guid Eureka = new Guid(\"30947ebe-9147-45f9-96cf-401bfc671a82\"); // Microsoft.VisualStudio.Web.Eureka.dll package, includes page inspector\n- public static readonly Guid WebPackageCommandId = new Guid(\"822e3603-e573-47d2-acf0-520e4ce641c2\");\n- public static readonly Guid WebPackage = new Guid(\"d9a342d1-a429-4059-808a-e55ee6351f7f\");\n- public static readonly Guid WebAppCmdId = new Guid(\"CB26E292-901A-419c-B79D-49BD45C43929\");\n+ public static readonly Guid VenusCommandId = new Guid(\"{c7547851-4e3a-4e5b-9173-fa6e9c8bd82c}\");\n+ public static readonly Guid Eureka = new Guid(\"{30947ebe-9147-45f9-96cf-401bfc671a82}\"); // Microsoft.VisualStudio.Web.Eureka.dll package, includes page inspector\n+ public static readonly Guid WebPackageCommandId = new Guid(\"{822e3603-e573-47d2-acf0-520e4ce641c2}\");\n+ public static readonly Guid WebPackage = new Guid(\"{d9a342d1-a429-4059-808a-e55ee6351f7f}\");\n+ public static readonly Guid WebAppCmdId = new Guid(\"{CB26E292-901A-419c-B79D-49BD45C43929}\");\npublic static readonly Guid VsUIHierarchyWindow = new Guid(\"{7D960B07-7AF8-11D0-8E5E-00A0C911005A}\");\n@@ -60,17 +60,20 @@ namespace Microsoft.NodejsTools\npublic static readonly Guid NuGetManagerCmdSet = new Guid(\"{25fd982b-8cae-4cbd-a440-e03ffccde106}\");\n// UWP project flavor guid\n- public const string NodejsUwpProjectFlavor = \"00251F00-BA30-4CE4-96A2-B8A1085F37AA\";\n+ public const string NodejsUwpProjectFlavor = \"{00251F00-BA30-4CE4-96A2-B8A1085F37AA}\";\n// Workspace guids\npublic const string PackageJsonContextTypeString = \"{78F43160-2968-4FCA-8829-7E30E9B610CF}\";\npublic readonly static Guid PackageJsonContextType = new Guid(PackageJsonContextTypeString);\n+ public const string TypeScriptContextTypeString = \"{0E78FB31-F2A2-4AB8-A93D-1D123B3F677B}\";\n+ public readonly static Guid TypeScriptContextType = new Guid(TypeScriptContextTypeString);\n+\npublic const string WorkspaceExplorerDebugActionCmdSetString = \"{5ea148a6-40af-4ff2-ab0f-60ed173c9f98}\";\npublic readonly static Guid WorkspaceExplorerDebugActionCmdSet = new Guid(WorkspaceExplorerDebugActionCmdSetString);\n// Interactive window guids\n- public const string NodejsInteractiveWindowString = \"2153A414-267E-4731-B891-E875ADBA1993\";\n+ public const string NodejsInteractiveWindowString = \"{2153A414-267E-4731-B891-E875ADBA1993}\";\npublic static readonly Guid NodejsInteractiveWindow = new Guid(NodejsInteractiveWindowString);\n};\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Make Guid strings uniform
410,217
27.02.2018 12:54:53
28,800
f5f47b13ed4221dc5fbd6f997f885e1b8bdc4484
remove '{' and '}'
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Guids.cs", "new_path": "Nodejs/Product/Nodejs/Guids.cs", "diff": "@@ -8,29 +8,32 @@ namespace Microsoft.NodejsTools\n{\ninternal static class Guids\n{\n- public const string NodejsPackageString = \"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\";\n- public const string NodejsCmdSetString = \"{695e37e2-c6df-4e0a-8833-f688e4c65f1f}\";\n- public const string NodejsDebugLanguageString = \"{65791609-BA29-49CF-A214-DBFF8AEC3BC2}\";\n- public const string NodejsNpmCmdSetString = \"{9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA}\";\n- public const string NodeToolsWorkspaceCmdSetString = \"{0D701F33-94A3-421C-9865-6F65E7E4B689}\";\n- public const string NodejsProjectFactoryString = \"{3AF33F2E-1136-4D97-BBB7-1795711AC8B8}\";\n- public const string NodejsBaseProjectFactoryString = \"{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}\";\n- public const string TypeScriptLanguageInfoString = \"{4a0dddb5-7a95-4fbf-97cc-616d07737a77}\";\n- public const string TypeScriptDebuggerLanguageInfoString = \"{87bdf188-e6e8-4fcf-a82a-9b8506e01847}\";\n- public const string JadeEditorFactoryString = \"{6CB69EF8-1329-4DC0-84B4-FA134EA59BE3}\";\n- public const string DefaultLanguageServiceString = \"{8239BEC4-EE87-11D0-8C98-00C04FC2AB22}\";\n+ // note: When you use a guid in a GuidAttribute it can not have '{' and '}'. The compiler doesn't like that.\n+ // So we prefer to have no braces in any Guid strings.\n+\n+ public const string NodejsPackageString = \"FE8A8C3D-328A-476D-99F9-2A24B75F8C7F\";\n+ public const string NodejsCmdSetString = \"695e37e2-c6df-4e0a-8833-f688e4c65f1f\";\n+ public const string NodejsDebugLanguageString = \"65791609-BA29-49CF-A214-DBFF8AEC3BC2\";\n+ public const string NodejsNpmCmdSetString = \"9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA\";\n+ public const string NodeToolsWorkspaceCmdSetString = \"0D701F33-94A3-421C-9865-6F65E7E4B689\";\n+ public const string NodejsProjectFactoryString = \"3AF33F2E-1136-4D97-BBB7-1795711AC8B8\";\n+ public const string NodejsBaseProjectFactoryString = \"9092AA53-FB77-4645-B42D-1CCCA6BD08BD\";\n+ public const string TypeScriptLanguageInfoString = \"4a0dddb5-7a95-4fbf-97cc-616d07737a77\";\n+ public const string TypeScriptDebuggerLanguageInfoString = \"87bdf188-e6e8-4fcf-a82a-9b8506e01847\";\n+ public const string JadeEditorFactoryString = \"6CB69EF8-1329-4DC0-84B4-FA134EA59BE3\";\n+ public const string DefaultLanguageServiceString = \"8239BEC4-EE87-11D0-8C98-00C04FC2AB22\";\npublic static readonly Guid DefaultLanguageService = new Guid(DefaultLanguageServiceString);\n//Guid for our formatting service\n- internal const string JavaScriptFormattingServiceString = \"{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}\";\n+ internal const string JavaScriptFormattingServiceString = \"F414C260-6AC0-11CF-B6D1-00AA00BBBB58\";\n- public const string ScriptDebugLanguageString = \"{F7FA31DA-C32A-11D0-B442-00A0244A1DD2}\";\n+ public const string ScriptDebugLanguageString = \"F7FA31DA-C32A-11D0-B442-00A0244A1DD2\";\n// Debug guids\n- public const string DebugEngine = \"{FC5B45BA-5B9C-46EA-887A-82073AE065FE}\";\n- public const string DebugProgramProvider = \"{472CD331-218C-451E-929E-98C9408F11DD}\";\n- public const string RemoteDebugPortSupplier = \"{A241707C-7DB3-464F-8D3E-F3D33E86AE99}\";\n+ public const string DebugEngine = \"FC5B45BA-5B9C-46EA-887A-82073AE065FE\";\n+ public const string DebugProgramProvider = \"472CD331-218C-451E-929E-98C9408F11DD\";\n+ public const string RemoteDebugPortSupplier = \"A241707C-7DB3-464F-8D3E-F3D33E86AE99\";\npublic static readonly Guid NodejsBaseProjectFactory = new Guid(NodejsBaseProjectFactoryString);\npublic static readonly Guid NodejsCmdSet = new Guid(NodejsCmdSetString);\n@@ -43,37 +46,37 @@ namespace Microsoft.NodejsTools\npublic static readonly Guid ScriptDebugLanguage = new Guid(ScriptDebugLanguageString);\n- public static readonly Guid VenusCommandId = new Guid(\"{c7547851-4e3a-4e5b-9173-fa6e9c8bd82c}\");\n- public static readonly Guid Eureka = new Guid(\"{30947ebe-9147-45f9-96cf-401bfc671a82}\"); // Microsoft.VisualStudio.Web.Eureka.dll package, includes page inspector\n- public static readonly Guid WebPackageCommandId = new Guid(\"{822e3603-e573-47d2-acf0-520e4ce641c2}\");\n- public static readonly Guid WebPackage = new Guid(\"{d9a342d1-a429-4059-808a-e55ee6351f7f}\");\n- public static readonly Guid WebAppCmdId = new Guid(\"{CB26E292-901A-419c-B79D-49BD45C43929}\");\n+ public static readonly Guid VenusCommandId = new Guid(\"c7547851-4e3a-4e5b-9173-fa6e9c8bd82c\");\n+ public static readonly Guid Eureka = new Guid(\"30947ebe-9147-45f9-96cf-401bfc671a82\"); // Microsoft.VisualStudio.Web.Eureka.dll package, includes page inspector\n+ public static readonly Guid WebPackageCommandId = new Guid(\"822e3603-e573-47d2-acf0-520e4ce641c2\");\n+ public static readonly Guid WebPackage = new Guid(\"d9a342d1-a429-4059-808a-e55ee6351f7f\");\n+ public static readonly Guid WebAppCmdId = new Guid(\"CB26E292-901A-419c-B79D-49BD45C43929\");\n- public static readonly Guid VsUIHierarchyWindow = new Guid(\"{7D960B07-7AF8-11D0-8E5E-00A0C911005A}\");\n+ public static readonly Guid VsUIHierarchyWindow = new Guid(\"7D960B07-7AF8-11D0-8E5E-00A0C911005A\");\n- public static readonly Guid PerfPkg = new Guid(\"{F4A63B2A-49AB-4b2d-AA59-A10F01026C89}\");\n+ public static readonly Guid PerfPkg = new Guid(\"F4A63B2A-49AB-4b2d-AA59-A10F01026C89\");\n- public const string OfficeToolsBootstrapperCmdSetString = \"{D26C976C-8EE8-4EC4-8746-F5F7702A17C5}\";\n+ public const string OfficeToolsBootstrapperCmdSetString = \"D26C976C-8EE8-4EC4-8746-F5F7702A17C5\";\npublic static readonly Guid OfficeToolsBootstrapperCmdSet = new Guid(OfficeToolsBootstrapperCmdSetString);\n- public static readonly Guid ConnectedServicesCmdSet = new Guid(\"{A114CF9C-BD45-4A48-92EF-D9BBBC0B3DF0}\");\n- public static readonly Guid NuGetManagerCmdSet = new Guid(\"{25fd982b-8cae-4cbd-a440-e03ffccde106}\");\n+ public static readonly Guid ConnectedServicesCmdSet = new Guid(\"A114CF9C-BD45-4A48-92EF-D9BBBC0B3DF0\");\n+ public static readonly Guid NuGetManagerCmdSet = new Guid(\"25fd982b-8cae-4cbd-a440-e03ffccde106\");\n// UWP project flavor guid\n- public const string NodejsUwpProjectFlavor = \"{00251F00-BA30-4CE4-96A2-B8A1085F37AA}\";\n+ public const string NodejsUwpProjectFlavor = \"00251F00-BA30-4CE4-96A2-B8A1085F37AA\";\n// Workspace guids\n- public const string PackageJsonContextTypeString = \"{78F43160-2968-4FCA-8829-7E30E9B610CF}\";\n+ public const string PackageJsonContextTypeString = \"78F43160-2968-4FCA-8829-7E30E9B610CF\";\npublic readonly static Guid PackageJsonContextType = new Guid(PackageJsonContextTypeString);\n- public const string TypeScriptContextTypeString = \"{0E78FB31-F2A2-4AB8-A93D-1D123B3F677B}\";\n+ public const string TypeScriptContextTypeString = \"0E78FB31-F2A2-4AB8-A93D-1D123B3F677B\";\npublic readonly static Guid TypeScriptContextType = new Guid(TypeScriptContextTypeString);\n- public const string WorkspaceExplorerDebugActionCmdSetString = \"{5ea148a6-40af-4ff2-ab0f-60ed173c9f98}\";\n+ public const string WorkspaceExplorerDebugActionCmdSetString = \"5ea148a6-40af-4ff2-ab0f-60ed173c9f98\";\npublic readonly static Guid WorkspaceExplorerDebugActionCmdSet = new Guid(WorkspaceExplorerDebugActionCmdSetString);\n// Interactive window guids\n- public const string NodejsInteractiveWindowString = \"{2153A414-267E-4731-B891-E875ADBA1993}\";\n+ public const string NodejsInteractiveWindowString = \"2153A414-267E-4731-B891-E875ADBA1993\";\npublic static readonly Guid NodejsInteractiveWindow = new Guid(NodejsInteractiveWindowString);\n};\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
remove '{' and '}'
410,217
01.03.2018 15:28:49
28,800
b8e579feb27deab2a9f6fb7541b873b557dd5737
Change description of debug option in AnyCode
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/VSPackage.resx", "new_path": "Nodejs/Product/Nodejs/VSPackage.resx", "diff": "<value>Launch for Node.js</value>\n</data>\n<data name=\"6001\" xml:space=\"preserve\">\n- <value>Debug launch configuration for Node.js</value>\n+ <value>Debug JavaScript/TypeScript files with Node.js</value>\n</data>\n</root>\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Change description of debug option in AnyCode
410,217
01.03.2018 15:36:27
28,800
a5bc29f6cc8af5f648587698e2cf3bec27655e48
Rename mis named file
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Compile Include=\"Debugger\\SteppingKind.cs\" />\n<Compile Include=\"Project\\NodejsFileNodeProperties.cs\" />\n<Compile Include=\"Jade\\JadeEditorFactory.cs\" />\n- <Compile Include=\"Workspace\\JsFileDebugLaunchTargerProvider.cs\" />\n+ <Compile Include=\"Workspace\\JsFileDebugLaunchTargetProvider.cs\" />\n<Compile Include=\"Workspace\\PackageJsonScannerFactory.cs\" />\n</ItemGroup>\n<ItemGroup>\n" }, { "change_type": "RENAME", "old_path": "Nodejs/Product/Nodejs/Workspace/JsFileDebugLaunchTargerProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/JsFileDebugLaunchTargetProvider.cs", "diff": "@@ -16,12 +16,12 @@ using Microsoft.VisualStudio.Workspace.VSIntegration.Contracts;\nnamespace Microsoft.NodejsTools.Workspace\n{\n[ExportVsDebugLaunchTarget(ProviderType, new[] { \".js\" }, ProviderPriority.Lowest)]\n- internal sealed class JsFileDebugLaunchTargerProvider : LaunchDebugTargetProvider, IVsDebugLaunchTargetProvider, ILaunchDebugTargetProvider\n+ internal sealed class JsFileDebugLaunchTargetProvider : LaunchDebugTargetProvider, IVsDebugLaunchTargetProvider, ILaunchDebugTargetProvider\n{\nprivate const string ProviderType = \"{0C231F54-C3EF-4719-9CA5-102B1B63A8DC}\";\n[ImportingConstructor]\n- public JsFileDebugLaunchTargerProvider(SVsServiceProvider serviceProvider, IVsFolderWorkspaceService workspaceService)\n+ public JsFileDebugLaunchTargetProvider(SVsServiceProvider serviceProvider, IVsFolderWorkspaceService workspaceService)\n: base(serviceProvider, workspaceService)\n{\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Rename mis named file
410,217
02.03.2018 13:39:46
28,800
68b169e145331657b0d01ce48ff599a9bdd04bfa
Fix logic for setting project Path
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs", "new_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs", "diff": "@@ -110,20 +110,22 @@ namespace Microsoft.NodejsTools.Repl\n}\n}\n- NodejsProjectNode nodejsProject = null;\n(string ProjectPath, IVsHierarchy Hierarchy) projectInfo;\nif (string.IsNullOrEmpty(projectPath) && projectNameToDirectoryDictionary.Count == 1)\n{\nprojectInfo = projectNameToDirectoryDictionary.Values.First();\n}\n- else if (projectNameToDirectoryDictionary.TryGetValue(projectPath, out projectInfo))\n+ else\n{\n+ projectNameToDirectoryDictionary.TryGetValue(projectPath, out projectInfo);\n+ }\n+\n+ NodejsProjectNode nodejsProject = null;\nprojectPath = projectInfo.ProjectPath;\nif (projectInfo.Hierarchy != null)\n{\nnodejsProject = projectInfo.Hierarchy.GetProject().GetNodejsProject();\n}\n- }\nvar isGlobalCommand = false;\nif (string.IsNullOrWhiteSpace(npmArguments) ||\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix logic for setting project Path
410,217
07.03.2018 13:26:38
28,800
22464b08e52bcb326c7fb7194fa13ff146f5cc7b
tweaks to the contributing text
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -12,7 +12,7 @@ and our (old) [feature overview](https://channel9.msdn.com/events/Visual-Studio/\nFeel free to file issues or ask questions on our [issue tracker](http://github.com/Microsoft/nodejstools/issues),\nand we welcome code contributions - see\n-[Contributing](https://github.com/Microsoft/nodejstools/.github/Contributing,md) for information.\n+[Contributing](https://github.com/Microsoft/nodejstools/.github/Contributing.md) for information.\n## Visual Studio 2017 installation\n@@ -41,4 +41,4 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio\n## License\n[Apache License 2.0 (Apache)](https://github.com/Microsoft/nodejstools/blob/master/LICENSE)\n-Thank you for using and supporting the Node.js Tools for Visual Studio\n\\ No newline at end of file\n+Thank you for using and supporting the Node.js Tools for Visual Studio.\n\\ No newline at end of file\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
tweaks to the contributing text
410,217
09.03.2018 15:52:58
28,800
f981e960103797c822cb017f7253de2b9056f35f
disable the progress bars in WPF when they're not visible. This way they don't use CPU/Memory
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/FilterStateVisibilityConverter.cs", "new_path": "Nodejs/Product/Nodejs/NpmUI/FilterStateVisibilityConverter.cs", "diff": "@@ -12,10 +12,18 @@ namespace Microsoft.NodejsTools.NpmUI\nobject IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)\n{\nif (value is string state && parameter is string expected)\n+ {\n+ if (targetType == typeof(Visibility))\n{\nreturn StringComparer.OrdinalIgnoreCase.Equals(state, expected) ? Visibility.Visible : Visibility.Hidden;\n}\n+ if(targetType == typeof(bool))\n+ {\n+ return StringComparer.OrdinalIgnoreCase.Equals(state, expected);\n+ }\n+ }\n+\nthrow new InvalidCastException(\"Wrong input type.\");\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "new_path": "Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallWindow.xaml", "diff": "</Grid.RowDefinitions>\n<ProgressBar Name=\"_progress\"\nHeight=\"4\"\n- IsIndeterminate=\"true\"\n+ IsIndeterminate=\"{Binding Path=IsExecutingCommand}\"\nVisibility=\"{Binding Path=ExecutionProgressVisibility}\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\"/>\n<Button x:Name=\"CloseButton\"\nGrid.Column=\"1\"\nText=\"{x:Static resx:NpmInstallWindowResources.SearchPromptMessage}\" />\n<ProgressBar\nHorizontalAlignment=\"Stretch\"\n- IsEnabled=\"True\"\n- IsIndeterminate=\"True\"\n+ IsEnabled=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=Filtering}\"\n+ IsIndeterminate=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=Filtering}\"\nVisibility=\"{Binding PackageFilterState, Converter={StaticResource filterStateConverter}, ConverterParameter=Filtering}\"/>\n<TextBlock\nHorizontalAlignment=\"Center\"\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
disable the progress bars in WPF when they're not visible. This way they don't use CPU/Memory
410,217
12.03.2018 18:08:08
25,200
ec9d1c1dc6e41f7a6b3b8d0e0257c5ea8aaee25c
Fix test case discovery in Jasmine Instead of depending on specFilter, which is broken in 3.0, we now enumerate the topSuite property, and it's children to discover the test cases in Jasmine unit tests.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/Jasmine/jasmine.js", "new_path": "Nodejs/Product/TestAdapterImpl/TestFrameworks/Jasmine/jasmine.js", "diff": "+// @ts-check\n\"use strict\";\nvar EOL = require(\"os\").EOL;\n@@ -80,43 +81,59 @@ function initializeJasmine(Jasmine, projectFolder) {\nreturn instance;\n}\n-function getSuiteName(spec) {\n- var suiteName = spec.getSpecName(spec);\n- if (suiteName && suiteName.length > 0) {\n- return suiteName.substr(0, suiteName.length - spec.description.length - 1);\n+/**\n+ * @param {jasmine.Suite} suite\n+ * @param {object[]} testList\n+ * @param {string} testFile\n+ */\n+function enumerateSpecs(suite, testList, testFile) {\n+ suite.children.forEach((child) => {\n+ if (child instanceof jasmine.Suite) {\n+ enumerateSpecs(child, testList, testFile);\n+ } else {\n+ testList.push({\n+ test: child.getSpecName(child),\n+ suite: suite.description,\n+ file: testFile,\n+ line: 0,\n+ column: 0\n+ });\n}\n- return suiteName;\n+ });\n}\n+\n+/**\n+ * @param {string} testFileList\n+ * @param {string} discoverResultFile\n+ * @param {string} projectFolder\n+ */\nfunction find_tests(testFileList, discoverResultFile, projectFolder) {\nvar Jasmine = detectJasmine(projectFolder);\nif (!Jasmine) {\nreturn;\n}\n- var testList = [];\n- testFileList.split(\";\").forEach((testFile) => {\n- try {\nvar jasmineInstance = initializeJasmine(Jasmine, projectFolder);\njasmineInstance.env.specFilter = (spec) => {\n- testList.push({\n- test: spec.getSpecName(spec),\n- suite: getSuiteName(spec),\n- file: testFile,\n- line: 0,\n- column: 0\n- });\nreturn false;\n};\n+ var testList = [];\n+ testFileList.split(\";\").forEach((testFile) => {\n+ try {\njasmineInstance.specDir = \"\";\njasmineInstance.specFiles = [];\njasmineInstance.addSpecFiles([testFile]);\njasmineInstance.loadSpecs();\n+\n+ var topSuite = jasmineInstance.env.topSuite();\n+ enumerateSpecs(topSuite, testList, testFile);\n}\ncatch (ex) {\n//we would like continue discover other files, so swallow, log and continue;\nlogError(\"Test discovery error:\", ex, \"in\", testFile);\n}\n});\n+\nvar fd = fs.openSync(discoverResultFile, 'w');\nfs.writeSync(fd, JSON.stringify(testList));\nfs.closeSync(fd);\n@@ -159,7 +176,7 @@ function sendTestProgress(callback, evtType, result, title) {\nhookStandardOutputs();\n}\n-function createCurstomReporter(callback) {\n+function createCustomReporter(callback) {\nreturn {\njasmineStarted: (suiteInfo) => {\nsendTestProgress(callback, \"start\", result);\n@@ -206,16 +223,15 @@ function run_tests(testCases, callback) {\n});\ntry {\nvar jasmineInstance = initializeJasmine(Jasmine, projectFolder);\n- jasmineInstance.configureDefaultReporter({ showColors: true });\n+ jasmineInstance.configureDefaultReporter({ showColors: false });\njasmineInstance.env.specFilter = (spec) => {\nreturn testNameList.hasOwnProperty(spec.getSpecName(spec));\n};\n- jasmineInstance.addReporter(createCurstomReporter(callback));\n+ jasmineInstance.addReporter(createCustomReporter(callback));\njasmineInstance.execute(testFileList);\n}\ncatch (ex) {\nlogError(\"Execute test error:\", ex);\n}\n}\n-\nexports.run_tests = run_tests;\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix test case discovery in Jasmine Instead of depending on specFilter, which is broken in 3.0, we now enumerate the topSuite property, and it's children to discover the test cases in Jasmine unit tests.
410,217
19.03.2018 15:48:07
25,200
f92e02a8cc1e71ef65dec264f8894151b9dd90f1
Implement IVsFreeThreadedFileChangeEvents2 in Node Tools project This allows us to remove a bunch of no longer used code.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "<Reference Include=\"envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<EmbedInteropTypes>False</EmbedInteropTypes>\n</Reference>\n+ <Reference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n+ <EmbedInteropTypes>True</EmbedInteropTypes>\n+ </Reference>\n<Reference Include=\"microsoft.visualstudio.textmanager.interop.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n<EmbedInteropTypes>True</EmbedInteropTypes>\n</Reference>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/AssemblyReferenceNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/AssemblyReferenceNode.cs", "diff": "@@ -400,7 +400,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n// We only care about file deletes, so check for one before enumerating references.\n- if ((e.FileChangeFlag & _VSFILECHANGEFLAGS.VSFILECHG_Del) == 0)\n+ if (e.FileChange != WatcherChangeTypes.Deleted)\n{\nreturn;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs", "diff": "@@ -80,7 +80,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.idleManager.OnIdle += this.OnIdle;\nthis.fileWatcher = new FileChangeManager(serviceProvider);\n- this.fileWatcher.FolderChangedOnDisk += this.FolderChangedOnDisk;\n+ this.fileWatcher.FileChangedOnDisk += this.FileChangedOnDisk;\n}\npublic override int QueryService(ref Guid guidService, out object result)\n@@ -462,7 +462,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.idleManager.OnIdle -= this.OnIdle;\nthis.idleManager.Dispose();\n- this.fileWatcher.FolderChangedOnDisk -= this.FolderChangedOnDisk;\n+ this.fileWatcher.FileChangedOnDisk -= this.FileChangedOnDisk;\nthis.fileWatcher.Dispose();\n}\n@@ -728,17 +728,10 @@ namespace Microsoft.VisualStudioTools.Project\nreturn new CommonReferenceContainerNode(this);\n}\n- private void FolderChangedOnDisk(object sender, FolderChangedEventArgs e)\n+ private void FileChangedOnDisk(object sender, FileChangedOnDiskEventArgs e)\n{\nvar file = e.FileName;\n- if (File.Exists(file) || Directory.Exists(file))\n- {\n- this.QueueFileSystemChanges(new FileSystemChange(this, WatcherChangeTypes.Changed, file));\n- }\n- else\n- {\n- this.QueueFileSystemChanges(new FileSystemChange(this, WatcherChangeTypes.Deleted, file));\n- }\n+ this.QueueFileSystemChanges(new FileSystemChange(this, e.FileChange, file));\n}\nprivate void QueueFileSystemChanges(params FileSystemChange[] changes)\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "diff": "@@ -9,26 +9,12 @@ using IServiceProvider = System.IServiceProvider;\nnamespace Microsoft.VisualStudioTools.Project\n{\n- public sealed class FolderChangedEventArgs : EventArgs\n- {\n- public readonly string FolderName;\n- public readonly string FileName;\n- public _VSFILECHANGEFLAGS FileChangeFlag;\n-\n- public FolderChangedEventArgs(string folderName, string fileName, _VSFILECHANGEFLAGS fileChangeFlag)\n- {\n- this.FolderName = folderName;\n- this.FileName = fileName;\n- this.FileChangeFlag = fileChangeFlag;\n- }\n- }\n-\n/// <summary>\n/// This object is in charge of watching for changes to files and folders.\n/// </summary>\ninternal sealed class FileChangeManager\n{\n- private sealed class FileChangeEvents : IVsFreeThreadedFileChangeEvents\n+ private sealed class FileChangeEvents : IVsFreeThreadedFileChangeEvents2\n{\nprivate readonly FileChangeManager fileChangeManager;\n@@ -56,46 +42,54 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentNullException(nameof(flags));\n}\n- for (var i = 0; i < numberOfFilesChanged; i++)\n- {\n- var fullFileName = Utilities.CanonicalizeFileName(filesChanged[i]);\n- if (this.fileChangeManager.observedFiles.TryGetValue(fullFileName, out var value))\n- {\n- var (ItemID, FileChangeCookie) = value;\n- this.fileChangeManager.FileChangedOnDisk?.Invoke(this, new FileChangedOnDiskEventArgs(fullFileName, ItemID, (_VSFILECHANGEFLAGS)flags[i]));\n- }\n- }\n+ ProcessFileChanges(numberOfFilesChanged, filesChanged, flags);\nreturn VSConstants.S_OK;\n}\n- /// <summary>\n- /// Notifies clients of changes made to a directory.\n- /// </summary>\n- /// <param name=\"directory\">Name of the directory that had a change.</param>\n- /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code. </returns>\npublic int DirectoryChanged(string directory)\n{\n- return VSConstants.S_OK;\n+ // not called since we implement DirectoryChangedEx2\n+ return VSConstants.E_NOTIMPL;\n}\npublic int DirectoryChangedEx(string pszDirectory, string pszFile)\n{\n- if (pszDirectory == null)\n- {\n- throw new ArgumentNullException(nameof(pszDirectory));\n+ // not called since we implement DirectoryChangedEx2\n+ return VSConstants.E_NOTIMPL;\n}\n- if (pszFile == null)\n+ /// <summary>\n+ /// Notifies clients of changes made to a directory.\n+ /// </summary>\n+ /// <param name=\"directory\">Name of the directory that had a change.</param>\n+ /// <param name=\"numberOfFilesChanged\">Number of files changed.</param>\n+ /// <param name=\"filesChanged\">Array of file names.</param>\n+ /// <param name=\"flags\">Array of flags indicating the type of changes. See _VSFILECHANGEFLAGS.</param>\n+ public int DirectoryChangedEx2(string directory, uint numberOfFilesChanged, string[] filesChanged, uint[] flags)\n+ {\n+ if (filesChanged == null)\n{\n- throw new ArgumentNullException(nameof(pszFile));\n+ throw new ArgumentNullException(nameof(filesChanged));\n}\n- this.fileChangeManager.FolderChangedOnDisk?.Invoke(this, new FolderChangedEventArgs(pszDirectory, pszFile,\n- (_VSFILECHANGEFLAGS)0 /* default for now, until VS implements API that returns actual change */));\n+ ProcessFileChanges(numberOfFilesChanged, filesChanged, flags);\nreturn VSConstants.S_OK;\n}\n+\n+ private void ProcessFileChanges(uint numberOfFilesChanged, string[] filesChanged, uint[] flags)\n+ {\n+ for (var i = 0; i < numberOfFilesChanged; i++)\n+ {\n+ var fullFileName = Utilities.CanonicalizeFileName(filesChanged[i]);\n+ if (this.fileChangeManager.observedFiles.TryGetValue(fullFileName, out var value))\n+ {\n+ var (ItemID, FileChangeCookie) = value;\n+ this.fileChangeManager.FileChangedOnDisk?.Invoke(this, new FileChangedOnDiskEventArgs(fullFileName, ItemID, (_VSFILECHANGEFLAGS)flags[i]));\n+ }\n+ }\n+ }\n}\n/// <summary>\n@@ -103,11 +97,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic event EventHandler<FileChangedOnDiskEventArgs> FileChangedOnDisk;\n- /// <summary>\n- /// Event that is raised when one of the observed folders have changed on disk.\n- /// </summary>\n- public event EventHandler<FolderChangedEventArgs> FolderChangedOnDisk;\n-\n/// <summary>\n/// Reference to the FileChange service.\n/// </summary>\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Implement IVsFreeThreadedFileChangeEvents2 in Node Tools project This allows us to remove a bunch of no longer used code.
410,217
19.03.2018 15:48:33
25,200
ef76daba01d17e1270ee503b5a7d7e84e20ce3e7
Implement IVsFreeThreadedFileChangeEvents2 in Test Adapter This allows us to remove a bunch of no longer used code.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "diff": "<Reference Include=\"envdte90, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<EmbedInteropTypes>False</EmbedInteropTypes>\n</Reference>\n+ <Reference Include=\"Microsoft.VisualStudio.Shell.Interop.15.0.DesignTime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n+ <EmbedInteropTypes>True</EmbedInteropTypes>\n+ </Reference>\n+ <Reference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n+ <EmbedInteropTypes>True</EmbedInteropTypes>\n+ </Reference>\n<Reference Include=\"Microsoft.VisualStudio.TestPlatform.ObjectModel\">\n<HintPath>$(DevEnvDir)CommonExtensions\\Microsoft\\TestWindow\\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>\n<Private>False</Private>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs", "diff": "@@ -532,7 +532,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nstring root = null;\nswitch (e.ChangedReason)\n{\n- case TestFileChangedReason.Added:\n+ case WatcherChangeTypes.Created:\nDebug.Assert(e.Project != null);\nif (e.Project.IsTestProject(Guids.NodejsBaseProjectFactory))\n{\n@@ -551,7 +551,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nOnTestContainersChanged(e.Project);\n}\nbreak;\n- case TestFileChangedReason.Removed:\n+ case WatcherChangeTypes.Deleted:\nDebug.Assert(e.Project != null);\nif (this.fileRootMap.TryGetValue(e.File, out root))\n@@ -577,8 +577,8 @@ namespace Microsoft.NodejsTools.TestAdapter\n// Dev12 renames files instead of overwriting them when\n// saving, so we need to listen for renames where the new\n// path is part of the project.\n- case TestFileChangedReason.Renamed:\n- case TestFileChangedReason.Changed:\n+ case WatcherChangeTypes.Renamed:\n+ case WatcherChangeTypes.Changed:\nOnTestContainersChanged(GetTestProjectFromFile(e.File));\nbreak;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs", "diff": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\n+using System.IO;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.Shell.Interop;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\nnamespace Microsoft.VisualStudioTools.TestAdapter\n{\n- internal class TestFilesUpdateWatcher : IVsFileChangeEvents, IDisposable\n+ // TODO: consider replacing this with Microsoft.VisualStudioTools.Project.FileChangeManager. (When we have an assembly we can use to share code)\n+\n+ internal sealed class TestFilesUpdateWatcher : IVsFreeThreadedFileChangeEvents2, IDisposable\n{\nprivate readonly IDictionary<string, uint> watchedFiles = new Dictionary<string, uint>(StringComparer.OrdinalIgnoreCase);\nprivate readonly IDictionary<string, uint> watchedFolders = new Dictionary<string, uint>(StringComparer.OrdinalIgnoreCase);\n@@ -81,42 +84,61 @@ namespace Microsoft.VisualStudioTools.TestAdapter\nreturn false;\n}\n- int IVsFileChangeEvents.FilesChanged(uint cChanges, string[] rgpszFile, uint[] rggrfChange)\n- {\n- if (this.FileChangedEvent != null)\n+ public int FilesChanged(uint cChanges, string[] rgpszFile, uint[] rggrfChange)\n{\n- var evt = FileChangedEvent;\nfor (var i = 0; i < cChanges; i++)\n{\n- evt.Invoke(this, new TestFileChangedEventArgs(null, rgpszFile[i], ConvertVSFILECHANGEFLAGS(rggrfChange[i])));\n- }\n+ this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(null, rgpszFile[i], ConvertVSFILECHANGEFLAGS(rggrfChange[i])));\n}\nreturn VSConstants.S_OK;\n}\n- int IVsFileChangeEvents.DirectoryChanged(string pszDirectory)\n+ public int DirectoryChanged(string directory)\n+ {\n+ // not called since we implement DirectoryChangedEx2\n+ return VSConstants.E_NOTIMPL;\n+ }\n+\n+ public int DirectoryChangedEx(string directory, string file)\n{\n- FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(null, pszDirectory, TestFileChangedReason.Changed));\n+ // not called since we implement DirectoryChangedEx2\n+ return VSConstants.E_NOTIMPL;\n+ }\n+\n+ /// <summary>\n+ /// Notifies clients of changes made to a directory.\n+ /// </summary>\n+ /// <param name=\"directory\">Name of the directory that had a change.</param>\n+ /// <param name=\"numberOfFilesChanged\">Number of files changed.</param>\n+ /// <param name=\"filesChanged\">Array of file names.</param>\n+ /// <param name=\"flags\">Array of flags indicating the type of changes. See _VSFILECHANGEFLAGS.</param>\n+\n+ public int DirectoryChangedEx2(string directory, uint numberOfFilesChanged, string[] filesChanged, uint[] flags)\n+ {\n+ for (var i = 0; i < numberOfFilesChanged; i++)\n+ {\n+ this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(null, filesChanged[i], ConvertVSFILECHANGEFLAGS(flags[i])));\n+ }\nreturn VSConstants.S_OK;\n}\n- private static TestFileChangedReason ConvertVSFILECHANGEFLAGS(uint flag)\n+ private static WatcherChangeTypes ConvertVSFILECHANGEFLAGS(uint flag)\n{\nif ((flag & (uint)(_VSFILECHANGEFLAGS.VSFILECHG_Size | _VSFILECHANGEFLAGS.VSFILECHG_Time | _VSFILECHANGEFLAGS.VSFILECHG_Attr)) != 0)\n{\n- return TestFileChangedReason.Changed;\n+ return WatcherChangeTypes.Changed;\n}\nif ((flag & (uint)_VSFILECHANGEFLAGS.VSFILECHG_Add) != 0)\n{\n- return TestFileChangedReason.Added;\n+ return WatcherChangeTypes.Created;\n}\nif ((flag & (uint)_VSFILECHANGEFLAGS.VSFILECHG_Del) != 0)\n{\n- return TestFileChangedReason.Removed;\n+ return WatcherChangeTypes.Deleted;\n}\nDebug.Fail($\"Unexpected value for the file changed event: \\'{flag}\\'\");\n- return TestFileChangedReason.Changed;\n+ return WatcherChangeTypes.Changed;\n}\nprivate void CheckDisposed()\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Implement IVsFreeThreadedFileChangeEvents2 in Test Adapter This allows us to remove a bunch of no longer used code.
410,217
26.03.2018 16:32:45
25,200
86fab03b4259d981478c462997c17b8f66164dc6
Finish implementing VS FileChange watcher
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/FileChangeManager.cs", "diff": "@@ -42,7 +42,9 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentNullException(nameof(flags));\n}\n- ProcessFileChanges(numberOfFilesChanged, filesChanged, flags);\n+ Debug.Assert(numberOfFilesChanged == filesChanged.Length && numberOfFilesChanged == flags.Length, \"number of files changed doesn't match actual files reported.\");\n+\n+ ProcessFileChanges(filesChanged, flags);\nreturn VSConstants.S_OK;\n}\n@@ -73,21 +75,23 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentNullException(nameof(filesChanged));\n}\n- ProcessFileChanges(numberOfFilesChanged, filesChanged, flags);\n+ if (flags == null)\n+ {\n+ throw new ArgumentNullException(nameof(flags));\n+ }\n+\n+ Debug.Assert(numberOfFilesChanged == filesChanged.Length && numberOfFilesChanged == flags.Length, \"number of files changed doesn't match actual files reported.\");\n+\n+ ProcessFileChanges(filesChanged, flags);\nreturn VSConstants.S_OK;\n}\n- private void ProcessFileChanges(uint numberOfFilesChanged, string[] filesChanged, uint[] flags)\n- {\n- for (var i = 0; i < numberOfFilesChanged; i++)\n+ private void ProcessFileChanges(string[] filesChanged, uint[] flags)\n{\n- var fullFileName = Utilities.CanonicalizeFileName(filesChanged[i]);\n- if (this.fileChangeManager.observedFiles.TryGetValue(fullFileName, out var value))\n+ for (var i = 0; i < filesChanged.Length; i++)\n{\n- var (ItemID, FileChangeCookie) = value;\n- this.fileChangeManager.FileChangedOnDisk?.Invoke(this, new FileChangedOnDiskEventArgs(fullFileName, ItemID, (_VSFILECHANGEFLAGS)flags[i]));\n- }\n+ this.fileChangeManager.FileChangedOnDisk?.Invoke(this, new FileChangedOnDiskEventArgs(filesChanged[i], (_VSFILECHANGEFLAGS)flags[i]));\n}\n}\n}\n@@ -106,7 +110,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// Maps between the observed file identified by its filename (in canonicalized form) and the cookie used for subscribing\n/// to the events.\n/// </summary>\n- private readonly ConcurrentDictionary<string, (uint ItemID, uint FileChangeCookie)> observedFiles = new ConcurrentDictionary<string, (uint, uint)>();\n+ private readonly ConcurrentDictionary<string, uint> observedFiles = new ConcurrentDictionary<string, uint>();\n/// <summary>\n/// Maps between the observer folder identified by its foldername (in canonicalized form) and the cookie used for subscribing\n@@ -160,9 +164,9 @@ namespace Microsoft.VisualStudioTools.Project\nthis.disposed = true;\n// Unsubscribe from the observed source files.\n- foreach (var (ItemID, FileChangeCookie) in this.observedFiles.Values)\n+ foreach (var fileChangeCookie in this.observedFiles.Values)\n{\n- var hr = this.fileChangeService.UnadviseFileChange(FileChangeCookie);\n+ var hr = this.fileChangeService.UnadviseFileChange(fileChangeCookie);\n// don't want to crash VS during cleanup\nDebug.Assert(ErrorHandler.Succeeded(hr), \"UnadviseFileChange failed\");\nif (ErrorHandler.Failed(hr)) { break; }\n@@ -184,23 +188,12 @@ namespace Microsoft.VisualStudioTools.Project\nthis.observedFolders.Clear();\n}\n- /// <summary>\n- /// Observe when the given file is updated on disk. In this case we do not care about the item id that represents the file in the hierarchy.\n- /// </summary>\n- /// <param name=\"fileName\">File to observe.</param>\n- public void ObserveFile(string fileName)\n- {\n- this.CheckDisposed();\n-\n- this.ObserveFile(fileName, VSConstants.VSITEMID_NIL);\n- }\n-\n/// <summary>\n/// Observe when the given file is updated on disk.\n/// </summary>\n/// <param name=\"fileName\">File to observe.</param>\n/// <param name=\"id\">The item id of the item to observe.</param>\n- public void ObserveFile(string fileName, uint id)\n+ public void ObserveFile(string fileName)\n{\nthis.CheckDisposed();\n@@ -216,7 +209,7 @@ namespace Microsoft.VisualStudioTools.Project\nErrorHandler.ThrowOnFailure(this.fileChangeService.AdviseFileChange(fullFileName, (uint)(_VSFILECHANGEFLAGS.VSFILECHG_Time | _VSFILECHANGEFLAGS.VSFILECHG_Del), this.fileChangeEvents, out var fileChangeCookie));\n// Remember that we're observing this file (used in FilesChanged event handler)\n- this.observedFiles.TryAdd(fullFileName, (id, fileChangeCookie));\n+ this.observedFiles.TryAdd(fullFileName, fileChangeCookie);\n}\n}\n@@ -280,13 +273,10 @@ namespace Microsoft.VisualStudioTools.Project\n// Remove the file from our observed list. It's important that this is done before the call to\n// UnadviseFileChange, because for some reason, the call to UnadviseFileChange can trigger a\n// FilesChanged event, and we want to be able to filter that event away.\n- if (this.observedFiles.TryRemove(fullFileName, out var value))\n+ if (this.observedFiles.TryRemove(fullFileName, out var fileChangeCookie))\n{\n- // Get the cookie that was used for this.observedItems to this file.\n- var (ItemID, FileChangeCookie) = value;\n-\n// Stop observing the file\n- return ErrorHandler.Succeeded(this.fileChangeService.UnadviseFileChange(FileChangeCookie));\n+ return ErrorHandler.Succeeded(this.fileChangeService.UnadviseFileChange(fileChangeCookie));\n}\nreturn false;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/StructuresEnums.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/StructuresEnums.cs", "diff": "@@ -298,11 +298,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic readonly string FileName;\n- /// <summary>\n- /// The item ide of the file that has changed.\n- /// </summary>\n- public readonly uint ItemID;\n-\n/// <summary>\n/// The reason the file has changed on disk.\n/// </summary>\n@@ -313,10 +308,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\n/// <param name=\"fileName\">File name that was changed on disk.</param>\n/// <param name=\"id\">The item id of the file that was changed on disk.</param>\n- internal FileChangedOnDiskEventArgs(string fileName, uint id, _VSFILECHANGEFLAGS flag)\n+ internal FileChangedOnDiskEventArgs(string fileName, _VSFILECHANGEFLAGS flag)\n{\nthis.FileName = fileName;\n- this.ItemID = id;\nthis.FileChange = ConvertVSFILECHANGEFLAGS((uint)flag);\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs", "diff": "@@ -360,13 +360,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar ft = File.GetLastWriteTimeUtc(filePath);\nreturn (ft > latest) ? ft : latest;\n}\n- catch (UnauthorizedAccessException)\n- {\n- }\n- catch (ArgumentException)\n- {\n- }\n- catch (IOException)\n+ catch (Exception exc) when (exc is UnauthorizedAccessException || exc is ArgumentException || exc is IOException)\n{\n}\nreturn latest;\n@@ -530,13 +524,13 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (e != null && ShouldDiscover(e.File))\n{\nstring root = null;\n+ var project = e.Project ?? GetTestProjectFromFile(e.File);\nswitch (e.ChangedReason)\n{\ncase WatcherChangeTypes.Created:\n- Debug.Assert(e.Project != null);\n- if (e.Project.IsTestProject(Guids.NodejsBaseProjectFactory))\n+ if (project.IsTestProject(Guids.NodejsBaseProjectFactory))\n{\n- root = e.Project.GetProjectHome();\n+ root = project.GetProjectHome();\nif (!string.IsNullOrEmpty(root) && CommonUtils.IsSubpathOf(root, e.File))\n{\n@@ -548,12 +542,10 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.testFilesUpdateWatcher.AddFileWatch(e.File);\n}\n- OnTestContainersChanged(e.Project);\n+ OnTestContainersChanged(project);\n}\nbreak;\ncase WatcherChangeTypes.Deleted:\n- Debug.Assert(e.Project != null);\n-\nif (this.fileRootMap.TryGetValue(e.File, out root))\n{\nthis.fileRootMap.Remove(e.File);\n@@ -571,7 +563,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n// track the last delete as an update as our file system scan won't see it\nthis.lastWrite = DateTime.Now.ToUniversalTime();\n- OnTestContainersChanged(e.Project);\n+ OnTestContainersChanged(project);\nbreak;\n// Dev12 renames files instead of overwriting them when\n@@ -579,7 +571,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n// path is part of the project.\ncase WatcherChangeTypes.Renamed:\ncase WatcherChangeTypes.Changed:\n- OnTestContainersChanged(GetTestProjectFromFile(e.File));\n+ OnTestContainersChanged(project);\nbreak;\n}\n}\n@@ -600,7 +592,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nCommonUtils.IsSamePath(projectPath, filename) ||\n(hierarchy != null &&\nproject.IsTestProject(Guids.NodejsBaseProjectFactory) &&\n- ErrorHandler.Succeeded(hierarchy.ParseCanonicalName(filename, out var itemid))))\n+ ErrorHandler.Succeeded(hierarchy.ParseCanonicalName(filename, out _))))\n{\nreturn project;\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFileAddRemoveListener.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestFileAddRemoveListener.cs", "diff": "@@ -14,7 +14,7 @@ namespace Microsoft.VisualStudioTools.TestAdapter\npublic readonly string File;\npublic readonly WatcherChangeTypes ChangedReason;\n- public TestFileChangedEventArgs(IVsProject project, string file, WatcherChangeTypes reason)\n+ public TestFileChangedEventArgs(string file, WatcherChangeTypes reason, IVsProject project = null)\n{\nthis.Project = project;\nthis.File = file;\n@@ -72,7 +72,7 @@ namespace Microsoft.VisualStudioTools.TestAdapter\nif (project != null && project.IsTestProject(this._testProjectGuid))\n{\n- TestFileChanged?.Invoke(this, new TestFileChangedEventArgs(project, projectItem, reason));\n+ TestFileChanged?.Invoke(this, new TestFileChangedEventArgs(projectItem, reason, project));\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs", "new_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs", "diff": "@@ -88,7 +88,7 @@ namespace Microsoft.VisualStudioTools.TestAdapter\n{\nfor (var i = 0; i < cChanges; i++)\n{\n- this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(null, rgpszFile[i], ConvertVSFILECHANGEFLAGS(rggrfChange[i])));\n+ this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(rgpszFile[i], ConvertVSFILECHANGEFLAGS(rggrfChange[i])));\n}\nreturn VSConstants.S_OK;\n}\n@@ -117,7 +117,7 @@ namespace Microsoft.VisualStudioTools.TestAdapter\n{\nfor (var i = 0; i < numberOfFilesChanged; i++)\n{\n- this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(null, filesChanged[i], ConvertVSFILECHANGEFLAGS(flags[i])));\n+ this.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(filesChanged[i], ConvertVSFILECHANGEFLAGS(flags[i])));\n}\nreturn VSConstants.S_OK;\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Finish implementing VS FileChange watcher
410,217
27.03.2018 13:17:16
25,200
f81a37b2600076b0e1a21a200c0d2578d9ae0cee
Update nuget packages to new versions
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "new_path": "Nodejs/Product/Nodejs/Nodejs.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.AppDesigner\">\n<Version>15.3.0-rc-6162104</Version>\n</PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n- <Version>15.3.799-masterDDDBA9E4</Version>\n+ <Version>15.7.942-master669188BE</Version>\n</PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Threading\">\n- <Version>15.5.13-beta</Version>\n+ <Version>15.6.46</Version>\n</PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.VsInteractiveWindow\">\n<Version>2.3.0</Version>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj", "new_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Npm/Npm.csproj", "new_path": "Nodejs/Product/Npm/Npm.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n<PackageReference Include=\"Newtonsoft.Json\">\n<Version>9.0.1</Version>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/PressAnyKey/PressAnyKey.csproj", "new_path": "Nodejs/Product/PressAnyKey/PressAnyKey.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(BuildRoot)\\Build\\Common.Build.CSharp.targets\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/ProjectWizard/ProjectWizard.csproj", "new_path": "Nodejs/Product/ProjectWizard/ProjectWizard.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"..\\Nodejs\\SharedResources.proj\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj", "new_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj", "new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n<Version>15.3.799-masterDDDBA9E4</Version>\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj", "new_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/WebRole/WebRole.csproj", "new_path": "Nodejs/Product/WebRole/WebRole.csproj", "diff": "</ItemGroup>\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\">\n- <Version>0.2.0</Version>\n+ <Version>0.3.0</Version>\n</PackageReference>\n</ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Update nuget packages to new versions
410,217
06.04.2018 13:32:38
25,200
60b5f50dd2c1899d7392a79e7f485b3613460c05
Some guids used in the registry require '{' and '}'
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Guids.cs", "new_path": "Nodejs/Product/Nodejs/Guids.cs", "diff": "@@ -13,13 +13,11 @@ namespace Microsoft.NodejsTools\npublic const string NodejsPackageString = \"FE8A8C3D-328A-476D-99F9-2A24B75F8C7F\";\npublic const string NodejsCmdSetString = \"695e37e2-c6df-4e0a-8833-f688e4c65f1f\";\n- public const string NodejsDebugLanguageString = \"65791609-BA29-49CF-A214-DBFF8AEC3BC2\";\npublic const string NodejsNpmCmdSetString = \"9F4B31B4-09AC-4937-A2E7-F4BC02BB7DBA\";\npublic const string NodeToolsWorkspaceCmdSetString = \"0D701F33-94A3-421C-9865-6F65E7E4B689\";\npublic const string NodejsProjectFactoryString = \"3AF33F2E-1136-4D97-BBB7-1795711AC8B8\";\npublic const string NodejsBaseProjectFactoryString = \"9092AA53-FB77-4645-B42D-1CCCA6BD08BD\";\npublic const string TypeScriptLanguageInfoString = \"4a0dddb5-7a95-4fbf-97cc-616d07737a77\";\n- public const string TypeScriptDebuggerLanguageInfoString = \"87bdf188-e6e8-4fcf-a82a-9b8506e01847\";\npublic const string JadeEditorFactoryString = \"6CB69EF8-1329-4DC0-84B4-FA134EA59BE3\";\npublic const string DefaultLanguageServiceString = \"8239BEC4-EE87-11D0-8C98-00C04FC2AB22\";\n@@ -28,11 +26,14 @@ namespace Microsoft.NodejsTools\n//Guid for our formatting service\ninternal const string JavaScriptFormattingServiceString = \"F414C260-6AC0-11CF-B6D1-00AA00BBBB58\";\n- public const string ScriptDebugLanguageString = \"F7FA31DA-C32A-11D0-B442-00A0244A1DD2\";\n-\n// Debug guids\n- public const string DebugEngine = \"FC5B45BA-5B9C-46EA-887A-82073AE065FE\";\n+ // However the debugger requires the '{' and '}'\n+ public const string NodejsDebugLanguageString = \"{65791609-BA29-49CF-A214-DBFF8AEC3BC2}\";\n+ public const string TypeScriptDebuggerLanguageInfoString = \"{87bdf188-e6e8-4fcf-a82a-9b8506e01847}\";\n+ public const string ScriptDebugLanguageString = \"{F7FA31DA-C32A-11D0-B442-00A0244A1DD2}\";\n+\npublic const string DebugProgramProvider = \"472CD331-218C-451E-929E-98C9408F11DD\";\n+ public const string DebugEngine = \"FC5B45BA-5B9C-46EA-887A-82073AE065FE\";\npublic const string RemoteDebugPortSupplier = \"A241707C-7DB3-464F-8D3E-F3D33E86AE99\";\npublic static readonly Guid NodejsBaseProjectFactory = new Guid(NodejsBaseProjectFactoryString);\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Some guids used in the registry require '{' and '}'
410,217
06.04.2018 13:52:04
25,200
2f24f435b39eb84086dcf41601f321bb535e06bc
Fix null reference when redirector is null.
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "diff": "@@ -152,7 +152,6 @@ namespace Microsoft.NodejsTools.Workspace\nvar filePath = ((IFileNode)node).FullPath;\nif (TryGetCommand(nCmdID, filePath, out var commandName))\n{\n-\nusing (var npmController = this.CreateController(node.Workspace))\nusing (var commander = npmController.CreateNpmCommander())\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs", "new_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs", "diff": "@@ -106,7 +106,7 @@ namespace Microsoft.NodejsTools.Npm.SPI\ncancelled = true;\n}\nOnCommandCompleted(this.Arguments, redirector?.HasErrors ?? false, cancelled);\n- return !redirector.HasErrors;\n+ return redirector == null || !redirector.HasErrors; // return true when the command completed without errors, or redirector is null (which means we can't track)\n}\nprivate sealed class NpmCommandRedirector : Redirector\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix null reference when redirector is null.
410,217
06.04.2018 14:12:53
25,200
65a565937712aac76614dccebc643c0d0ef50427
Fix issue with output encoding when not redirecting output
[ { "change_type": "MODIFY", "old_path": "Common/Product/SharedProject/ProcessOutput.cs", "new_path": "Common/Product/SharedProject/ProcessOutput.cs", "diff": "@@ -162,13 +162,19 @@ namespace Microsoft.VisualStudioTools.Project\nQuoteSingleArgument(filename),\nGetArguments(arguments, quoteArgs)),\nCreateNoWindow = !visible,\n- UseShellExecute = false,\n- RedirectStandardError = !visible || (redirector != null),\n- RedirectStandardOutput = !visible || (redirector != null),\n- RedirectStandardInput = !visible\n+ UseShellExecute = false\n};\n+\n+ if (!visible || (redirector != null))\n+ {\n+ psi.RedirectStandardError = true;\n+ psi.RedirectStandardOutput = true;\n+ psi.RedirectStandardInput = true;\n+ // only set the encoding when we're redirecting the output\npsi.StandardOutputEncoding = outputEncoding ?? psi.StandardOutputEncoding;\npsi.StandardErrorEncoding = errorEncoding ?? outputEncoding ?? psi.StandardErrorEncoding;\n+ }\n+\nif (env != null)\n{\nforeach (var kv in env)\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix issue with output encoding when not redirecting output
410,217
06.04.2018 15:42:42
25,200
0ddeab5c9ca3e5b8b23bfce73ad0d7dca3d5adad
Fix threading issue output window
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/SharedProject/OutputWindowWrapper.cs", "new_path": "Nodejs/Product/Nodejs/SharedProject/OutputWindowWrapper.cs", "diff": "@@ -24,22 +24,20 @@ namespace Microsoft.VisualStudioTools.Project\nprivate SVsServiceProvider ServiceProvider { get; set; }\nprivate Dictionary<OutputWindowTarget, IVsOutputWindowPane> lazyOutputPaneCollection = new Dictionary<OutputWindowTarget, IVsOutputWindowPane>();\n- private IVsWindowFrame lazyOutputWindow;\n- private IVsOutputWindowPane GetOutputPane(OutputWindowTarget target)\n+ public OutputPaneWrapper()\n{\n- if (this.lazyOutputPaneCollection.TryGetValue(target, out var lazyOutputPane))\n- {\n- return lazyOutputPane;\n+ //...\n}\n- else\n+\n+ private void InitializeOutputPane(OutputWindowTarget target)\n{\nThreadHelper.ThrowIfNotOnUIThread();\nvar (title, guid) = GetPaneInfo(target);\nvar outputWindow = (IVsOutputWindow)this.ServiceProvider.GetService(typeof(SVsOutputWindow));\n// Try to get the workspace pane if it has already been registered\n- var hr = outputWindow.GetPane(guid, out lazyOutputPane);\n+ var hr = outputWindow.GetPane(guid, out var lazyOutputPane);\n// If the workspace pane has not been registered before, create it\nif (lazyOutputPane == null || ErrorHandler.Failed(hr))\n@@ -48,7 +46,7 @@ namespace Microsoft.VisualStudioTools.Project\nif (ErrorHandler.Failed(outputWindow.CreatePane(guid, title, fInitVisible: 1, fClearWithSolution: 1)) ||\nErrorHandler.Failed(outputWindow.GetPane(guid, out lazyOutputPane)))\n{\n- return null;\n+ return;\n}\n// Must activate the workspace pane for it to show up in the output window\n@@ -56,8 +54,6 @@ namespace Microsoft.VisualStudioTools.Project\n}\nthis.lazyOutputPaneCollection.Add(target, lazyOutputPane);\n- return lazyOutputPane;\n- }\n(string title, Guid guid) GetPaneInfo(OutputWindowTarget pane)\n{\n@@ -73,39 +69,23 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- private IVsWindowFrame OutputWindow\n- {\n- get\n- {\n- if (this.lazyOutputWindow == null && this.ServiceProvider.GetService(typeof(SVsUIShell)) is IVsUIShell shell)\n- {\n- ThreadHelper.ThrowIfNotOnUIThread();\n-\n- var windowGuid = OutputWindowGuid;\n- var hr = shell.FindToolWindow((int)__VSFINDTOOLWIN.FTW_fForceCreate, ref windowGuid, out this.lazyOutputWindow);\n- Debug.Assert(ErrorHandler.Succeeded(hr));\n- }\n-\n- return this.lazyOutputWindow;\n- }\n- }\n-\npublic void WriteLine(string message, OutputWindowTarget target = OutputWindowTarget.Npm)\n{\n- if (this.lazyOutputWindow == null)\n+ if (!this.lazyOutputPaneCollection.TryGetValue(target, out var lazyOutputPane))\n{\n- throw new InvalidOperationException($\"Ensure the output window is initialized by calling '{nameof(ShowWindow)}' first.\");\n+ throw new InvalidOperationException(\"You need to initialize the output panes before using them.\");\n}\n- var hr = this.GetOutputPane(target).OutputStringThreadSafe(message + Environment.NewLine);\n+ var hr = lazyOutputPane.OutputStringThreadSafe(message + Environment.NewLine);\nDebug.Assert(ErrorHandler.Succeeded(hr));\n}\n- public void ShowWindow()\n+ public void InitializeOutputPanes()\n{\nThreadHelper.ThrowIfNotOnUIThread();\n- var hr = this.OutputWindow?.ShowNoActivate() ?? VSConstants.E_FAIL;\n- Debug.Assert(ErrorHandler.Succeeded(hr));\n+\n+ InitializeOutputPane(OutputWindowTarget.Npm);\n+ InitializeOutputPane(OutputWindowTarget.Tsc);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "diff": "@@ -75,7 +75,7 @@ namespace Microsoft.NodejsTools.Workspace\nif (pguidCmdGroup == Guids.NodeToolsWorkspaceCmdSet)\n{\n- this.outputPane.ShowWindow();\n+ this.outputPane.InitializeOutputPanes();\nswitch (nCmdID)\n{\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptActionProviderFactory.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptActionProviderFactory.cs", "diff": "@@ -60,7 +60,7 @@ namespace Microsoft.NodejsTools.Workspace\n{\nawait this.workspaceContext.JTF.SwitchToMainThreadAsync();\n- this.outputPane.ShowWindow();\n+ this.outputPane.InitializeOutputPanes();\nvar actions = new List<IFileContextAction>();\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix threading issue output window
410,217
06.04.2018 16:39:25
25,200
f0a417717f734f7cbafd44b6bf32acc9eecef01b
Fix issues when package.json is not in the root of the workspace
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "diff": "@@ -4,6 +4,7 @@ using System;\nusing System.Collections.Generic;\nusing System.ComponentModel.Composition;\nusing System.Diagnostics;\n+using System.IO;\nusing System.Linq;\nusing System.Threading;\nusing Microsoft.NodejsTools.Npm;\n@@ -80,21 +81,21 @@ namespace Microsoft.NodejsTools.Workspace\nswitch (nCmdID)\n{\ncase PkgCmdId.cmdidWorkSpaceNpmInstallMissing:\n- ExecNpmInstallMissing(node);\n+ ExecNpmInstallMissing((IFileNode)node);\nreturn VSConstants.S_OK;\ncase PkgCmdId.cmdidWorkSpaceNpmInstallNew:\n- ExecNpmInstallNew(node);\n+ ExecNpmInstallNew((IFileNode)node);\nreturn VSConstants.S_OK;\ncase PkgCmdId.cmdidWorkSpaceNpmUpdate:\n- ExecNpmUpdate(node);\n+ ExecNpmUpdate((IFileNode)node);\nreturn VSConstants.S_OK;\n}\nif (nCmdID >= PkgCmdId.cmdidWorkSpaceNpmDynamicScript && nCmdID < PkgCmdId.cmdidWorkSpaceNpmDynamicScriptMax)\n{\n- ExecDynamic(node, nCmdID);\n+ ExecDynamic((IFileNode)node, nCmdID);\nreturn VSConstants.S_OK;\n}\n}\n@@ -116,18 +117,18 @@ namespace Microsoft.NodejsTools.Workspace\n// Note: all the Exec commands are async, this allows us to call them in a fire and forget\n// pattern, without blocking the UI or losing any logging\n- private async void ExecNpmInstallMissing(WorkspaceVisualNodeBase node)\n+ private async void ExecNpmInstallMissing(IFileNode node)\n{\n- using (var npmController = this.CreateController(node.Workspace))\n+ using (var npmController = this.CreateController(node.FullPath))\nusing (var commander = npmController.CreateNpmCommander())\n{\nawait commander.Install();\n}\n}\n- private void ExecNpmInstallNew(WorkspaceVisualNodeBase node)\n+ private void ExecNpmInstallNew(IFileNode node)\n{\n- using (var npmController = this.CreateController(node.Workspace))\n+ using (var npmController = this.CreateController(node.FullPath))\nusing (var npmWorker = new NpmWorker(npmController))\nusing (var manager = new NpmPackageInstallWindow(npmController, npmWorker))\n{\n@@ -135,24 +136,24 @@ namespace Microsoft.NodejsTools.Workspace\n}\n}\n- private async void ExecNpmUpdate(WorkspaceVisualNodeBase node)\n+ private async void ExecNpmUpdate(IFileNode node)\n{\n- using (var npmController = this.CreateController(node.Workspace))\n+ using (var npmController = this.CreateController(node.FullPath))\nusing (var commander = npmController.CreateNpmCommander())\n{\nawait commander.UpdatePackagesAsync();\n}\n}\n- private async void ExecDynamic(WorkspaceVisualNodeBase node, uint nCmdID)\n+ private async void ExecDynamic(IFileNode node, uint nCmdID)\n{\n// Unfortunately the NpmController (and NpmCommander), used for the install and update commands\n// doesn't support running arbitrary scripts. And changing that is outside\n// the scope of these changes.\n- var filePath = ((IFileNode)node).FullPath;\n+ var filePath = node.FullPath;\nif (TryGetCommand(nCmdID, filePath, out var commandName))\n{\n- using (var npmController = this.CreateController(node.Workspace))\n+ using (var npmController = this.CreateController(filePath))\nusing (var commander = npmController.CreateNpmCommander())\n{\nawait commander.ExecuteNpmCommandAsync($\"run-script {commandName}\", showConsole: true);\n@@ -264,9 +265,11 @@ namespace Microsoft.NodejsTools.Workspace\nreturn false;\n}\n- private INpmController CreateController(IWorkspace workspace)\n+ private INpmController CreateController(string packageJsonPath)\n{\n- var projectHome = workspace.Location;\n+ Debug.Assert(Path.IsPathRooted(packageJsonPath) && PackageJsonFactory.IsPackageJsonFile(packageJsonPath));\n+\n+ var projectHome = Path.GetDirectoryName(packageJsonPath);\nvar npmController = NpmControllerFactory.Create(\nprojectHome,\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Fix issues when package.json is not in the root of the workspace
410,217
06.04.2018 17:12:35
25,200
7836c14e1807055acbfaff82ee6e7ec242620836
Don't crash when there is no main script
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/ContextMenuProvider.cs", "diff": "@@ -11,10 +11,12 @@ using Microsoft.NodejsTools.Npm;\nusing Microsoft.NodejsTools.NpmUI;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.OLE.Interop;\n+using Microsoft.VisualStudio.Shell;\nusing Microsoft.VisualStudio.Workspace;\nusing Microsoft.VisualStudio.Workspace.Debug;\nusing Microsoft.VisualStudio.Workspace.VSIntegration.UI;\nusing Microsoft.VisualStudioTools.Project;\n+using ShellInterop = Microsoft.VisualStudio.Shell.Interop;\nnamespace Microsoft.NodejsTools.Workspace\n{\n@@ -166,6 +168,11 @@ namespace Microsoft.NodejsTools.Workspace\nvar workspace = node.Workspace;\nvar packageJson = PackageJsonFactory.Create(((IFileNode)node).FullPath);\n+ if (string.IsNullOrEmpty(packageJson.Main))\n+ {\n+ return;\n+ }\n+\n//invoke debuglaunchtargetprovider on this file\nvar fileContextActions = await node.Workspace.GetFileContextActionsAsync(packageJson.Main, new[] { DebugLaunchActionContext.ContextTypeGuid });\nif (fileContextActions.Any())\n" }, { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonScannerFactory.cs", "new_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonScannerFactory.cs", "diff": "@@ -43,13 +43,16 @@ namespace Microsoft.NodejsTools.Workspace\nvar packageJson = PackageJsonFactory.Create(filePath);\nvar main = packageJson.Main;\n- var fileReferences = new List<FileReferenceInfo>\n+\n+ var fileReferences = new List<FileReferenceInfo>();\n+\n+ if (!string.IsNullOrEmpty(main))\n{\n- new FileReferenceInfo(main,\n+ fileReferences.Add(new FileReferenceInfo(main,\ncontext: \"Debug\",\ntarget: main,\n- referenceType: (int)FileReferenceInfoType.Output)\n- };\n+ referenceType: (int)FileReferenceInfoType.Output));\n+ }\nreturn Task.FromResult(fileReferences);\n}\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Don't crash when there is no main script
410,204
10.04.2018 16:48:25
25,200
87166dd9ccf71c0508ff8914c903289f37faef8f
Add inspect brk parameter
[ { "change_type": "MODIFY", "old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs", "diff": "@@ -395,7 +395,7 @@ namespace Microsoft.NodejsTools.Project\nnew JProperty(\"program\", file),\nnew JProperty(\"args\", scriptArguments),\nnew JProperty(\"runtimeExecutable\", nodePath),\n- new JProperty(\"runtimeArgs\", runtimeArguments),\n+ new JProperty(\"runtimeArgs\", runtimeArguments.Concat(new[] { $\"--inspect-brk=${debuggerPort}\" }).ToArray()), // If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\nnew JProperty(\"port\", debuggerPort),\nnew JProperty(\"cwd\", cwd),\nnew JProperty(\"console\", \"externalTerminal\"),\n" } ]
C#
Apache License 2.0
microsoft/nodejstools
Add inspect brk parameter