Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Nodejs/Product/Nodejs/NodejsPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ protected override void Initialize() {
public static LANGPREFERENCES3[] GetNodejsLanguagePreferencesFromTypeScript(IVsTextManager4 textMgr) {
var langPrefs = new LANGPREFERENCES3[1];
langPrefs[0].guidLang = Guids.TypeScriptLanguageInfo;
ErrorHandler.ThrowOnFailure(textMgr.GetUserPreferences4(null, langPrefs, null));
int hr = textMgr.GetUserPreferences4(null, langPrefs, null);
if (ErrorHandler.Failed(hr)) {
MessageBox.Show(Project.SR.GetString(Project.SR.CouldNotGetTypeScriptLanguagePreferences), Project.SR.ProductName);
ErrorHandler.ThrowOnFailure(hr);
}
langPrefs[0].guidLang = typeof(NodejsLanguageInfo).GUID;
textMgr.SetUserPreferences4(null, langPrefs, null);
return langPrefs;
Expand Down
1 change: 1 addition & 0 deletions Nodejs/Product/Nodejs/Project/ProjectResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ internal class SR : CommonSR {
internal const string CacheDirectoryClearFailedTitle = "CacheDirectoryClearFailedTitle";
internal const string CacheDirectoryClearFailedCaption = "CacheDirectoryClearFailedCaption";
internal const string ContinueWithoutAzureToolsUpgrade = "ContinueWithoutAzureToolsUpgrade";
internal const string CouldNotGetTypeScriptLanguagePreferences = "CouldNotGetTypeScriptLanguagePreferences";
internal const string DebuggerConnectionClosed = "DebuggerConnectionClosed";
internal const string DebuggerModuleUpdateFailed = "DebuggerModuleUpdateFailed";
internal const string DebuggerPort = "DebuggerPort";
Expand Down
3 changes: 3 additions & 0 deletions Nodejs/Product/Nodejs/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -627,4 +627,7 @@ You will need to restart Visual Studio after installation.</value>
<data name="TypingsToolCouldNotStart" xml:space="preserve">
<value>Could not start Typings tool used for IntelliSense</value>
</data>
<data name="CouldNotGetTypeScriptLanguagePreferences" xml:space="preserve">
<value>Could not retrieve Typescript language preferences. NTVS is not able to load. Please ensure Typescript is properly installed.</value>
</data>
</root>