From d3263a187e41e1a43171d6a28101f248c3fc7ff8 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Wed, 13 Nov 2019 11:26:59 -0800 Subject: [PATCH 01/17] Defer TU creation until editor for the file is visible in the UI. (#4593) --- .../src/LanguageServer/clientCollection.ts | 11 +----- Extension/src/LanguageServer/extension.ts | 39 +++++++++++++++---- .../src/LanguageServer/protocolFilter.ts | 34 ++++------------ .../languageServer.integration.test.ts | 13 +++++-- 4 files changed, 50 insertions(+), 47 deletions(-) diff --git a/Extension/src/LanguageServer/clientCollection.ts b/Extension/src/LanguageServer/clientCollection.ts index 7862346aab..e6c3953b5f 100644 --- a/Extension/src/LanguageServer/clientCollection.ts +++ b/Extension/src/LanguageServer/clientCollection.ts @@ -47,7 +47,6 @@ export class ClientCollection { this.languageClients.set(key, this.activeClient); this.disposables.push(vscode.workspace.onDidChangeWorkspaceFolders(e => this.onDidChangeWorkspaceFolders(e))); - this.disposables.push(vscode.workspace.onDidOpenTextDocument(d => this.onDidOpenTextDocument(d))); this.disposables.push(vscode.workspace.onDidCloseTextDocument(d => this.onDidCloseTextDocument(d))); } @@ -174,15 +173,7 @@ export class ClientCollection { newOwner.takeOwnership(document); } - private onDidOpenTextDocument(document: vscode.TextDocument): void { - if (document.languageId === "c" || document.languageId === "cpp" - || document.languageId === "json" && document.uri.fsPath.endsWith("c_cpp_properties.json")) { - // Make sure a client exists for this document's workspace. - this.getClientFor(document.uri); - } - } - - private getClientFor(uri: vscode.Uri): cpptools.Client { + public getClientFor(uri: vscode.Uri): cpptools.Client { let folder: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(uri); if (!folder) { return this.defaultClient; diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index f3cca6260f..a328f8795f 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -434,12 +434,6 @@ function realActivation(): void { clients = new ClientCollection(); ui = getUI(); - // Check for files left open from the previous session. We won't get events for these until they gain focus, - // so we manually activate the visible file. - if (vscode.workspace.textDocuments !== undefined && vscode.workspace.textDocuments.length > 0) { - onDidChangeActiveTextEditor(vscode.window.activeTextEditor); - } - // There may have already been registered CustomConfigurationProviders. // Request for configurations from those providers. clients.forEach(client => { @@ -569,10 +563,41 @@ function onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeE } function onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void { + // Process delayed didOpen for any visible editors we haven't seen before + editors.forEach(editor => { + if (editor.document.languageId === "c" || editor.document.languageId === "cpp" + || editor.document.languageId === "json" && editor.document.uri.fsPath.endsWith("c_cpp_properties.json")) { + let client: Client = clients.getClientFor(editor.document.uri); + if (client) { + if (clients.checkOwnership(client, editor.document)) { + if (!client.TrackedDocuments.has(editor.document)) { + // If not yet tracked, process as a newly opened file. (didOpen is sent to server in client.takeOwnership()). + client.TrackedDocuments.add(editor.document); + // Work around vscode treating ".C" as c, by adding this file name to file associations as cpp + if (editor.document.uri.path.endsWith(".C") && editor.document.languageId === "c") { + let cppSettings: CppSettings = new CppSettings(client.RootUri); + if (cppSettings.autoAddFileAssociations) { + const fileName: string = path.basename(editor.document.uri.fsPath); + const mappingString: string = fileName + "@" + editor.document.uri.fsPath; + client.addFileAssociations(mappingString, false); + } + } + client.provideCustomConfiguration(editor.document.uri, null); + client.notifyWhenReady(() => { + client.takeOwnership(editor.document); + client.onDidOpenTextDocument(editor.document); + }); + } + } + } + } + }); + clients.forEach(client => { let editorsForThisClient: vscode.TextEditor[] = []; editors.forEach(editor => { - if (editor.document.languageId === "c" || editor.document.languageId === "cpp") { + if (editor.document.languageId === "c" || editor.document.languageId === "cpp" + || editor.document.languageId === "json" && editor.document.uri.fsPath.endsWith("c_cpp_properties.json")) { if (clients.checkOwnership(client, editor.document)) { editorsForThisClient.push(editor); } diff --git a/Extension/src/LanguageServer/protocolFilter.ts b/Extension/src/LanguageServer/protocolFilter.ts index 45070fdaa0..648b7e874a 100644 --- a/Extension/src/LanguageServer/protocolFilter.ts +++ b/Extension/src/LanguageServer/protocolFilter.ts @@ -4,11 +4,9 @@ * ------------------------------------------------------------------------------------------ */ 'use strict'; -import * as path from 'path'; import { Middleware } from 'vscode-languageclient'; import { ClientCollection } from './clientCollection'; import { Client } from './client'; -import { CppSettings } from './settings'; export function createProtocolFilter(me: Client, clients: ClientCollection): Middleware { // Disabling lint for invoke handlers @@ -22,44 +20,28 @@ export function createProtocolFilter(me: Client, clients: ClientCollection): Mid /* tslint:enable */ return { - didOpen: (document, sendMessage) => { - if (clients.checkOwnership(me, document)) { - me.TrackedDocuments.add(document); - - // Work around vscode treating ".C" as c, by adding this file name to file associations as cpp - if (document.uri.path.endsWith(".C") && document.languageId === "c") { - let cppSettings: CppSettings = new CppSettings(me.RootUri); - if (cppSettings.autoAddFileAssociations) { - const fileName: string = path.basename(document.uri.fsPath); - const mappingString: string = fileName + "@" + document.uri.fsPath; - me.addFileAssociations(mappingString, false); - } - } - - me.provideCustomConfiguration(document.uri, null); - me.notifyWhenReady(() => { - me.onDidOpenTextDocument(document); - sendMessage(document); - }); - } + didOpen: (_document, _sendMessage) => { + // NO-OP + // didOpen handling has been moved to onDidChangeVisibleTextEditors in extension.ts. + // A file is only loaded when it is actually opened in the editor (not in response to + // control-hover, which sends a didOpen), and first becomes visible. }, didChange: (textDocumentChangeEvent, sendMessage) => { - if (clients.ActiveClient === me) { + if (clients.ActiveClient === me && me.TrackedDocuments.has(textDocumentChangeEvent.document)) { me.onDidChangeTextDocument(textDocumentChangeEvent); me.notifyWhenReady(() => sendMessage(textDocumentChangeEvent)); } }, willSave: defaultHandler, willSaveWaitUntil: (event, sendMessage) => { - if (clients.ActiveClient === me) { + if (clients.ActiveClient === me && me.TrackedDocuments.has(event.document)) { return me.requestWhenReady(() => sendMessage(event)); } return Promise.resolve([]); }, didSave: defaultHandler, didClose: (document, sendMessage) => { - if (clients.ActiveClient === me) { - console.assert(me.TrackedDocuments.has(document)); + if (clients.ActiveClient === me && me.TrackedDocuments.has(document)) { me.onDidCloseTextDocument(document); me.TrackedDocuments.delete(document); me.notifyWhenReady(() => sendMessage(document)); diff --git a/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts b/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts index 49094a8bf9..be1b28c8c7 100644 --- a/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts +++ b/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts @@ -207,7 +207,8 @@ suite("extensibility tests v3", function(): void { }); disposables.push(testHook); - await vscode.workspace.openTextDocument(path); + let document: vscode.TextDocument = await vscode.workspace.openTextDocument(path); + await vscode.window.showTextDocument(document); await testResult; }); }); @@ -298,7 +299,8 @@ suite("extensibility tests v2", function(): void { }); disposables.push(testHook); - await vscode.workspace.openTextDocument(path); + let document: vscode.TextDocument = await vscode.workspace.openTextDocument(path); + await vscode.window.showTextDocument(document); await testResult; }); }); @@ -373,7 +375,8 @@ suite("extensibility tests v1", function(): void { }); disposables.push(testHook); - await vscode.workspace.openTextDocument(path); + let document: vscode.TextDocument = await vscode.workspace.openTextDocument(path); + await vscode.window.showTextDocument(document); await testResult; }); }); @@ -445,7 +448,8 @@ suite("extensibility tests v0", function(): void { }); disposables.push(testHook); - await vscode.workspace.openTextDocument(path); + let document: vscode.TextDocument = await vscode.workspace.openTextDocument(path); + await vscode.window.showTextDocument(document); await testResult; }); }); @@ -459,6 +463,7 @@ suite("configuration tests", function() { } // Open a c++ file to start the language server. await vscode.workspace.openTextDocument({ language: "cpp", content: "int main() { return 0; }"}); + await vscode.window.showTextDocument(document); }); suiteTeardown(async function() { From 7b4288c6f498cdc6318c3e6c6b4416d3bbec3f77 Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 13 Nov 2019 11:27:44 -0800 Subject: [PATCH 02/17] Localization - Translated Strings (#4599) Bypassing validation as these are just string changes, not code changes. --- Extension/i18n/csy/package.i18n.json | 2 +- Extension/i18n/csy/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/deu/package.i18n.json | 2 +- Extension/i18n/deu/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/esn/package.i18n.json | 2 +- Extension/i18n/esn/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/fra/package.i18n.json | 2 +- Extension/i18n/fra/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/jpn/package.i18n.json | 2 +- Extension/i18n/jpn/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/kor/package.i18n.json | 2 +- Extension/i18n/kor/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/ptb/package.i18n.json | 2 +- Extension/i18n/ptb/src/LanguageServer/client.i18n.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Extension/i18n/csy/package.i18n.json b/Extension/i18n/csy/package.i18n.json index 6ca92ee650..3f94e4b90c 100644 --- a/Extension/i18n/csy/package.i18n.json +++ b/Extension/i18n/csy/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Pokud se nastaví na true, jazykový server poskytne fragmenty kódu.", "c_cpp.configuration.enhancedColorization.description": "Pokud se tato možnost povolí, kód se bude barvit podle IntelliSense. Toto nastavení nemá žádný vliv, pokud se zakáže IntelliSense nebo pokud se použije výchozí motiv Vysoký kontrast.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Povolte integrační služby pro [správce závislostí vcpkg](https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Když se tato hodnota nastaví na true, operace Přejmenovat symbol bude vyžadovat platný identifikátor C/C++.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: výsledky jiných odkazů", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Přejmenování C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "ČEKÁ NA PŘEJMENOVÁNÍ", diff --git a/Extension/i18n/csy/src/LanguageServer/client.i18n.json b/Extension/i18n/csy/src/LanguageServer/client.i18n.json index 28a755fa90..456be70831 100644 --- a/Extension/i18n/csy/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/csy/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Pro operaci Přejmenovat symbol se zadal neplatný identifikátor.", "unable.to.locate.selected.symbol": "Definice pro vybraný symbol se nenašla.", "unable.to.start": "Nepovedlo se spustit jazykový server C/C++. Funkce IntelliSense se zakážou. Chyba: {0}", "check.permissions": "EPERM: Zkontrolujte oprávnění pro {0}.", diff --git a/Extension/i18n/deu/package.i18n.json b/Extension/i18n/deu/package.i18n.json index 0f3190de0f..7a194d78e1 100644 --- a/Extension/i18n/deu/package.i18n.json +++ b/Extension/i18n/deu/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Wenn dieser Wert auf TRUE festgelegt ist, werden Codeausschnitte vom Sprachserver bereitgestellt.", "c_cpp.configuration.enhancedColorization.description": "Wenn diese Option aktiviert ist, wird der Code basierend auf IntelliSense eingefärbt. Diese Einstellung hat keine Auswirkungen, wenn IntelliSense deaktiviert ist oder wenn das standardmäßige Design mit hohem Kontrast verwendet wird.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Hiermit aktivieren Sie Integrationsdienste für den [vcpkg-Abhängigkeits-Manager](https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Bei TRUE ist für \"Symbol umbenennen\" ein gültiger C-/C++-Bezeichner erforderlich.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: andere Verweisergebnisse", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C-/C++-Umbenennung", "c_cpp.contributes.views.cppRenamePendingView.title": "UMBENENNUNG STEHT AUS", diff --git a/Extension/i18n/deu/src/LanguageServer/client.i18n.json b/Extension/i18n/deu/src/LanguageServer/client.i18n.json index 6d952c30d6..25b17c602e 100644 --- a/Extension/i18n/deu/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/deu/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Für den Vorgang zum Umbenennen eines Symbols wurde ein ungültiger Bezeichner angegeben.", "unable.to.locate.selected.symbol": "Eine Definition für das ausgewählte Symbol wurde nicht gefunden.", "unable.to.start": "Der C/C++-Sprachserver kann nicht gestartet werden. IntelliSense-Features werden deaktiviert. Fehler: {0}", "check.permissions": "EPERM: Berechtigungen für \"{0}\" überprüfen", diff --git a/Extension/i18n/esn/package.i18n.json b/Extension/i18n/esn/package.i18n.json index e766219499..b0886c5d31 100644 --- a/Extension/i18n/esn/package.i18n.json +++ b/Extension/i18n/esn/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Si se establece en true, el servidor de lenguaje proporciona los fragmentos de código.", "c_cpp.configuration.enhancedColorization.description": "Si se habilita esta opción, el código se colorea de acuerdo con IntelliSense. Esta configuración no tiene efecto si IntelliSense está deshabilitado o si se utiliza el tema de contraste alto predeterminado.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Habilita los servicios de integración para el [administrador de dependencias de vcpkg] (https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Si es true, \"Cambiar el nombre del símbolo\" requerirá un identificador de C/C++ válido.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: resultados de otras referencias", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Cambio de nombre de C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "CAMBIO DE NOMBRE PENDIENTE", diff --git a/Extension/i18n/esn/src/LanguageServer/client.i18n.json b/Extension/i18n/esn/src/LanguageServer/client.i18n.json index 19e319284d..685a7b6b76 100644 --- a/Extension/i18n/esn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/esn/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Se ha proporcionado un identificador no válido para la operación Cambiar el nombre del símbolo.", "unable.to.locate.selected.symbol": "No se encontró una definición para el símbolo seleccionado.", "unable.to.start": "No se puede iniciar el servidor de lenguaje de C/C++. Las características de IntelliSense se deshabilitarán. Error: {0}", "check.permissions": "EPERM: Compruebe los permisos de \"{0}\"", diff --git a/Extension/i18n/fra/package.i18n.json b/Extension/i18n/fra/package.i18n.json index c2b97596a9..bc809561bf 100644 --- a/Extension/i18n/fra/package.i18n.json +++ b/Extension/i18n/fra/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Si la valeur est true, des extraits de code sont fournis par le serveur de langage.", "c_cpp.configuration.enhancedColorization.description": "Si cette option est activée, la couleur du code est déterminée par IntelliSense. Ce paramètre n'a pas d'effet si IntelliSense est désactivé ou utilise le thème Contraste élevé par défaut.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Activez les services d'intégration pour le [gestionnaire de dépendances vcpkg] (https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Si la valeur est true, l'opération Renommer le symbole nécessite un identificateur C/C++ valide.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++ : Autres résultats des références", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Renommage C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "RENOMMAGE EN ATTENTE", diff --git a/Extension/i18n/fra/src/LanguageServer/client.i18n.json b/Extension/i18n/fra/src/LanguageServer/client.i18n.json index 5b85844122..3a442ef852 100644 --- a/Extension/i18n/fra/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/fra/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Identificateur non valide fourni pour l'opération Renommer le symbole.", "unable.to.locate.selected.symbol": "La définition du symbole sélectionné est introuvable.", "unable.to.start": "Impossible de démarrer le serveur de langage C/C++. Les fonctionnalités IntelliSense sont désactivées. Erreur : {0}", "check.permissions": "EPERM : Vérifier les autorisations de '{0}'", diff --git a/Extension/i18n/jpn/package.i18n.json b/Extension/i18n/jpn/package.i18n.json index 026d0c499e..194054d271 100644 --- a/Extension/i18n/jpn/package.i18n.json +++ b/Extension/i18n/jpn/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "true の場合、スニペットは言語サーバーによって提供されます。", "c_cpp.configuration.enhancedColorization.description": "有効にすると、IntelliSense に基づいてコードが色分けされます。この設定は、IntelliSense が無効になっている場合、または既定のハイ コントラスト テーマを使用している場合は効果がありません。", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "[vcpkg 依存関係マネージャー](https://aka.ms/vcpkg/) の統合サービスを有効にします。", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "true の場合、'シンボルの名前変更' には有効な C/C++ 識別子が必要です。", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: その他の参照結果", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ の名前変更", "c_cpp.contributes.views.cppRenamePendingView.title": "保留中の名前変更", diff --git a/Extension/i18n/jpn/src/LanguageServer/client.i18n.json b/Extension/i18n/jpn/src/LanguageServer/client.i18n.json index f6431591d8..8af9ce4e6d 100644 --- a/Extension/i18n/jpn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/jpn/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "シンボルの名前変更操作に対して無効な識別子が指定されました。", "unable.to.locate.selected.symbol": "選択されたシンボルの定義が見つかりませんでした。", "unable.to.start": "C/C++ 言語サーバーを起動できません。IntelliSense 機能は無効になります。エラー: {0}", "check.permissions": "EPERM: '{0}' のアクセス許可を確認してください", diff --git a/Extension/i18n/kor/package.i18n.json b/Extension/i18n/kor/package.i18n.json index da4d47cc8d..0b8e30f286 100644 --- a/Extension/i18n/kor/package.i18n.json +++ b/Extension/i18n/kor/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "True이면 언어 서버에서 코드 조각을 제공합니다.", "c_cpp.configuration.enhancedColorization.description": "사용하도록 설정된 경우 IntelliSense를 기반으로 코드 색이 지정됩니다. 이 설정은 기본 고대비 테마를 사용하거나 IntelliSense가 사용하지 않도록 설정된 경우 아무런 영향을 주지 않습니다.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "[vcpkg 종속성 관리자](https://aka.ms/vcpkg/)에 통합 서비스를 사용하도록 설정합니다.", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "true이면 '기호 이름 바꾸기'에 유효한 C/C++ 식별자가 필요합니다.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: 기타 참조 결과", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ 이름 바꾸기", "c_cpp.contributes.views.cppRenamePendingView.title": "보류 중인 이름 바꾸기", diff --git a/Extension/i18n/kor/src/LanguageServer/client.i18n.json b/Extension/i18n/kor/src/LanguageServer/client.i18n.json index 6fbdda9f78..732f30eb64 100644 --- a/Extension/i18n/kor/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/kor/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "기호 이름 바꾸기 작업에 잘못된 식별자가 제공되었습니다.", "unable.to.locate.selected.symbol": "선택한 기호에 대한 정의를 찾을 수 없습니다.", "unable.to.start": "C/C++ 언어 서버를 시작할 수 없습니다. IntelliSense 기능을 사용할 수 없습니다. 오류: {0}", "check.permissions": "EPERM: '{0}'에 대한 사용 권한 확인", diff --git a/Extension/i18n/ptb/package.i18n.json b/Extension/i18n/ptb/package.i18n.json index 249e8b129e..a19b860889 100644 --- a/Extension/i18n/ptb/package.i18n.json +++ b/Extension/i18n/ptb/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Se for true, os snippets serão fornecidos pelo servidor de idiomas.", "c_cpp.configuration.enhancedColorization.description": "Se habilitado, o código é colorizado com base no IntelliSense. Essa configuração não terá efeito se o IntelliSense estiver desabilitado ou se você estiver usando o tema de Alto Contraste Padrão.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Habilitar os serviços de integração para o [gerenciador de dependências vcpkg](https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Se for true, 'Renomear Símbolo' exigirá um identificador C/C++ válido.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: outros resultados de referências", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Renomeação do C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "RENOMEAÇÃO PENDENTE", diff --git a/Extension/i18n/ptb/src/LanguageServer/client.i18n.json b/Extension/i18n/ptb/src/LanguageServer/client.i18n.json index ea1b9963e9..1dd06f00a0 100644 --- a/Extension/i18n/ptb/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ptb/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Identificador inválido fornecido para a operação Renomear Símbolo.", "unable.to.locate.selected.symbol": "Não foi encontrada uma definição para o símbolo selecionado.", "unable.to.start": "Não é possível iniciar o servidor de linguagem C/C++. Os recursos do IntelliSense serão desabilitados. Erro: {0}", "check.permissions": "EPERM: verifique as permissões para '{0}'", From 59c90611c4b4e8d1a678faea29d34ca59c24310f Mon Sep 17 00:00:00 2001 From: csigs Date: Thu, 14 Nov 2019 09:59:50 -0800 Subject: [PATCH 03/17] Localization - Translated Strings (#4604) --- Extension/i18n/chs/package.i18n.json | 2 +- Extension/i18n/chs/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/cht/package.i18n.json | 2 +- Extension/i18n/cht/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/ita/package.i18n.json | 2 +- Extension/i18n/ita/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/plk/package.i18n.json | 2 +- Extension/i18n/plk/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/rus/package.i18n.json | 2 +- Extension/i18n/rus/src/LanguageServer/client.i18n.json | 2 +- Extension/i18n/trk/package.i18n.json | 2 +- Extension/i18n/trk/src/LanguageServer/client.i18n.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Extension/i18n/chs/package.i18n.json b/Extension/i18n/chs/package.i18n.json index ced7188739..8ef48180c7 100644 --- a/Extension/i18n/chs/package.i18n.json +++ b/Extension/i18n/chs/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "如果为 true,则由语言服务器提供片段。", "c_cpp.configuration.enhancedColorization.description": "如果启用了 IntelliSense,则基于 IntelliSense 对代码进行着色。如果禁用了 IntelliSense 或使用默认高对比度主题,则此设置不起任何作用。", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "为 [vcpkg 依赖关系管理器] 启用集成服务(https://aka.ms/vcpkg/)。", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "如果为 true,则“重命名符号”将需要有效的 C/C++ 标识符。", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: 其他引用结果", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ 重命名", "c_cpp.contributes.views.cppRenamePendingView.title": "正在等待重命名", diff --git a/Extension/i18n/chs/src/LanguageServer/client.i18n.json b/Extension/i18n/chs/src/LanguageServer/client.i18n.json index acbb127ad6..ef33ccb3eb 100644 --- a/Extension/i18n/chs/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/chs/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "为“重命名符号”操作提供的标识符无效。", "unable.to.locate.selected.symbol": "找不到所选符号的定义。", "unable.to.start": "无法启动 C/C++ 语言服务器。IntelliSense 功能将被禁用。错误: {0}", "check.permissions": "EPERM: 检查“{0}”的权限", diff --git a/Extension/i18n/cht/package.i18n.json b/Extension/i18n/cht/package.i18n.json index e901408b7c..40fb39a57a 100644 --- a/Extension/i18n/cht/package.i18n.json +++ b/Extension/i18n/cht/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "若為 true,則由語言伺服器提供程式碼片段。", "c_cpp.configuration.enhancedColorization.description": "若已啟用,將會根據 IntelliSense 將程式碼著色。如果已停用 IntelliSense 或使用預設高對比主題,此設定就沒有效果。", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "啟用 [vcpkg 相依性管理員](https://aka.ms/vcpkg/)的整合服務。", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "若為 true,則「重新命名符號」需要有效的 C/C++ 識別碼。", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: 其他參考結果", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ 重新命名", "c_cpp.contributes.views.cppRenamePendingView.title": "等待重新命名", diff --git a/Extension/i18n/cht/src/LanguageServer/client.i18n.json b/Extension/i18n/cht/src/LanguageServer/client.i18n.json index af22e0769f..3477ab4eff 100644 --- a/Extension/i18n/cht/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/cht/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "為重新命名符號作業提供的識別碼無效。", "unable.to.locate.selected.symbol": "找不到所選符號的定義。", "unable.to.start": "無法啟動 C/C + + 語言伺服器。將停用 IntelliSense 功能。錯誤: {0}", "check.permissions": "EPERM: 檢查 '{0}' 的權限", diff --git a/Extension/i18n/ita/package.i18n.json b/Extension/i18n/ita/package.i18n.json index 16aca953da..a0dc0e379a 100644 --- a/Extension/i18n/ita/package.i18n.json +++ b/Extension/i18n/ita/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Se è true, i frammenti vengono forniti dal server di linguaggio.", "c_cpp.configuration.enhancedColorization.description": "Se questa opzione è abilitata, il codice viene colorato in base a IntelliSense. Questa impostazione non ha alcun effetto se IntelliSense è disabilitato o se si usa il tema Contrasto elevato predefinito.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Abilita i servizi di integrazione per l'[utilità di gestione dipendenze di vcpkg] (https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Se è true, con 'Rinomina simbolo' sarà richiesto un identificatore C/C++ valido.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: Risultati altri riferimenti", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Ridenominazione C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "RIDENOMINAZIONE IN SOSPESO", diff --git a/Extension/i18n/ita/src/LanguageServer/client.i18n.json b/Extension/i18n/ita/src/LanguageServer/client.i18n.json index c2fabe640d..3b4afa1c6c 100644 --- a/Extension/i18n/ita/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ita/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "È stato specificato un identificatore non valido per l'operazione Rinomina simbolo.", "unable.to.locate.selected.symbol": "Non è stato possibile individuare una definizione per Il simbolo selezionato.", "unable.to.start": "Non è possibile avviare il server di linguaggio C/C++. Le funzionalità IntelliSense verranno disabilitate. Errore: {0}", "check.permissions": "EPERM: verificare le autorizzazioni per '{0}'", diff --git a/Extension/i18n/plk/package.i18n.json b/Extension/i18n/plk/package.i18n.json index 341279e35f..6dd9232962 100644 --- a/Extension/i18n/plk/package.i18n.json +++ b/Extension/i18n/plk/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Jeśli wartość to true, fragmenty kodu są udostępniane przez serwer języka.", "c_cpp.configuration.enhancedColorization.description": "Jeśli to ustawienie jest włączone, kod jest kolorowany na podstawie funkcji IntelliSense. To ustawienie nie ma żadnego efektu, jeśli funkcja IntelliSense jest wyłączona lub jest używana domyślna kompozycja z dużym kontrastem.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Włącz usługi integracji dla elementu [vcpkg dependency manager](https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Jeśli ma wartość true, operacja „Zmień nazwę symbolu” będzie wymagać prawidłowego identyfikatora C/C++.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: inne wyniki odwołań", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Zmiana nazwy w języku C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "OCZEKIWANIE NA ZMIANĘ NAZWY", diff --git a/Extension/i18n/plk/src/LanguageServer/client.i18n.json b/Extension/i18n/plk/src/LanguageServer/client.i18n.json index 5f72be50ff..6da97830db 100644 --- a/Extension/i18n/plk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/plk/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Podano nieprawidłowy identyfikator dla operacji Zmień nazwę symbolu.", "unable.to.locate.selected.symbol": "Nie można zlokalizować definicji wybranego symbolu.", "unable.to.start": "Nie można uruchomić serwera języka C/C++. Funkcje IntelliSense zostaną wyłączone. Błąd: {0}", "check.permissions": "EPERM: sprawdź uprawnienia dla elementu „{0}”", diff --git a/Extension/i18n/rus/package.i18n.json b/Extension/i18n/rus/package.i18n.json index 7729309a4e..3345d3deed 100644 --- a/Extension/i18n/rus/package.i18n.json +++ b/Extension/i18n/rus/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Если задано значение true, фрагменты кода предоставляются языковым сервером.", "c_cpp.configuration.enhancedColorization.description": "Если этот параметр включен, код выделяется цветом на основе IntelliSense. Этот параметр не работает, если функция IntelliSense отключена или используется тема с высокой контрастностью по умолчанию.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Включите службы интеграции для [диспетчера зависимостей vcpkg](https://aka.ms/vcpkg/).", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "Если этот параметр имеет значение true, для операции \"Переименование символов\" потребуется указать допустимый идентификатор C/C++.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: результаты по другим ссылкам", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "Переименование C/C++", "c_cpp.contributes.views.cppRenamePendingView.title": "Ожидание переименования", diff --git a/Extension/i18n/rus/src/LanguageServer/client.i18n.json b/Extension/i18n/rus/src/LanguageServer/client.i18n.json index 552c4b7f1d..d000729441 100644 --- a/Extension/i18n/rus/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/rus/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Указан недопустимый идентификатор для операции \"Переименование символов\".", "unable.to.locate.selected.symbol": "Не удалось найти определение для выбранного символа.", "unable.to.start": "Не удалось запустить языковой сервер C/C++. Функции IntelliSense будут отключены. Ошибка: {0}", "check.permissions": "EPERM: проверьте разрешения для \"{0}\"", diff --git a/Extension/i18n/trk/package.i18n.json b/Extension/i18n/trk/package.i18n.json index 00d3eed58a..b9ee3d6c0b 100644 --- a/Extension/i18n/trk/package.i18n.json +++ b/Extension/i18n/trk/package.i18n.json @@ -70,7 +70,7 @@ "c_cpp.configuration.suggestSnippets.description": "Değer true ise, kod parçacıkları dil sunucusu tarafından sağlanır.", "c_cpp.configuration.enhancedColorization.description": "Etkinleştirilirse, kod IntelliSense'e göre renklendirilir. IntelliSense devre dışı bırakılmışsa veya Varsayılan Yüksek Karşıtlık teması kullanılıyorsa bu ayarın bir etkisi olmaz.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "[vcpkg bağımlılık yöneticisi](https://aka.ms/vcpkg/) için tümleştirme hizmetlerini etkinleştirin.", - "c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.", + "c_cpp.configuration.renameRequiresIdentifier.description": "True ise, 'Sembolü Yeniden Adlandır' işlemi için geçerli bir C/C++ tanımlayıcısı gerekir.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: Diğer başvuru sonuçları", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ Yeniden Adlandırma", "c_cpp.contributes.views.cppRenamePendingView.title": "YENİDEN ADLANDIRMA BEKLENİYOR", diff --git a/Extension/i18n/trk/src/LanguageServer/client.i18n.json b/Extension/i18n/trk/src/LanguageServer/client.i18n.json index 26090387d1..f2f54bc555 100644 --- a/Extension/i18n/trk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/trk/src/LanguageServer/client.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "invalid.identifier.for.rename": "Sembolü Yeniden Adlandır işlemi için geçersiz tanımlayıcı sağlandı.", "unable.to.locate.selected.symbol": "Seçili sembolün tanımı bulunamadı.", "unable.to.start": "C/C++ dil sunucusu başlatılamıyor. IntelliSense özellikleri devre dışı bırakılacak. Hata: {0}", "check.permissions": "EPERM: '{0}' için izinleri denetle", From fcf2090ffdf00a0a53de5982d18eb2a36895f331 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Fri, 15 Nov 2019 14:40:34 -0800 Subject: [PATCH 04/17] Sort files in FAR and Rename UI (#4616) --- Extension/src/LanguageServer/referencesModel.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Extension/src/LanguageServer/referencesModel.ts b/Extension/src/LanguageServer/referencesModel.ts index a9e708c27f..c06106e119 100644 --- a/Extension/src/LanguageServer/referencesModel.ts +++ b/Extension/src/LanguageServer/referencesModel.ts @@ -103,7 +103,7 @@ export class ReferencesModel { result.push(node); } } - + result.sort((a, b) => a.filename.localeCompare(b.filename)); return result; } @@ -145,7 +145,9 @@ export class ReferencesModel { let empty: TreeNode[] = []; return empty; } - return this.nodes.filter(i => i.node === NodeType.fileWithPendingRef); + let result: TreeNode[] = this.nodes.filter(i => i.node === NodeType.fileWithPendingRef); + result.sort((a, b) => a.filename.localeCompare(b.filename)); + return result; } // For rename, this.nodes will contain only ReferenceItems's @@ -180,6 +182,7 @@ export class ReferencesModel { } } }); + result.sort((a, b) => a.filename.localeCompare(b.filename)); return result; } @@ -198,6 +201,7 @@ export class ReferencesModel { } } }); + result.sort((a, b) => a.filename.localeCompare(b.filename)); return result; } From 95f8f11dc42f84401dca2a16783d686f4775f732 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Fri, 15 Nov 2019 16:11:04 -0800 Subject: [PATCH 05/17] Fix casing of locale IDs for Chinese languages (#4620) --- Extension/gulpfile.js | 4 ++-- Extension/import_edge_strings.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Extension/gulpfile.js b/Extension/gulpfile.js index 03e9ee456f..f288de0160 100644 --- a/Extension/gulpfile.js +++ b/Extension/gulpfile.js @@ -35,8 +35,8 @@ const jsonSchemaFilesPatterns = [ ]; const languages = [ - { id: "zh-TW", folderName: "cht", transifexId: "zh-hant" }, - { id: "zh-CN", folderName: "chs", transifexId: "zh-hans" }, + { id: "zh-tw", folderName: "cht", transifexId: "zh-hant" }, + { id: "zh-cn", folderName: "chs", transifexId: "zh-hans" }, { id: "fr", folderName: "fra" }, { id: "de", folderName: "deu" }, { id: "it", folderName: "ita" }, diff --git a/Extension/import_edge_strings.js b/Extension/import_edge_strings.js index 1347e2dcb3..4510838655 100644 --- a/Extension/import_edge_strings.js +++ b/Extension/import_edge_strings.js @@ -21,8 +21,8 @@ if (!fs.existsSync(path.join(localizeRepoPath, ".git"))) { } const languages = [ - { id: "zh-TW", folderName: "cht", transifexId: "zh-hant" }, - { id: "zh-CN", folderName: "chs", transifexId: "zh-hans" }, + { id: "zh-tw", folderName: "cht", transifexId: "zh-hant" }, + { id: "zh-cn", folderName: "chs", transifexId: "zh-hans" }, { id: "fr", folderName: "fra" }, { id: "de", folderName: "deu" }, { id: "it", folderName: "ita" }, From 6f7689811090863f3ae3f9ad85e28fee86aaa251 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Fri, 15 Nov 2019 17:16:10 -0800 Subject: [PATCH 06/17] Address issue with TU not being created for file already open when activated (#4621) --- .../src/LanguageServer/protocolFilter.ts | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/Extension/src/LanguageServer/protocolFilter.ts b/Extension/src/LanguageServer/protocolFilter.ts index 648b7e874a..cc1a3ba2b6 100644 --- a/Extension/src/LanguageServer/protocolFilter.ts +++ b/Extension/src/LanguageServer/protocolFilter.ts @@ -4,9 +4,12 @@ * ------------------------------------------------------------------------------------------ */ 'use strict'; +import * as path from 'path'; import { Middleware } from 'vscode-languageclient'; import { ClientCollection } from './clientCollection'; import { Client } from './client'; +import * as vscode from 'vscode'; +import { CppSettings } from './settings'; export function createProtocolFilter(me: Client, clients: ClientCollection): Middleware { // Disabling lint for invoke handlers @@ -20,11 +23,37 @@ export function createProtocolFilter(me: Client, clients: ClientCollection): Mid /* tslint:enable */ return { - didOpen: (_document, _sendMessage) => { - // NO-OP - // didOpen handling has been moved to onDidChangeVisibleTextEditors in extension.ts. - // A file is only loaded when it is actually opened in the editor (not in response to - // control-hover, which sends a didOpen), and first becomes visible. + didOpen: (document, sendMessage) => { + let editor: vscode.TextEditor = vscode.window.visibleTextEditors.find(e => e.document === document); + if (editor) { + // If the file was visible editor when we were activated, we will not get a call to + // onDidChangeVisibleTextEditors, so immediately open any file that is visible when we receive didOpen. + // Otherwise, we defer opening the file until it's actually visible. + if (clients.checkOwnership(me, document)) { + me.TrackedDocuments.add(document); + if (document.uri.path.endsWith(".C") && document.languageId === "c") { + let cppSettings: CppSettings = new CppSettings(me.RootUri); + if (cppSettings.autoAddFileAssociations) { + const fileName: string = path.basename(document.uri.fsPath); + const mappingString: string = fileName + "@" + document.uri.fsPath; + me.addFileAssociations(mappingString, false); + } + } + me.provideCustomConfiguration(document.uri, null); + me.notifyWhenReady(() => { + sendMessage(document); + me.onDidOpenTextDocument(document); + }); + } + } else { + // NO-OP + // If the file is not opened into an editor (such as in response for a control-hover), + // we do not actually load a translation unit for it. When we receive a didOpen, the file + // may not yet be visible. So, we defer creation of the translation until we receive a + // call to onDidChangeVisibleTextEditors(), in extension.ts. A file is only loaded when + // it is actually opened in the editor (not in response to control-hover, which sends a + // didOpen), and first becomes visible. + } }, didChange: (textDocumentChangeEvent, sendMessage) => { if (clients.ActiveClient === me && me.TrackedDocuments.has(textDocumentChangeEvent.document)) { From e18d53e7baa102438efe553e873e34a9736283d2 Mon Sep 17 00:00:00 2001 From: csigs Date: Tue, 19 Nov 2019 14:02:24 -0800 Subject: [PATCH 07/17] Localization - Translated Strings (#4634) --- Extension/i18n/chs/package.i18n.json | 2 +- Extension/i18n/csy/package.i18n.json | 2 +- Extension/i18n/esn/package.i18n.json | 2 +- Extension/i18n/ita/package.i18n.json | 2 +- Extension/i18n/jpn/package.i18n.json | 2 +- Extension/i18n/kor/package.i18n.json | 2 +- Extension/i18n/plk/package.i18n.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Extension/i18n/chs/package.i18n.json b/Extension/i18n/chs/package.i18n.json index 8ef48180c7..92682bd922 100644 --- a/Extension/i18n/chs/package.i18n.json +++ b/Extension/i18n/chs/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "在多行或单行注释块内按下 Enter 键时要插入到下一行的文本。", "c_cpp.configuration.commentContinuationPatterns.description": "定义在多行或单行注释块内按下 Enter 键时的编辑器行为。", "c_cpp.configuration.configurationWarnings.description": "确定在配置提供程序扩展无法提供源文件配置时是否显示弹出通知。", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "为 IntelliSense 使用的缓存预编译标头定义文件夹路径。Windows 上的默认缓存路径为 \"%LocalAppData%/Microsoft/vscode-cpptools\",Linux 上为 \"$XDG_CACHE_HOME/vscode-cpptools/\" (若未定义 XDG_CACHE_HOME 则为 \"~/.cache/vscode-cpptools/\"),Mac 上为 \"~/Library/Caches/vscode-cpptools/\"。如果未指定路径或指定路径无效,则使用默认路径。", "c_cpp.configuration.intelliSenseCacheSize.description": "缓存的预编译标头的每个工作区硬盘驱动器空间的最大大小(MB);实际使用量可能在此值上下波动。默认大小为 5120 MB。当大小为 0 时,预编译的标头缓存将被禁用。", "c_cpp.configuration.default.includePath.description": "未指定 \"includePath\" 时要在配置中使用的值,或 \"includePath\" 中存在 \"${default}\" 时要插入的值。", "c_cpp.configuration.default.defines.description": "未指定 \"defines\" 时要在配置中使用的值,或 \"defines\" 中存在 \"${default}\" 时要插入的值。", diff --git a/Extension/i18n/csy/package.i18n.json b/Extension/i18n/csy/package.i18n.json index 3f94e4b90c..9fb04d01d6 100644 --- a/Extension/i18n/csy/package.i18n.json +++ b/Extension/i18n/csy/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Text, který se vloží na další řádek, když se ve víceřádkovém nebo jednořádkovém bloku komentáře stiskne klávesa Enter.", "c_cpp.configuration.commentContinuationPatterns.description": "Definuje chování editoru, když se ve víceřádkovém nebo jednořádkovém bloku komentáře stiskne klávesa Enter.", "c_cpp.configuration.configurationWarnings.description": "Určuje, jestli se budou zobrazovat automaticky otevíraná oznámení, když rozšíření poskytovatele konfigurací nebude moct poskytnout konfiguraci pro určitý zdrojový soubor.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Definuje cestu ke složce pro předkompilované hlavičky uložené do mezipaměti, které používá IntelliSense. Výchozí cesta k mezipaměti je %LocalAppData%/Microsoft/vscode-cpptools ve Windows, $XDG_CACHE_HOME/vscode-cpptools/ v Linuxu (případně ~/.cache/vscode-cpptools/, pokud se nedefinovalo XDG_CACHE_HOME) a ~/Library/Caches/vscode-cpptools/ na Macu. Výchozí cesta se použije, když se nezadá žádná cesta nebo když zadaná cesta nebude platná.", "c_cpp.configuration.intelliSenseCacheSize.description": "Maximální velikost místa na pevném disku pro předkompilované hlavičky uložené do mezipaměti na jeden pracovní prostor v megabajtech. Skutečné využití se může pohybovat kolem této hodnoty. Výchozí velikost je 5120 MB. Když se velikost nastaví na 0, ukládání předkompilovaných hlaviček do mezipaměti se zakáže.", "c_cpp.configuration.default.includePath.description": "Hodnota, která se použije v konfiguraci, pokud se nezadá includePath, nebo hodnoty, které se mají vložit, pokud se ve includePath nachází ${default}", "c_cpp.configuration.default.defines.description": "Hodnota, která se použije v konfiguraci, pokud se nezadá defines, nebo hodnoty, které se mají vložit, pokud se v defines nachází ${default}", diff --git a/Extension/i18n/esn/package.i18n.json b/Extension/i18n/esn/package.i18n.json index b0886c5d31..f933b3b7a9 100644 --- a/Extension/i18n/esn/package.i18n.json +++ b/Extension/i18n/esn/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Texto que se insertará en la línea siguiente cuando se presione Entrar dentro de un bloque de comentario de una o varias líneas.", "c_cpp.configuration.commentContinuationPatterns.description": "Define el comportamiento del editor para cuando se presiona la tecla Entrar dentro de un bloque de comentario de una o varias líneas.", "c_cpp.configuration.configurationWarnings.description": "Determina si se muestran notificaciones emergentes cuando una extensión del proveedor de configuración no puede proporcionar una configuración para un archivo de código fuente.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Define la ruta de acceso de la carpeta para los encabezados precompilados almacenados en caché que usa IntelliSense. La ruta de acceso de caché predeterminada es \"%LocalAppData%/Microsoft/vscode-cpptools\" en Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" en Linux (o \"~/.cache/vscode-cpptools/\" si XDG_CACHE_HOME no se ha definido) y \"~/Library/Caches/vscode-cpptools/\" en Mac. La ruta de acceso predeterminada se utiliza si no se especifica ninguna ruta de acceso o se especifica una que no es válida.", "c_cpp.configuration.intelliSenseCacheSize.description": "Tamaño máximo del espacio del disco duro por área de trabajo en megabytes para los encabezados precompilados almacenados en caché. El uso real puede fluctuar en torno a este valor. El tamaño predeterminado es 5120 MB. El almacenamiento en caché de encabezados precompilados está deshabilitado cuando el tamaño es 0.", "c_cpp.configuration.default.includePath.description": "Valor que debe usarse en una configuración si no se especifica \"includePath\", o bien los valores que deben insertarse si se especifica \"${default}\" en \"includePath\".", "c_cpp.configuration.default.defines.description": "Valor que debe usarse en una configuración si no se especifica \"defines\", o bien los valores que se deben insertar si se especifica \"${default}\" en \"defines\".", diff --git a/Extension/i18n/ita/package.i18n.json b/Extension/i18n/ita/package.i18n.json index a0dc0e379a..9e249d0ecf 100644 --- a/Extension/i18n/ita/package.i18n.json +++ b/Extension/i18n/ita/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Testo che verrà inserito alla riga successiva quando si preme INVIO all'interno di un blocco di commento su più righe o su una sola riga.", "c_cpp.configuration.commentContinuationPatterns.description": "Definisce il comportamento dell'editor quando si preme il tasto INVIO all'interno di un blocco di commento su più righe o su una sola riga.", "c_cpp.configuration.configurationWarnings.description": "Determina se verranno visualizzate le notifiche popup quando un'estensione del provider di configurazione non riesce a fornire una configurazione per un file di origine.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Definisce il percorso della cartella per le intestazioni precompilate memorizzate nella cache usate da IntelliSense. Il percorso predefinito della cache è \"%LocalAppData%/Microsoft/vscode-cpptools\" in Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" in Linux (o \"~/.cache/vscode-cpptools/\" se XDG_CACHE_HOME non è definito) e \"~/Library/Caches/vscode-cpptools/\" in Mac. Verrà usato il percorso predefinito se non ne viene specificato nessuno o se ne viene specificato uno non valido.", "c_cpp.configuration.intelliSenseCacheSize.description": "Dimensioni massime dello spazio su disco rigido per area di lavoro in MB per le intestazioni precompilate memorizzate nella cache. L'utilizzo effettivo potrebbe aggirarsi intorno a questo valore. Le dimensioni predefinite sono pari a 5120 MB. La memorizzazione nella cache dell'intestazione precompilata è disabilitata quando le dimensioni sono pari a 0.", "c_cpp.configuration.default.includePath.description": "Valore da usare in una configurazione se \"includePath\" non è specificato oppure valori da inserire se \"${default}\" è presente in \"includePath\".", "c_cpp.configuration.default.defines.description": "Valore da usare in una configurazione se \"defines\" non è specificato oppure valori da inserire se \"${default}\" è presente in \"defines\".", diff --git a/Extension/i18n/jpn/package.i18n.json b/Extension/i18n/jpn/package.i18n.json index 194054d271..031ea86d89 100644 --- a/Extension/i18n/jpn/package.i18n.json +++ b/Extension/i18n/jpn/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "複数行または単一行のコメント ブロック内で Enter を押したときに、次の行に挿入されるテキストです。", "c_cpp.configuration.commentContinuationPatterns.description": "複数行または単一行のコメント ブロック内で Enter キーが押されたときのエディターの動作を定義します。", "c_cpp.configuration.configurationWarnings.description": "構成プロバイダー拡張機能でソース ファイルの構成を提供できない場合に、ポップアップ通知を表示するかどうかを指定します。", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "IntelliSense が使用する、キャッシュされたプリコンパイル済みヘッダーのフォルダー パスを定義します。既定のキャッシュ パスは、Windows では \"%LocalAppData%/Microsoft/vscode-cpptools\"、Linux では \"$XDG_CACHE_HOME/vscode-cpptools/\" (XDG_CACHE_HOME が定義されていない場合は、\"~/.cache/vscode-cpptools/\")、Mac では \"~/Library/Caches/vscode-cpptools/\" です。パスが指定されていない場合、または指定したパスが無効な場合は、既定のパスが使用されます。", "c_cpp.configuration.intelliSenseCacheSize.description": "キャッシュされたプリコンパイル済みヘッダーの、ワークスペースごとのハード ドライブ領域の最大サイズ (MB 単位)。実際の使用量には多少の誤差があります。既定のサイズは 5120 MB です。サイズが 0 の場合、プリコンパイル済みヘッダーのキャッシュは無効になります。", "c_cpp.configuration.default.includePath.description": "\"includePath\" が指定されていない場合に構成で使用される値、または \"includePath\" 内に \"${default}\" が存在する場合に挿入される値です。", "c_cpp.configuration.default.defines.description": "\"defines\" が指定されていない場合に構成で使用される値、または \"defines\" 内に \"${default}\" が存在する場合に挿入される値です。", diff --git a/Extension/i18n/kor/package.i18n.json b/Extension/i18n/kor/package.i18n.json index 0b8e30f286..d88a4812ed 100644 --- a/Extension/i18n/kor/package.i18n.json +++ b/Extension/i18n/kor/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "여러 줄 또는 한 줄 주석 블록 내부에서 키를 누를 때 다음 줄에 삽입할 텍스트입니다.", "c_cpp.configuration.commentContinuationPatterns.description": "여러 줄 또는 한 줄 주석 블록 내에서 키를 누를 때 사용할 편집기 동작을 정의합니다.", "c_cpp.configuration.configurationWarnings.description": "구성 공급자 확장이 소스 파일의 구성을 제공할 수 없는 경우 팝업 알림을 표시할지 여부를 결정합니다.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "IntelliSense에서 사용하는 캐시되고 미리 컴파일된 헤더의 폴더 경로를 정의합니다. 기본 캐시 경로는 Windows의 \"%LocalAppData%/Microsoft/vscode-cpptools\", Linux의 \"$XDG_CACHE_HOME/vscode-cpptools/\"(또는 XDG_CACHE_HOME이 정의되지 않은 경우 \"~/.cache/vscode-cpptools/\"), Mac의 \"~/Library/Caches/vscode-cpptools/\"입니다. 경로를 지정하지 않거나 지정한 경로가 잘못된 경우 기본 경로를 사용합니다.", "c_cpp.configuration.intelliSenseCacheSize.description": "캐시된 미리 컴파일된 헤더에 대한 작업 영역당 하드 드라이브 공간의 최대 크기(MB)입니다. 실제 사용량은 이 값을 기준으로 변동될 수 있습니다. 기본 크기는 5120MB입니다. 크기가 0이면 미리 컴파일된 헤더 캐싱이 사용하지 않도록 설정됩니다.", "c_cpp.configuration.default.includePath.description": "\"includePath\"가 지정되지 않은 경우 구성에서 사용할 값 또는 \"${default}\"가 \"includePath\"에 있는 경우 삽입할 값입니다.", "c_cpp.configuration.default.defines.description": "\"defines\"가 지정되지 않은 경우 구성에서 사용할 값 또는 \"${default}\"가 \"defines\"에 있는 경우 삽입할 값입니다.", diff --git a/Extension/i18n/plk/package.i18n.json b/Extension/i18n/plk/package.i18n.json index 6dd9232962..bf2a3645e5 100644 --- a/Extension/i18n/plk/package.i18n.json +++ b/Extension/i18n/plk/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Tekst, który będzie wstawiany w następnym wierszu po naciśnięciu klawisza Enter w wielowierszowym lub jednowierszowym bloku komentarza.", "c_cpp.configuration.commentContinuationPatterns.description": "Definiuje zachowanie edytora po naciśnięciu klawisza Enter wewnątrz wielowierszowego lub jednowierszowego bloku komentarza.", "c_cpp.configuration.configurationWarnings.description": "Określa, czy powiadomienia wyskakujące mają być wyświetlane, gdy rozszerzenie dostawcy konfiguracji nie może udostępnić konfiguracji dla pliku źródłowego.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Definiuje ścieżkę folderu dla wstępnie skompilowanych nagłówków zapisanych w pamięci podręcznej używanych przez funkcję IntelliSense. Domyślna ścieżka pamięci podręcznej to „%LocalAppData%/Microsoft/vscode-cpptools” w systemie Windows, „$XDG_CACHE_HOME/vscode-cpptools/” w systemie Linux i „~/Library/Caches/vscode-cpptools/” na komputerach Mac. Ścieżka domyślna zostanie użyta, jeśli nie zostanie określona żadna ścieżka lub określona ścieżka będzie nieprawidłowa.", "c_cpp.configuration.intelliSenseCacheSize.description": "Maksymalny rozmiar miejsca na dysku twardym na obszar roboczy w megabajtach dla prekompilowanych nagłówków zapisanych w pamięci podręcznej; rzeczywiste użycie może oscylować wokół tej wartości. Rozmiar domyślny to 5120 MB. Buforowanie wstępnie skompilowane nagłówków jest wyłączone, gdy rozmiar ma wartość 0.", "c_cpp.configuration.default.includePath.description": "Wartość do użycia w konfiguracji, jeśli element „includePath” nie został określony, lub wartości do wstawienia, jeśli element „${default}” istnieje w ramach elementu „includePath”.", "c_cpp.configuration.default.defines.description": "Wartość do użycia w konfiguracji, jeśli element „defines” nie został określony, lub wartości do wstawienia, jeśli element „${default}” istnieje w ramach elementu „defines”.", From e2213568f38a7375e50d12e71b1f124dde36f2cf Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Wed, 20 Nov 2019 09:53:56 -0800 Subject: [PATCH 08/17] Extend .C handling to .H files as well (#4639) --- Extension/src/LanguageServer/extension.ts | 4 ++-- Extension/src/LanguageServer/protocolFilter.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index a328f8795f..9b72c0c9bb 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -573,8 +573,8 @@ function onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void { if (!client.TrackedDocuments.has(editor.document)) { // If not yet tracked, process as a newly opened file. (didOpen is sent to server in client.takeOwnership()). client.TrackedDocuments.add(editor.document); - // Work around vscode treating ".C" as c, by adding this file name to file associations as cpp - if (editor.document.uri.path.endsWith(".C") && editor.document.languageId === "c") { + // Work around vscode treating ".C" or ".H" as c, by adding this file name to file associations as cpp + if ((editor.document.uri.path.endsWith(".C") || editor.document.uri.path.endsWith(".H")) && editor.document.languageId === "c") { let cppSettings: CppSettings = new CppSettings(client.RootUri); if (cppSettings.autoAddFileAssociations) { const fileName: string = path.basename(editor.document.uri.fsPath); diff --git a/Extension/src/LanguageServer/protocolFilter.ts b/Extension/src/LanguageServer/protocolFilter.ts index cc1a3ba2b6..663e428df1 100644 --- a/Extension/src/LanguageServer/protocolFilter.ts +++ b/Extension/src/LanguageServer/protocolFilter.ts @@ -31,7 +31,7 @@ export function createProtocolFilter(me: Client, clients: ClientCollection): Mid // Otherwise, we defer opening the file until it's actually visible. if (clients.checkOwnership(me, document)) { me.TrackedDocuments.add(document); - if (document.uri.path.endsWith(".C") && document.languageId === "c") { + if ((document.uri.path.endsWith(".C") || document.uri.path.endsWith(".H")) && document.languageId === "c") { let cppSettings: CppSettings = new CppSettings(me.RootUri); if (cppSettings.autoAddFileAssociations) { const fileName: string = path.basename(document.uri.fsPath); From f6a2a65474961ea38e8b033238c2bf3108de23ac Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Wed, 20 Nov 2019 10:02:57 -0800 Subject: [PATCH 09/17] Make closeRenameUI safe to call even if Rename UI was never opened (#4640) --- Extension/src/LanguageServer/references.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Extension/src/LanguageServer/references.ts b/Extension/src/LanguageServer/references.ts index 966b3f7c02..3fa676872d 100644 --- a/Extension/src/LanguageServer/references.ts +++ b/Extension/src/LanguageServer/references.ts @@ -470,18 +470,24 @@ export class ReferencesManager { } public closeRenameUI(): void { - this.renameView.show(false); + if (this.renameView) { + this.renameView.show(false); + } } public clearViews(): void { - this.renameView.show(false); + if (this.renameView) { + this.renameView.show(false); + } // Rename should not clear the Find All References view, as it's in a different view container if (this.client.ReferencesCommandMode !== ReferencesCommandMode.Rename) { if (this.referencesChannel) { this.referencesChannel.clear(); } - this.findAllRefsView.show(false); + if (this.findAllRefsView) { + this.findAllRefsView.show(false); + } } } } From f3b5c507d8baa986750172f21099f3620cffdc3a Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 20 Nov 2019 10:24:02 -0800 Subject: [PATCH 10/17] Localization - Translated Strings (#4641) --- Extension/i18n/cht/package.i18n.json | 2 +- Extension/i18n/deu/package.i18n.json | 2 +- Extension/i18n/fra/package.i18n.json | 2 +- Extension/i18n/ptb/package.i18n.json | 2 +- Extension/i18n/rus/package.i18n.json | 2 +- Extension/i18n/trk/package.i18n.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Extension/i18n/cht/package.i18n.json b/Extension/i18n/cht/package.i18n.json index 40fb39a57a..dd1b9b6b17 100644 --- a/Extension/i18n/cht/package.i18n.json +++ b/Extension/i18n/cht/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "在多行或單行註解區塊中按下 ENTER 時,將在下一行插入的文字。", "c_cpp.configuration.commentContinuationPatterns.description": "定義在多行或單行註解區塊按下 ENTER 的編輯器行為。", "c_cpp.configuration.configurationWarnings.description": "決定當組態提供者延伸模組無法提供來源檔案的組態時,是否會顯示快顯通知。", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "定義 IntelliSense 使用之快取先行編譯標頭檔的資料夾路徑。預設快取路徑在 Windows 上為 \"%LocalAppData%/Microsoft/vscode-cpptools\",在 Linux 上為 \"$XDG_CACHE_HOME/vscode-cpptools/\" (若未定義 XDG_CACHE_HOME,則為 \"~/.cache/vscode-cpptools/\"),在 Mac 上則為 \"~/Library/Caches/vscode-cpptools/\"。如果未指定路徑或指定的路徑無效,就會使用預設路徑。", "c_cpp.configuration.intelliSenseCacheSize.description": "快取先行編譯標頭檔的每個工作區硬碟空間大小上限 (mb); 實際使用量可能會在此值周圍波動。預設大小為 5120 MB。當大小為 0 時,會停用先行編譯的標頭快取。", "c_cpp.configuration.default.includePath.description": "當 \"includePath\" 未指定時,要在設定中使用的值,或 \"includePath\" 中有 \"${default}\" 時要插入的值。", "c_cpp.configuration.default.defines.description": "當 \"defines\" 未指定時,要在設定中使用的值,或 \"defines\" 中有 \"${default}\" 時要插入的值。", diff --git a/Extension/i18n/deu/package.i18n.json b/Extension/i18n/deu/package.i18n.json index 7a194d78e1..5e748c0613 100644 --- a/Extension/i18n/deu/package.i18n.json +++ b/Extension/i18n/deu/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Der Text, der in der nächsten Zeile eingefügt wird, wenn in einem mehrzeiligen oder einzeiligen Kommentarblock die EINGABETASTE gedrückt wird.", "c_cpp.configuration.commentContinuationPatterns.description": "Definiert das Editor-Verhalten, wenn innerhalb eines mehrzeiligen oder einzeiligen Kommentarblocks die EINGABETASTE gedrückt wird.", "c_cpp.configuration.configurationWarnings.description": "Bestimmt, ob Popupbenachrichtigungen angezeigt werden, wenn eine Konfigurationsanbietererweiterung keine Konfiguration für eine Quelldatei bereitstellen kann.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Hiermit wird der Ordnerpfad für zwischengespeicherte vorkompilierte Header definiert, die von IntelliSense verwendet werden. Der Standardcachepfad lautet \"%LocalAppData%/Microsoft/vscode-cpptools\" unter Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" unter Linux (bzw. \"~/.cache/vscode-cpptools/\", wenn XDG_CACHE_HOME nicht definiert ist) und \"~/Library/Caches/vscode-cpptools/\" auf dem Mac. Der Standardpfad wird verwendet, wenn kein Pfad angegeben wurde oder ein angegebener Pfad ungültig ist.", "c_cpp.configuration.intelliSenseCacheSize.description": "Maximale Größe des Festplattenspeichers pro Arbeitsbereich in MB für zwischengespeicherte vorkompilierte Header; die tatsächliche Nutzung schwankt möglicherweise um diesen Wert. Die Standardgröße beträgt 5120 MB. Das Zwischenspeichern vorkompilierter Header ist deaktiviert, wenn die Größe 0 ist.", "c_cpp.configuration.default.includePath.description": "Der Wert, der in einer Konfiguration verwendet werden soll, wenn \"includePath\" nicht angegeben ist, oder die einzufügenden Werte, wenn \"${default}\" in \"includePath\" vorhanden ist.", "c_cpp.configuration.default.defines.description": "Der Wert, der in einer Konfiguration verwendet werden soll, wenn \"defines\" nicht angegeben ist, oder die einzufügenden Werte, wenn \"${default}\" in \"defines\" vorhanden ist.", diff --git a/Extension/i18n/fra/package.i18n.json b/Extension/i18n/fra/package.i18n.json index bc809561bf..320729f63a 100644 --- a/Extension/i18n/fra/package.i18n.json +++ b/Extension/i18n/fra/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Texte à insérer sur la ligne suivante quand vous appuyez sur la touche Entrée dans un bloc de commentaires multiligne ou monoligne.", "c_cpp.configuration.commentContinuationPatterns.description": "Définit le comportement de l'éditeur quand vous appuyez sur la touche Entrée dans un bloc de commentaires multiligne ou monoligne.", "c_cpp.configuration.configurationWarnings.description": "Détermine si des notifications de fenêtre contextuelle s'affichent quand une extension de fournisseur de configuration ne peut pas fournir la configuration d'un fichier source.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Définit le chemin de dossier des en-têtes précompilés mis en cache utilisés par IntelliSense. Le chemin du cache par défaut est \"%LocalAppData%/Microsoft/vscode-cpptools\" sur Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" sur Linux (ou \"~/.cache/vscode-cpptools/\" si XDG_CACHE_HOME n'est pas défini) et \"~/Library/Caches/vscode-cpptools/\" sur Mac. Le chemin par défaut est utilisé si aucun chemin n'est spécifié ou si le chemin spécifié n'est pas valide.", "c_cpp.configuration.intelliSenseCacheSize.description": "Taille maximale de l'espace du disque dur par espace de travail en mégaoctets pour les en-têtes précompilés mis en cache. L'utilisation réelle peut varier autour de cette valeur. La taille par défaut est 5 120 Mo. La mise en cache des en-têtes précompilés est désactivée quand la taille est égale à 0.", "c_cpp.configuration.default.includePath.description": "Valeur à utiliser dans une configuration si \"includePath\" n'est pas spécifié ou valeurs à insérer si \"${default}\" est présent dans \"includePath\".", "c_cpp.configuration.default.defines.description": "Valeur à utiliser dans une configuration si \"defines\" n'est pas spécifié ou valeurs à insérer si \"${default}\" est présent dans \"defines\".", diff --git a/Extension/i18n/ptb/package.i18n.json b/Extension/i18n/ptb/package.i18n.json index a19b860889..b7d1f54b28 100644 --- a/Extension/i18n/ptb/package.i18n.json +++ b/Extension/i18n/ptb/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "O texto que será inserido na próxima linha quando Enter for pressionado dentro de um bloco de comentário de linha única ou de várias linhas.", "c_cpp.configuration.commentContinuationPatterns.description": "Define o comportamento do editor para quando a tecla Enter é pressionada dentro de um bloco de comentário de linha única ou de várias linhas.", "c_cpp.configuration.configurationWarnings.description": "Determina se as notificações pop-up serão mostradas quando uma extensão do provedor de configuração não puder fornecer uma configuração para um arquivo de origem.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Define o caminho da pasta para os cabeçalhos pré-compilados armazenados em cache usados pelo IntelliSense. O caminho do cache padrão é \"%LocalAppData%/Microsoft/vscode-cpptools\" no Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" no Linux (ou \"~/.cache/vscode-cpptools/\" quando XDG_CACHE_HOME não está definido) e \"~/Library/Caches/vscode-cpptools/\" no Mac. O caminho padrão será usado se nenhum caminho for especificado ou se um caminho especificado for inválido.", "c_cpp.configuration.intelliSenseCacheSize.description": "Tamanho máximo do espaço de disco rígido por workspace, em megabytes, para cabeçalhos pré-compilados armazenados em cache; o uso real pode flutuar ao redor desse valor. O tamanho padrão é de 5120 MB. O cache pré-compilado de cabeçalho é desabilitado quando o tamanho é 0.", "c_cpp.configuration.default.includePath.description": "O valor a ser usado em uma configuração se \"includePath\" não for especificado ou os valores a serem inseridos se \"${default}\" estiver presente em \"includePath\".", "c_cpp.configuration.default.defines.description": "O valor a ser usado em uma configuração se \"defines\" não for especificado ou os valores a serem inseridos se \"${default}\" estiver presente em \"defines\".", diff --git a/Extension/i18n/rus/package.i18n.json b/Extension/i18n/rus/package.i18n.json index 3345d3deed..e0780034f4 100644 --- a/Extension/i18n/rus/package.i18n.json +++ b/Extension/i18n/rus/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Текст, который будет вставлен в следующую строку при нажатии клавиши ВВОД в многострочном или однострочном примечании.", "c_cpp.configuration.commentContinuationPatterns.description": "Определяет поведение редактора при нажатии клавиши ВВОД внутри многострочного или однострочного примечания.", "c_cpp.configuration.configurationWarnings.description": "Определяет, будут ли отображаться всплывающие уведомления, если расширение поставщика конфигурации не может предоставить конфигурацию для исходного файла.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "Определяет путь к папке для кэшированных предварительно скомпилированных заголовков, используемых IntelliSense. Путь к кэшу по умолчанию: \"%LocalAppData%/Microsoft/vscode-cpptools\" в Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" в Linux (или \"~/.cache/vscode-cpptools/\", если переменная среды XDG_CACHE_HOME не определена) и \"~/Library/Caches/vscode-cpptools/\" в Mac. Если путь не указан или указан недопустимый путь, используется путь по умолчанию.", "c_cpp.configuration.intelliSenseCacheSize.description": "Максимальный размер (в мегабайтах) пространства на жестком диске для каждой рабочей области, предназначенный для кэшированных предкомпилированных заголовков; фактическое использование может колебаться в районе этого значения. Размер по умолчанию — 5120 МБ. Кэширование предкомпилированных заголовков отключено, если размер равен 0.", "c_cpp.configuration.default.includePath.description": "Значение, используемое в конфигурации, если параметр \"includePath\" не указан, или вставляемые значения, если в \"includePath\" присутствует значение \"${default}\".", "c_cpp.configuration.default.defines.description": "Значение, используемое в конфигурации, если параметр \"defines\" не указан, или вставляемые значения, если в \"defines\" присутствует значение \"${default}\".", diff --git a/Extension/i18n/trk/package.i18n.json b/Extension/i18n/trk/package.i18n.json index b9ee3d6c0b..f42c866c22 100644 --- a/Extension/i18n/trk/package.i18n.json +++ b/Extension/i18n/trk/package.i18n.json @@ -46,7 +46,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "Çok satırlı veya tek satırlı açıklama bloğu içinde ENTER tuşuna basıldığında sonraki satıra eklenecek metin.", "c_cpp.configuration.commentContinuationPatterns.description": "Çok satırlı veya tek satırlı açıklama bloğu içinde ENTER tuşuna basıldığında yapılacak düzenleyici davranışını tanımlar.", "c_cpp.configuration.configurationWarnings.description": "Bir yapılandırma sağlayıcı uzantısı kaynak dosya için yapılandırma sağlayamadığında açılır pencere bildirimlerinin gösterilip gösterilmeyeceğini belirler.", - "c_cpp.configuration.intelliSenseCachePath.description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is \"%LocalAppData%/Microsoft/vscode-cpptools\" on Windows, \"$XDG_CACHE_HOME/vscode-cpptools/\" on Linux (or \"~/.cache/vscode-cpptools/\" if XDG_CACHE_HOME is not defined), and \"~/Library/Caches/vscode-cpptools/\" on Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "c_cpp.configuration.intelliSenseCachePath.description": "IntelliSense tarafından kullanılan, önbelleğe alınan önceden derlenmiş üst bilgilerin klasör yolunu tanımlar. Varsayılan önbellek yolu Windows üzerinde \"%LocalAppData%/Microsoft/vscode-cpptools\", Linux üzerinde \"$XDG_CACHE_HOME/vscode-cpptools/\" (veya XDG_CACHE_HOME tanımlanmamışsa \"~/.cache/vscode-cpptools/\") ve Mac üzerinde \"~/Library/Caches/vscode-cpptools/\" şeklindedir. Yol belirtilmezse veya belirtilen yol geçersizse varsayılan yol kullanılır.", "c_cpp.configuration.intelliSenseCacheSize.description": "Önbelleğe alınan önceden derlenmiş üst bilgiler için çalışma alanı başına sabit sürücü alanının megabayt cinsinden boyut üst sınırı. Gerçek kullanım bu değere yakın seyredebilir. Varsayılan boyut 5120 MB'tır. Boyut 0 olduğunda önceden derlenmiş üst bilgiyi önbelleğe alma özelliği devre dışı bırakılır.", "c_cpp.configuration.default.includePath.description": "\"includePath\" belirtilmemişse bir yapılandırmada kullanılacak değer veya \"includePath\" içinde \"${default}\" varsa eklenecek değerler.", "c_cpp.configuration.default.defines.description": "\"defines\" belirtilmemişse bir yapılandırmada kullanılacak değer veya \"defines\" içinde \"${default}\" varsa eklenecek değerler.", From d362ef9814da3f7169b7919dc6cae973b99c9d79 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Thu, 21 Nov 2019 12:30:17 -0800 Subject: [PATCH 11/17] Add strings for m32/m64 compiler fallback (#4644) --- Extension/src/LanguageServer/client.ts | 2 +- Extension/src/LanguageServer/extension.ts | 3 +-- Extension/src/nativeStrings.json | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 2bd14a8538..6bf769163b 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1994,7 +1994,7 @@ export class DefaultClient implements Client { private onCompileCommandsChanged(path: string): void { let params: FileChangedParams = { - uri: path + uri: vscode.Uri.file(path).toString() }; this.notifyWhenReady(() => this.languageClient.sendNotification(ChangeCompileCommandsNotification, params)); } diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 9b72c0c9bb..80cd8939ed 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -565,8 +565,7 @@ function onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeE function onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void { // Process delayed didOpen for any visible editors we haven't seen before editors.forEach(editor => { - if (editor.document.languageId === "c" || editor.document.languageId === "cpp" - || editor.document.languageId === "json" && editor.document.uri.fsPath.endsWith("c_cpp_properties.json")) { + if (editor.document.languageId === "c" || editor.document.languageId === "cpp") { let client: Client = clients.getClientFor(editor.document.uri); if (client) { if (clients.checkOwnership(client, editor.document)) { diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index 10f2009bec..0133f13fe2 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -150,5 +150,7 @@ "invalid_file_path": "Invalid file path {0}", "cant_create_intellisense_client_for": "Can't create IntelliSense client for {0}", "suffix_declaration": "declaration", - "suffix_type_alias": "type alias" + "suffix_type_alias": "type alias", + "fallback_to_32_bit_mode": "Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode", + "fallback_to_64_bit_mode": "Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode" } From 2300e3864562401df39349628e18f19f83ea6efa Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Thu, 21 Nov 2019 13:40:58 -0800 Subject: [PATCH 12/17] Update changelog for 0.26.2-insiders2 (#4648) --- Extension/CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index f120cef822..c1a8b14a15 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,6 +1,18 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.26.2-insider: November 12, 2019 +## Version 0.26.2-insiders2: November 21, 2019 +### Enchangements +* Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [4458](https://github.com/microsoft/vscode-cpptools/issues/4458) + +### Bug Fixes +* Fix an issue in which cancellation of Find All References could result in an exception. [2710](https://github.com/microsoft/vscode-cpptools/issues/2710) +* Fix sort order of files in Find All References and Rename UI. [4615](https://github.com/microsoft/vscode-cpptools/issues/4615) +* Fix an issue in which localized Chinese strings would not be displayed on systems with case-sensitive file systems. [4619](https://github.com/microsoft/vscode-cpptools/issues/4619) +* Fix an issue in 0.26.2-insiders in which memory cleanup in the native IntelliSense process might result in a crash. [4630](https://github.com/microsoft/vscode-cpptools/issues/4630) +* Fix an issue in which files with an extention of `.H` were not correctly associated with C++. [4632](https://github.com/microsoft/vscode-cpptools/issues/4632) +* Fix an issue in which -m64 or -m32 were not being passed to gcc, causing the reported system includes and system defines to not match the requested `intelliSenseMode`. [4635](https://github.com/microsoft/vscode-cpptools/issues/4635) + +## Version 0.26.2-insiders: November 12, 2019 ### Enhancements * Reworked how a source file is selected for TU creation when opening a header file. [#2856](https://github.com/microsoft/vscode-cpptools/issues/2856) * Updated the default value of the `C_Cpp.intelliSenseCachePath` setting to a path under `XDG_CACHE_HOME` on Linux, or `~/Library/Cache` on MacOS. [#3979](https://github.com/microsoft/vscode-cpptools/issues/3979) From 33f2d606e7712bd2e4c28bb3c000298463e26373 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Thu, 21 Nov 2019 16:52:31 -0800 Subject: [PATCH 13/17] Update changlog. Push out 1 day. (#4650) Bypassing checks, as file does not build. --- Extension/CHANGELOG.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index c1a8b14a15..d31ebec8c4 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,16 +1,16 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.26.2-insiders2: November 21, 2019 +## Version 0.26.2-insiders2: November 22, 2019 ### Enchangements -* Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [4458](https://github.com/microsoft/vscode-cpptools/issues/4458) +* Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [#4458](https://github.com/microsoft/vscode-cpptools/issues/4458) ### Bug Fixes -* Fix an issue in which cancellation of Find All References could result in an exception. [2710](https://github.com/microsoft/vscode-cpptools/issues/2710) -* Fix sort order of files in Find All References and Rename UI. [4615](https://github.com/microsoft/vscode-cpptools/issues/4615) -* Fix an issue in which localized Chinese strings would not be displayed on systems with case-sensitive file systems. [4619](https://github.com/microsoft/vscode-cpptools/issues/4619) -* Fix an issue in 0.26.2-insiders in which memory cleanup in the native IntelliSense process might result in a crash. [4630](https://github.com/microsoft/vscode-cpptools/issues/4630) -* Fix an issue in which files with an extention of `.H` were not correctly associated with C++. [4632](https://github.com/microsoft/vscode-cpptools/issues/4632) -* Fix an issue in which -m64 or -m32 were not being passed to gcc, causing the reported system includes and system defines to not match the requested `intelliSenseMode`. [4635](https://github.com/microsoft/vscode-cpptools/issues/4635) +* Fix an issue in which cancellation of Find All References could result in an exception. [#2710](https://github.com/microsoft/vscode-cpptools/issues/2710) +* Fix sort order of files in Find All References and Rename UI. [#4615](https://github.com/microsoft/vscode-cpptools/issues/4615) +* Fix an issue in which localized Chinese strings would not be displayed on systems with case-sensitive file systems. [#4619](https://github.com/microsoft/vscode-cpptools/issues/4619) +* Fix an issue in 0.26.2-insiders in which memory cleanup in the native IntelliSense process might result in a crash. [#4630](https://github.com/microsoft/vscode-cpptools/issues/4630) +* Fix an issue in which files with an extention of `.H` were not correctly associated with C++. [#4632](https://github.com/microsoft/vscode-cpptools/issues/4632) +* Fix an issue in which -m64 or -m32 were not being passed to gcc, causing the reported system includes and system defines to not match the requested `intelliSenseMode`. [#4635](https://github.com/microsoft/vscode-cpptools/issues/4635) ## Version 0.26.2-insiders: November 12, 2019 ### Enhancements From 922ac06e2d07fd10d12ea4d4180faa9059d75e9e Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Thu, 21 Nov 2019 17:05:13 -0800 Subject: [PATCH 14/17] correct spelling in changelog (#4651) Does not build. Bypassing checks. --- Extension/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index d31ebec8c4..4d1d88d740 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,7 +1,7 @@ # C/C++ for Visual Studio Code Change Log ## Version 0.26.2-insiders2: November 22, 2019 -### Enchangements +### Enhancements * Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [#4458](https://github.com/microsoft/vscode-cpptools/issues/4458) ### Bug Fixes From 8e1006d78d6853bbc61b3f4a411eaa3b8e19c79c Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Fri, 22 Nov 2019 16:27:58 -0800 Subject: [PATCH 15/17] Add new strings for bitness fallback (#4656) --- Extension/src/nativeStrings.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index 0133f13fe2..7367cc55f4 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -85,7 +85,7 @@ "terminating_child_process": "terminating child process: {0}", "still_alive_killing": "still alive, killing...", "giving_up": "giving up", - "not_exited_yet": "not exited yet. Will sleep for {0} milliseconds and try again", + "not_exited_yet": "not exited yet. Will sleep for {0} milliseconds and try again.", "failed_to_spawn_process": "Failed to spawn process. Error: {0} ({1})", "offering_completion": "Offering completion", "compiler_from_compiler_path": "Attempting to get defaults from compiler in \"compilerPath\" property: '{0}'", @@ -151,6 +151,9 @@ "cant_create_intellisense_client_for": "Can't create IntelliSense client for {0}", "suffix_declaration": "declaration", "suffix_type_alias": "type alias", - "fallback_to_32_bit_mode": "Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode", - "fallback_to_64_bit_mode": "Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode" + "fallback_to_32_bit_mode": "Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode.", + "fallback_to_64_bit_mode": "Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode.", + "fallback_to_32_bit_mode2": "Failed to query compiler. Falling back to 32-bit intelliSenseMode.", + "fallback_to_64_bit_mode2": "Failed to query compiler. Falling back to 64-bit intelliSenseMode.", + "fallback_to_no_bitness": "Failed to query compiler. Falling back to no bitness." } From 15235166734f46d473c42d98bd87e15a81f64437 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Mon, 25 Nov 2019 16:27:34 -0800 Subject: [PATCH 16/17] Update changelog. Other misc. (#4659) --- Extension/CHANGELOG.md | 5 +++++ Extension/src/cppTools.ts | 6 +++++- Extension/src/nativeStrings.json | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 4d1d88d740..518d60ecc2 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,10 @@ # C/C++ for Visual Studio Code Change Log +## Version 0.26.2-insiders3: November 25, 2019 +### Bug Fixes +* Fix an issue in which a header may be opened in a TU as C instead of C++. [#4632](https://github.com/microsoft/vscode-cpptools/issues/4632) +* Fix an issue introduced in the prior insiders release in which compiler probing would fail if gcc/clang did not support x86 or x64 architectures. [#4657](https://github.com/microsoft/vscode-cpptools/issues/4657) + ## Version 0.26.2-insiders2: November 22, 2019 ### Enhancements * Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [#4458](https://github.com/microsoft/vscode-cpptools/issues/4458) diff --git a/Extension/src/cppTools.ts b/Extension/src/cppTools.ts index 471070940f..90e7269ff6 100644 --- a/Extension/src/cppTools.ts +++ b/Extension/src/cppTools.ts @@ -11,6 +11,7 @@ import { getOutputChannel } from './logger'; import * as LanguageServer from './LanguageServer/extension'; import * as test from './testHook'; import * as nls from 'vscode-nls'; +import { CppSettings } from './LanguageServer/settings'; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle(); @@ -58,7 +59,10 @@ export class CppTools implements CppToolsTestApi { let providers: CustomConfigurationProviderCollection = getCustomConfigProviders(); if (providers.add(provider, this.version)) { let added: CustomConfigurationProvider1 = providers.get(provider); - getOutputChannel().appendLine(localize("provider.registered", "Custom configuration provider '{0}' registered", added.name)); + let settings: CppSettings = new CppSettings(); + if (settings.loggingLevel === "Information" || settings.loggingLevel === "Debug") { + getOutputChannel().appendLine(localize("provider.registered", "Custom configuration provider '{0}' registered", added.name)); + } this.providers.push(added); LanguageServer.getClients().forEach(client => client.onRegisterCustomConfigurationProvider(added)); this.addNotifyReadyTimer(added); diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index 7367cc55f4..38a8677278 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -155,5 +155,6 @@ "fallback_to_64_bit_mode": "Compiler does not support 32-bit. Falling back to 64-bit intelliSenseMode.", "fallback_to_32_bit_mode2": "Failed to query compiler. Falling back to 32-bit intelliSenseMode.", "fallback_to_64_bit_mode2": "Failed to query compiler. Falling back to 64-bit intelliSenseMode.", - "fallback_to_no_bitness": "Failed to query compiler. Falling back to no bitness." + "fallback_to_no_bitness": "Failed to query compiler. Falling back to no bitness.", + "intellisense_client_creation_aborted": "IntelliSense client creation aborted: {0}" } From 4edd43062ccdcfb146f8f5f5ea17fbc0a2fe5efc Mon Sep 17 00:00:00 2001 From: Michelle Matias <38734287+michelleangela@users.noreply.github.com> Date: Mon, 2 Dec 2019 14:47:18 -0800 Subject: [PATCH 17/17] change log for 26.2 (#4688) --- Extension/CHANGELOG.md | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 518d60ecc2..c5e71c0469 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,23 +1,6 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.26.2-insiders3: November 25, 2019 -### Bug Fixes -* Fix an issue in which a header may be opened in a TU as C instead of C++. [#4632](https://github.com/microsoft/vscode-cpptools/issues/4632) -* Fix an issue introduced in the prior insiders release in which compiler probing would fail if gcc/clang did not support x86 or x64 architectures. [#4657](https://github.com/microsoft/vscode-cpptools/issues/4657) - -## Version 0.26.2-insiders2: November 22, 2019 -### Enhancements -* Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [#4458](https://github.com/microsoft/vscode-cpptools/issues/4458) - -### Bug Fixes -* Fix an issue in which cancellation of Find All References could result in an exception. [#2710](https://github.com/microsoft/vscode-cpptools/issues/2710) -* Fix sort order of files in Find All References and Rename UI. [#4615](https://github.com/microsoft/vscode-cpptools/issues/4615) -* Fix an issue in which localized Chinese strings would not be displayed on systems with case-sensitive file systems. [#4619](https://github.com/microsoft/vscode-cpptools/issues/4619) -* Fix an issue in 0.26.2-insiders in which memory cleanup in the native IntelliSense process might result in a crash. [#4630](https://github.com/microsoft/vscode-cpptools/issues/4630) -* Fix an issue in which files with an extention of `.H` were not correctly associated with C++. [#4632](https://github.com/microsoft/vscode-cpptools/issues/4632) -* Fix an issue in which -m64 or -m32 were not being passed to gcc, causing the reported system includes and system defines to not match the requested `intelliSenseMode`. [#4635](https://github.com/microsoft/vscode-cpptools/issues/4635) - -## Version 0.26.2-insiders: November 12, 2019 +## Version 0.26.2: December 2, 2019 ### Enhancements * Reworked how a source file is selected for TU creation when opening a header file. [#2856](https://github.com/microsoft/vscode-cpptools/issues/2856) * Updated the default value of the `C_Cpp.intelliSenseCachePath` setting to a path under `XDG_CACHE_HOME` on Linux, or `~/Library/Cache` on MacOS. [#3979](https://github.com/microsoft/vscode-cpptools/issues/3979) @@ -25,6 +8,7 @@ * Add validation that the new symbol name provided to 'Rename Symbol' is a valid identifier. Add the setting `C_Cpp.renameRequiresIdentifier` to allow that verification to be disabled. [#4409](https://github.com/microsoft/vscode-cpptools/issues/4409) * Enable setting of breakpoints in CUDA sources. [PR #4585](https://github.com/microsoft/vscode-cpptools/pull/4585) * Paul Taylor (@trxcllnt) +* Deferred TU creation until the file is visible in the editor. This avoids the overhead of TU creation when the file is opened by VS Code internally for IntelliSense operations. [#4458](https://github.com/microsoft/vscode-cpptools/issues/4458) ### Bug Fixes * Fix child process creation when the Windows code page is set to a language with non-ASCII characters and there are non-ASCII characters in the extension's install path. [#1560](https://github.com/microsoft/vscode-cpptools/issues/1560) @@ -37,6 +21,11 @@ * Fix an issue with configuration error squiggles not being applied unless the setting was set in both `c_cpp_properties.json` and `settings.json`. [PR #4538](https://github.com/microsoft/vscode-cpptools/pull/4538) * Fix document symbol for outline view and breadcrumbs on Windows 7. [#4536](https://github.com/microsoft/vscode-cpptools/issues/4536). * Add support for `ms-vscode.cmake-tools` configurationProvider id. [#4586](https://github.com/microsoft/vscode-cpptools/issues/4586). +* Fix an issue in which cancellation of Find All References could result in an exception. [#2710](https://github.com/microsoft/vscode-cpptools/issues/2710) +* Fix sort order of files in Find All References and Rename UI. [#4615](https://github.com/microsoft/vscode-cpptools/issues/4615) +* Fix an issue in which localized Chinese strings would not be displayed on systems with case-sensitive file systems. [#4619](https://github.com/microsoft/vscode-cpptools/issues/4619) +* Fix an issue in which files with an extention of `.H` were not correctly associated with C++. [#4632](https://github.com/microsoft/vscode-cpptools/issues/4632) +* Fix an issue in which -m64 or -m32 were not being passed to gcc, causing the reported system includes and system defines to not match the requested `intelliSenseMode`. [#4635](https://github.com/microsoft/vscode-cpptools/issues/4635) ## Version 0.26.1: October 28, 2019 ### Bug Fixes