diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index cde3f7b7a6..f120cef822 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,26 @@ # C/C++ for Visual Studio Code Change Log +## Version 0.26.2-insider: 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) +* Reset memory usage of the IntelliSense process if it grows beyond a threshold. [#4119](https://github.com/microsoft/vscode-cpptools/issues/4119) +* 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) + +### 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) +* Fix path canonicalization of UNC paths to avoid duplicate files opening with different casing. [#2528](https://github.com/microsoft/vscode-cpptools/issues/2528), [#3980](https://github.com/microsoft/vscode-cpptools/issues/3980) +* Fix an issue in which a header may be opened without IntelliSense due to creation of a TU from a source file that includes the header in an inactive region. [#4320](https://github.com/microsoft/vscode-cpptools/issues/4320) +* Fix a hang in the extension process that can occur when using a scope named 'interface'. [#4470](https://github.com/microsoft/vscode-cpptools/issues/4470) +* Fix an issue with the Rename UI that could cause the rename to not be applied. [#4504](https://github.com/microsoft/vscode-cpptools/issues/4504) +* Show an error message when a Rename fails due to the symbol not being found. [#4510](https://github.com/microsoft/vscode-cpptools/issues/4510) +* Fix an issue with `launch.json` creation due to localized strings containing quotes. [#4526](https://github.com/microsoft/vscode-cpptools/issues/4526) +* 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). + ## Version 0.26.1: October 28, 2019 ### Bug Fixes * Fix `launch.json` creation when using non-English display languages. [#4464](https://github.com/microsoft/vscode-cpptools/issues/4464) diff --git a/Extension/ThirdPartyNotices.txt b/Extension/ThirdPartyNotices.txt index 4e56aa93d6..bc96827291 100644 --- a/Extension/ThirdPartyNotices.txt +++ b/Extension/ThirdPartyNotices.txt @@ -646,7 +646,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- -debug 3.2.6 - MIT +debug 3.1.0 - MIT https://github.com/visionmedia/debug#readme Copyright (c) 2014 TJ Holowaychuk Copyright (c) 2014-2017 TJ Holowaychuk @@ -676,7 +676,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- -debug 3.1.0 - MIT +debug 3.2.6 - MIT https://github.com/visionmedia/debug#readme Copyright (c) 2014 TJ Holowaychuk Copyright (c) 2014-2017 TJ Holowaychuk @@ -883,7 +883,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -https-proxy-agent 2.2.2 - MIT +https-proxy-agent 2.2.4 - MIT https://github.com/TooTallNate/node-https-proxy-agent#readme Copyright (c) 2013 Nathan Rajlich diff --git a/Extension/gulpfile.js b/Extension/gulpfile.js index 449e410f8e..03e9ee456f 100644 --- a/Extension/gulpfile.js +++ b/Extension/gulpfile.js @@ -433,6 +433,7 @@ const generateLocalizedJsonSchemaFiles = () => { // Entire file is scanned and modified, then serialized for that language. // Even if no translations are available, we still write new files to dist/schema/... let keyPrefix = relativePath + "."; + keyPrefix = keyPrefix.replace(/\\/g, "/"); let descriptionCallback = (path, value, parent) => { if (stringTable[keyPrefix + path]) { parent.description = stringTable[keyPrefix + path]; diff --git a/Extension/i18n/chs/package.i18n.json b/Extension/i18n/chs/package.i18n.json index 283709d9c4..ced7188739 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": "为 IntelliSense 使用的缓存预编译标头定义文件夹路径。Windows 上的默认缓存路径为 \"%LocalAppData%/Microsoft/vscode-cpptools\",Linux 和 Mac 上为 \"~/.vscode-cpptools\"。如果未指定路径或指定路径无效,则使用默认路径。", + "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.intelliSenseCacheSize.description": "缓存的预编译标头的每个工作区硬盘驱动器空间的最大大小(MB);实际使用量可能在此值上下波动。默认大小为 5120 MB。当大小为 0 时,预编译的标头缓存将被禁用。", "c_cpp.configuration.default.includePath.description": "未指定 \"includePath\" 时要在配置中使用的值,或 \"includePath\" 中存在 \"${default}\" 时要插入的值。", "c_cpp.configuration.default.defines.description": "未指定 \"defines\" 时要在配置中使用的值,或 \"defines\" 中存在 \"${default}\" 时要插入的值。", @@ -70,6 +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.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 845939467d..acbb127ad6 100644 --- a/Extension/i18n/chs/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/chs/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "unable.to.locate.selected.symbol": "找不到所选符号的定义。", "unable.to.start": "无法启动 C/C++ 语言服务器。IntelliSense 功能将被禁用。错误: {0}", "check.permissions": "EPERM: 检查“{0}”的权限", "server.crashed": "在过去 3 分钟内,“{0}”的语言服务器崩溃了 5 次。它不会重新启动。", diff --git a/Extension/i18n/cht/package.i18n.json b/Extension/i18n/cht/package.i18n.json index 8c3921d816..e901408b7c 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": "定義 IntelliSense 使用之快取先行編譯標頭檔的資料夾路徑。預設快取路徑在 Windows 上為 \"%LocalAppData%/Microsoft/vscode-cpptools\",Linux 和 Mac 上為 \"~/.vscode-cpptools\"。如果未指定路徑或指定的路徑無效,就會使用預設路徑。", + "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.intelliSenseCacheSize.description": "快取先行編譯標頭檔的每個工作區硬碟空間大小上限 (mb); 實際使用量可能會在此值周圍波動。預設大小為 5120 MB。當大小為 0 時,會停用先行編譯的標頭快取。", "c_cpp.configuration.default.includePath.description": "當 \"includePath\" 未指定時,要在設定中使用的值,或 \"includePath\" 中有 \"${default}\" 時要插入的值。", "c_cpp.configuration.default.defines.description": "當 \"defines\" 未指定時,要在設定中使用的值,或 \"defines\" 中有 \"${default}\" 時要插入的值。", @@ -70,6 +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.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 8733da53c1..af22e0769f 100644 --- a/Extension/i18n/cht/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/cht/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "unable.to.locate.selected.symbol": "找不到所選符號的定義。", "unable.to.start": "無法啟動 C/C + + 語言伺服器。將停用 IntelliSense 功能。錯誤: {0}", "check.permissions": "EPERM: 檢查 '{0}' 的權限", "server.crashed": "'{0}' 的語言伺服器在過去 3 分鐘內發生 5 次故障。將不會重新啟動。", diff --git a/Extension/i18n/csy/package.i18n.json b/Extension/i18n/csy/package.i18n.json index b98a5e67d9..6ca92ee650 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": "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 a ~/.vscode-cpptools v Linuxu a na Macu. Výchozí cesta se použije, když se nezadá žádná cesta nebo když zadaná cesta nebude platná.", + "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.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}", @@ -70,6 +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.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 2cdf978ea8..28a755fa90 100644 --- a/Extension/i18n/csy/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/csy/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}.", "server.crashed": "Jazykový server pro {0} se 5krát za poslední 3 minuty chybově ukončil. Nebude se restartovat.", diff --git a/Extension/i18n/deu/package.i18n.json b/Extension/i18n/deu/package.i18n.json index b008560e46..0f3190de0f 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": "Hiermit wird der Ordnerpfad für zwischengespeicherte vorkompilierte Header definiert, die von IntelliSense verwendet werden. Der Standardcachepfad lautet \"%LocalAppData%/Microsoft/vscode-cpptools\" unter Windows und \"~/.vscode-cpptools\" unter Linux und Mac. Der Standardpfad wird verwendet, wenn kein Pfad angegeben wurde oder ein angegebener Pfad ungültig ist.", + "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.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.", @@ -70,6 +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.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 1b3ead1aac..6d952c30d6 100644 --- a/Extension/i18n/deu/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/deu/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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", "server.crashed": "Der Sprachserver für \"{0}\" ist in den letzten 3 Minuten 5-mal abgestürzt. Er wird nicht neu gestartet.", diff --git a/Extension/i18n/esn/package.i18n.json b/Extension/i18n/esn/package.i18n.json index e715e71c53..e766219499 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": "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 y \"~/.vscode-cpptools\" en Linux y 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.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.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\".", @@ -70,6 +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.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 ffe5e9f03b..19e319284d 100644 --- a/Extension/i18n/esn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/esn/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}\"", "server.crashed": "El servidor de lenguaje de \"{0}\" se ha bloqueado cinco veces en los tres últimos minutos. No se reiniciará.", diff --git a/Extension/i18n/fra/package.i18n.json b/Extension/i18n/fra/package.i18n.json index 48f037ecf3..c2b97596a9 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": "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 et \"~/.vscode-cpptools\" sur Linux et 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.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.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\".", @@ -70,6 +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.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 815ab34d5f..5b85844122 100644 --- a/Extension/i18n/fra/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/fra/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}'", "server.crashed": "Le serveur de langage pour '{0}' s'est bloqué 5 fois au cours des 3 dernières minutes. Il n'est pas redémarré.", diff --git a/Extension/i18n/ita/package.i18n.json b/Extension/i18n/ita/package.i18n.json index c94253fd38..16aca953da 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": "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 e \"~/.vscode-cpptools\" in Linux e Mac. Verrà usato il percorso predefinito se non ne viene specificato nessuno o se ne viene specificato uno non valido.", + "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.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\".", @@ -70,6 +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.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 6b2ec239bb..c2fabe640d 100644 --- a/Extension/i18n/ita/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ita/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}'", "server.crashed": "Si sono verificati cinque arresti anomali del server di linguaggio per '{0}' negli ultimi tre minuti. Non verrà riavviato.", diff --git a/Extension/i18n/jpn/package.i18n.json b/Extension/i18n/jpn/package.i18n.json index 63a0825ddc..026d0c499e 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": "IntelliSense が使用する、キャッシュされたプリコンパイル済みヘッダーのフォルダー パスを定義します。既定のキャッシュ パスは、Windows では \"%LocalAppData%/Microsoft/vscode-cpptools\"で、Linux および Mac では \"~/.vscode-cpptools\" です。パスが指定されていない場合、または指定したパスが無効な場合は、既定のパスが使用されます。", + "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.intelliSenseCacheSize.description": "キャッシュされたプリコンパイル済みヘッダーの、ワークスペースごとのハード ドライブ領域の最大サイズ (MB 単位)。実際の使用量には多少の誤差があります。既定のサイズは 5120 MB です。サイズが 0 の場合、プリコンパイル済みヘッダーのキャッシュは無効になります。", "c_cpp.configuration.default.includePath.description": "\"includePath\" が指定されていない場合に構成で使用される値、または \"includePath\" 内に \"${default}\" が存在する場合に挿入される値です。", "c_cpp.configuration.default.defines.description": "\"defines\" が指定されていない場合に構成で使用される値、または \"defines\" 内に \"${default}\" が存在する場合に挿入される値です。", @@ -70,6 +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.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 8a8f920a67..f6431591d8 100644 --- a/Extension/i18n/jpn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/jpn/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "unable.to.locate.selected.symbol": "選択されたシンボルの定義が見つかりませんでした。", "unable.to.start": "C/C++ 言語サーバーを起動できません。IntelliSense 機能は無効になります。エラー: {0}", "check.permissions": "EPERM: '{0}' のアクセス許可を確認してください", "server.crashed": "'{0}' の言語サーバーが過去 3 分間に 5 回クラッシュしました。再起動されません。", diff --git a/Extension/i18n/kor/package.i18n.json b/Extension/i18n/kor/package.i18n.json index 85a614c9f8..da4d47cc8d 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": "IntelliSense에서 사용하는 캐시된 미리 컴파일된 헤더의 폴더 경로를 정의합니다. 기본 캐시 경로는 Windows의 \"%LocalAppData%/Microsoft/vscode-cpptools\" 및 Linux 및 Mac의 \"~/.vscode-cpptools\"입니다. 경로를 지정하지 않거나 지정한 경로가 잘못된 경우 기본 경로가 사용됩니다.", + "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.intelliSenseCacheSize.description": "캐시된 미리 컴파일된 헤더에 대한 작업 영역당 하드 드라이브 공간의 최대 크기(MB)입니다. 실제 사용량은 이 값을 기준으로 변동될 수 있습니다. 기본 크기는 5120MB입니다. 크기가 0이면 미리 컴파일된 헤더 캐싱이 사용하지 않도록 설정됩니다.", "c_cpp.configuration.default.includePath.description": "\"includePath\"가 지정되지 않은 경우 구성에서 사용할 값 또는 \"${default}\"가 \"includePath\"에 있는 경우 삽입할 값입니다.", "c_cpp.configuration.default.defines.description": "\"defines\"가 지정되지 않은 경우 구성에서 사용할 값 또는 \"${default}\"가 \"defines\"에 있는 경우 삽입할 값입니다.", @@ -70,6 +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.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 a940f81852..6fbdda9f78 100644 --- a/Extension/i18n/kor/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/kor/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "unable.to.locate.selected.symbol": "선택한 기호에 대한 정의를 찾을 수 없습니다.", "unable.to.start": "C/C++ 언어 서버를 시작할 수 없습니다. IntelliSense 기능을 사용할 수 없습니다. 오류: {0}", "check.permissions": "EPERM: '{0}'에 대한 사용 권한 확인", "server.crashed": "지난 3분 동안 '{0}'의 언어 서버에서 크래시가 5회 발생했습니다. 다시 시작되지 않습니다.", diff --git a/Extension/i18n/plk/package.i18n.json b/Extension/i18n/plk/package.i18n.json index 680ca52adb..341279e35f 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": "Definiuje ścieżkę folderu dla prekompilowanych 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 systemach Windows i „~/.vscode-cpptools” w systemach Linux i Mac. Ścieżka domyślna zostanie użyta, jeśli nie zostanie określona żadna ścieżka lub określona ścieżka jest nieprawidłowa.", + "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.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”.", @@ -70,6 +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.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 6d60e9754a..5f72be50ff 100644 --- a/Extension/i18n/plk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/plk/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}”", "server.crashed": "W ciągu ostatnich 3 minut awaria serwera języka dla „{0}” wystąpiła 5 razy. Nie zostanie on ponownie uruchomiony.", diff --git a/Extension/i18n/ptb/package.i18n.json b/Extension/i18n/ptb/package.i18n.json index 0122b538e4..249e8b129e 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": "Define o caminho da pasta para cabeçalhos pré-compilados armazenados em cache usados pelo IntelliSense. O caminho de cache padrão é \"%LocalAppData%/Microsoft/vscode-cpptools\" no Windows e \"~/.vscode-cpptools\" em Linux e Mac. O caminho padrão será usado se nenhum caminho for especificado ou se um caminho especificado for inválido.", + "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.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\".", @@ -70,6 +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.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 78cb5e3af7..ea1b9963e9 100644 --- a/Extension/i18n/ptb/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ptb/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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}'", "server.crashed": "O servidor de idioma de '{0}' falhou cinco vezes nos últimos três minutos. Ele não será reiniciado.", diff --git a/Extension/i18n/rus/package.i18n.json b/Extension/i18n/rus/package.i18n.json index 77f310e69a..7729309a4e 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": "Определяет путь к папке для кэшированных предкомпилированных заголовков, используемых технологией IntelliSense. Путь к кэшу по умолчанию: \"%LocalAppData%/Microsoft/vscode-cpptools\" в Windows и \"~/.vscode-cpptools\" в Linux и Mac. Если путь не указан или указан недопустимый путь, используется путь по умолчанию.", + "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.intelliSenseCacheSize.description": "Максимальный размер (в мегабайтах) пространства на жестком диске для каждой рабочей области, предназначенный для кэшированных предкомпилированных заголовков; фактическое использование может колебаться в районе этого значения. Размер по умолчанию — 5120 МБ. Кэширование предкомпилированных заголовков отключено, если размер равен 0.", "c_cpp.configuration.default.includePath.description": "Значение, используемое в конфигурации, если параметр \"includePath\" не указан, или вставляемые значения, если в \"includePath\" присутствует значение \"${default}\".", "c_cpp.configuration.default.defines.description": "Значение, используемое в конфигурации, если параметр \"defines\" не указан, или вставляемые значения, если в \"defines\" присутствует значение \"${default}\".", @@ -70,6 +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.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 50f138c389..552c4b7f1d 100644 --- a/Extension/i18n/rus/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/rus/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "unable.to.locate.selected.symbol": "Не удалось найти определение для выбранного символа.", "unable.to.start": "Не удалось запустить языковой сервер C/C++. Функции IntelliSense будут отключены. Ошибка: {0}", "check.permissions": "EPERM: проверьте разрешения для \"{0}\"", "server.crashed": "Языковой сервер для \"{0}\" аварийно завершил работу 5 раз за последние 3 минуты. Он не будет перезапущен.", diff --git a/Extension/i18n/trk/package.i18n.json b/Extension/i18n/trk/package.i18n.json index d6bb228892..00d3eed58a 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": "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\" ve Linux ile Mac üzerinde: \"~/.vscode-cpptools\" şeklindedir. Yol belirtilmemişse veya belirtilen yol geçersizse, varsayılan yol kullanılır.", + "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.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.", @@ -70,6 +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.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 cb33bc20d9..26090387d1 100644 --- a/Extension/i18n/trk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/trk/src/LanguageServer/client.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.identifier.for.rename": "Invalid identifier provided for the Rename Symbol operation.", + "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", "server.crashed": "'{0}' için dil sunucusu, son 3 dakikada 5 kez kilitlendi. Sunucu yeniden başlatılmayacak.", diff --git a/Extension/package.json b/Extension/package.json index 101d3c40d9..75f88c6a8d 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "0.26.1", + "version": "0.26.2", "publisher": "ms-vscode", "preview": true, "icon": "LanguageCCPP_color_128x.png", @@ -562,6 +562,12 @@ "default": true, "markdownDescription": "%c_cpp.configuration.vcpkg.enabled.markdownDescription%", "scope": "resource" + }, + "C_Cpp.renameRequiresIdentifier": { + "type": "boolean", + "default": true, + "description": "%c_cpp.configuration.renameRequiresIdentifier.description%", + "scope": "application" } } }, @@ -1510,12 +1516,15 @@ }, { "language": "cpp" + }, + { + "language": "cuda" } ], "jsonValidation": [ { "fileMatch": "c_cpp_properties.json", - "url": "cpptools-schema://c_cpp_properties.schema.json" + "url": "cpptools-schema:///c_cpp_properties.schema.json" } ], "menus": { @@ -1767,7 +1776,7 @@ "runtimeDependencies": [ { "description": "C/C++ language components (Linux / x86_64)", - "url": "https://go.microsoft.com/fwlink/?linkid=2102495", + "url": "https://go.microsoft.com/fwlink/?linkid=2110060", "platforms": [ "linux" ], @@ -1781,7 +1790,7 @@ }, { "description": "C/C++ language components (Linux / x86)", - "url": "https://go.microsoft.com/fwlink/?linkid=2102592", + "url": "https://go.microsoft.com/fwlink/?linkid=2110156", "platforms": [ "linux" ], @@ -1797,7 +1806,7 @@ }, { "description": "C/C++ language components (OS X)", - "url": "https://go.microsoft.com/fwlink/?linkid=2102496", + "url": "https://go.microsoft.com/fwlink/?linkid=2110157", "platforms": [ "darwin" ], @@ -1808,7 +1817,7 @@ }, { "description": "C/C++ language components (Windows)", - "url": "https://go.microsoft.com/fwlink/?linkid=2102494", + "url": "https://go.microsoft.com/fwlink/?linkid=2110155", "platforms": [ "win32" ], @@ -1929,4 +1938,4 @@ "binaries": [] } ] -} +} \ No newline at end of file diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 71062b2e2b..9204419dcf 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -41,7 +41,7 @@ "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "The text that will be inserted on the next line when Enter is pressed inside a multiline or single line comment block.", "c_cpp.configuration.commentContinuationPatterns.description": "Defines the editor behavior for when the Enter key is pressed inside a multiline or single line comment block.", "c_cpp.configuration.configurationWarnings.description": "Determines whether pop up notifications will be shown when a configuration provider extension is unable to provide a configuration for a source file.", - "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 and \"~/.vscode-cpptools\" on Linux and Mac. The default path will be used if no path is specified or if a specified path is invalid.", + "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.intelliSenseCacheSize.description": "Maximum size of the per-workspace hard drive space in megabytes for cached precompiled headers; the actual usage may fluctuate around this value. The default size is 5120 MB. Precompiled header caching is disabled when the size is 0.", "c_cpp.configuration.default.includePath.description": "The value to use in a configuration if \"includePath\" is not specified, or the values to insert if \"${default}\" is present in \"includePath\".", "c_cpp.configuration.default.defines.description": "The value to use in a configuration if \"defines\" is not specified, or the values to insert if \"${default}\" is present in \"defines\".", @@ -65,6 +65,7 @@ "c_cpp.configuration.suggestSnippets.description": "If true, snippets are provided by the language server.", "c_cpp.configuration.enhancedColorization.description": "If enabled, code is colorized based on IntelliSense. This setting has no effect if IntelliSense is disabled or if using the Default High Contrast theme.", "c_cpp.configuration.vcpkg.enabled.markdownDescription": "Enable integration services for the [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.contributes.views.cppReferencesView.title": "C/C++: Other references results", "c_cpp.contributes.viewsContainers.activitybar.CppRenameActivityBar.title": "C/C++ Rename", "c_cpp.contributes.views.cppRenamePendingView.title": "PENDING RENAME", diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index a19801f967..9dae0b8190 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -382,11 +382,11 @@ abstract class DefaultConfigurationProvider implements IConfigurationAssetProvid class WindowsConfigurationProvider extends DefaultConfigurationProvider { private executable: string = "a.exe"; - private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe") + ">"; + private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/\"/g, "\\\"") + ">"; private MIMode: string = 'gdb'; private setupCommandsBlock: string = `"setupCommands": [ { - "description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb")}", + "description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}", "text": "-enable-pretty-printing", "ignoreFailures": true } @@ -420,7 +420,7 @@ class LinuxConfigurationProvider extends DefaultConfigurationProvider { private MIMode: string = 'gdb'; private setupCommandsBlock: string = `"setupCommands": [ { - "description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb")}", + "description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}", "text": "-enable-pretty-printing", "ignoreFailures": true } diff --git a/Extension/src/Debugger/configurations.ts b/Extension/src/Debugger/configurations.ts index f8f925c18f..d2ece2b000 100644 --- a/Extension/src/Debugger/configurations.ts +++ b/Extension/src/Debugger/configurations.ts @@ -39,7 +39,7 @@ function createLaunchString(name: string, type: string, executable: string): str return `"name": "${name}", "type": "${type}", "request": "launch", -"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable)}", +"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}", "args": [], "stopAtEntry": false, "cwd": "$\{workspaceFolder\}", @@ -54,7 +54,7 @@ function createAttachString(name: string, type: string, executable: string): str "type": "${type}", "request": "attach",{0} "processId": "$\{command:pickProcess\}" -`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable)}",` : ""]); +`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",` : ""]); } function createRemoteAttachString(name: string, type: string, executable: string): string { @@ -62,7 +62,7 @@ function createRemoteAttachString(name: string, type: string, executable: string "name": "${name}", "type": "${type}", "request": "attach", -"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable)}", +"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}", "processId": "$\{command:pickRemoteProcess\}" `; } @@ -107,7 +107,7 @@ abstract class Configuration implements IConfiguration { export class MIConfigurations extends Configuration { public GetLaunchConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("launch.string", "Launch")}`; + let name: string = `(${this.MIMode}) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`; let body: string = formatString(`{ \t${indentJsonString(createLaunchString(name, this.miDebugger, this.executable))}, @@ -117,7 +117,7 @@ this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalPrope return { "label": this.snippetPrefix + name, - "description": localize("launch.with", "Launch with {0}.", this.MIMode), + "description": localize("launch.with", "Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "isInitialConfiguration": true, "debuggerType": DebuggerType.cppdbg @@ -125,7 +125,7 @@ this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalPrope } public GetAttachConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("attach.string", "Attach")}`; + let name: string = `(${this.MIMode}) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`; let body: string = formatString(`{ \t${indentJsonString(createAttachString(name, this.miDebugger, this.executable))}, @@ -135,7 +135,7 @@ this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalPrope return { "label": this.snippetPrefix + name, - "description": localize("attach.with", "Attach with {0}.", this.MIMode), + "description": localize("attach.with", "Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppdbg }; @@ -146,7 +146,7 @@ this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalPrope export class PipeTransportConfigurations extends Configuration { public GetLaunchConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch")}`; + let name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch").replace(/\"/g, "\\\"")}`; let body: string = formatString(` { @@ -157,7 +157,7 @@ export class PipeTransportConfigurations extends Configuration { return { "label": this.snippetPrefix + name, - "description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode), + "description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppdbg }; @@ -165,7 +165,7 @@ export class PipeTransportConfigurations extends Configuration { } public GetAttachConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach")}`; + let name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach").replace(/\"/g, "\\\"")}`; let body: string = formatString(` { @@ -175,7 +175,7 @@ export class PipeTransportConfigurations extends Configuration { }`, [this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalProperties)}` : ""]); return { "label": this.snippetPrefix + name, - "description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode), + "description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppdbg }; @@ -186,7 +186,7 @@ export class PipeTransportConfigurations extends Configuration { export class WindowsConfigurations extends Configuration { public GetLaunchConfiguration(): IConfigurationSnippet { - let name: string = `(Windows) ${localize("launch.string", "Launch")}`; + let name: string = `(Windows) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`; let body: string = ` { @@ -195,7 +195,7 @@ export class WindowsConfigurations extends Configuration { return { "label": this.snippetPrefix + name, - "description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger."), + "description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""), "bodyText": body.trim(), "isInitialConfiguration": true, "debuggerType": DebuggerType.cppvsdbg @@ -204,7 +204,7 @@ export class WindowsConfigurations extends Configuration { } public GetAttachConfiguration(): IConfigurationSnippet { - let name: string = `(Windows) ${localize("attach.string", "Attach")}`; + let name: string = `(Windows) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`; let body: string = ` { @@ -213,7 +213,7 @@ export class WindowsConfigurations extends Configuration { return { "label": this.snippetPrefix + name, - "description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger."), + "description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppvsdbg }; @@ -226,7 +226,7 @@ export class WSLConfigurations extends Configuration { public bashPipeProgram = process.arch === 'ia32' ? "${env:windir}\\\\sysnative\\\\bash.exe" : "${env:windir}\\\\system32\\\\bash.exe"; public GetLaunchConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch")}`; + let name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch").replace(/\"/g, "\\\"")}`; let body: string = formatString(` { @@ -236,14 +236,14 @@ export class WSLConfigurations extends Configuration { return { "label": this.snippetPrefix + name, - "description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode), + "description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppdbg }; } public GetAttachConfiguration(): IConfigurationSnippet { - let name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach")}`; + let name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach").replace(/\"/g, "\\\"")}`; let body: string = formatString(` { @@ -253,7 +253,7 @@ export class WSLConfigurations extends Configuration { return { "label": this.snippetPrefix + name, - "description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode), + "description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""), "bodyText": body.trim(), "debuggerType": DebuggerType.cppdbg }; diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 8a87f3b667..2bd14a8538 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -26,7 +26,7 @@ import * as logger from '../logger'; import { updateLanguageConfigurations, registerCommands } from './extension'; import { SettingsTracker, getTracker } from './settingsTracker'; import { getTestHook, TestHook } from '../testHook'; -import { getCustomConfigProviders, CustomConfigurationProviderCollection, CustomConfigurationProvider1 } from '../LanguageServer/customProviders'; +import { getCustomConfigProviders, CustomConfigurationProviderCollection, CustomConfigurationProvider1, isSameProviderExtensionId } from '../LanguageServer/customProviders'; import { ABTestSettings, getABTestSettings } from '../abTesting'; import * as fs from 'fs'; import * as os from 'os'; @@ -118,27 +118,8 @@ interface QueryTranslationUnitSourceParams { uri: string; } -export enum QueryTranslationUnitSourceConfigDisposition { - - /** - * No custom config needed for this file - */ - ConfigNotNeeded = 0, - - /** - * Custom config is needed for this file - */ - ConfigNeeded = 1, - - /** - * Custom config is needed for the ancestor file returned in uri - */ - AncestorConfigNeeded = 2 -} - interface QueryTranslationUnitSourceResult { - uri: string; - configDisposition: QueryTranslationUnitSourceConfigDisposition; + candidates: string[]; } interface GetDiagnosticsResult { @@ -716,6 +697,12 @@ export class DefaultClient implements Client { this.client = client; } public async provideRenameEdits(document: vscode.TextDocument, position: vscode.Position, newName: string, token: vscode.CancellationToken): Promise { + let settings: CppSettings = new CppSettings(); + if (settings.renameRequiresIdentifier && !util.isValidIdentifier(newName)) { + vscode.window.showErrorMessage(localize("invalid.identifier.for.rename", "Invalid identifier provided for the Rename Symbol operation.")); + let workspaceEdit: vscode.WorkspaceEdit = new vscode.WorkspaceEdit(); + return Promise.resolve(workspaceEdit); + } // Normally, VS Code considers rename to be an atomic operation. // If the user clicks anywhere in the document, it attempts to cancel it. // Because that prevents our rename UI, we ignore cancellation requests. @@ -746,35 +733,50 @@ export class DefaultClient implements Client { } referencesRequestPending = true; this.client.references.setResultsCallback((referencesResult: refs.ReferencesResult, doResolve: boolean) => { - referencesRequestPending = false; - --renameRequestsPending; - let workspaceEdit: vscode.WorkspaceEdit = new vscode.WorkspaceEdit(); - let cancelling: boolean = referencesPendingCancellations.length > 0; - if (cancelling) { - while (referencesPendingCancellations.length > 1) { + if (doResolve && referencesResult === null) { + // The result callback will be called with doResult of true and a null result when the Find All References + // portion of the rename is complete. We complete the promise with an empty edit at this point, + // to cause the progress indicator to be dismissed. + let workspaceEdit: vscode.WorkspaceEdit = new vscode.WorkspaceEdit(); + resolve(workspaceEdit); + } else { + referencesRequestPending = false; + --renameRequestsPending; + let workspaceEdit: vscode.WorkspaceEdit = new vscode.WorkspaceEdit(); + let cancelling: boolean = referencesPendingCancellations.length > 0; + if (cancelling) { + while (referencesPendingCancellations.length > 1) { + let pendingCancel: ReferencesCancellationState = referencesPendingCancellations[0]; + referencesPendingCancellations.pop(); + pendingCancel.reject(); + } let pendingCancel: ReferencesCancellationState = referencesPendingCancellations[0]; referencesPendingCancellations.pop(); - pendingCancel.reject(); - } - let pendingCancel: ReferencesCancellationState = referencesPendingCancellations[0]; - referencesPendingCancellations.pop(); - pendingCancel.callback(); - } else { - if (renameRequestsPending === 0) { - renamePending = false; + pendingCancel.callback(); + } else { + if (renameRequestsPending === 0) { + renamePending = false; + } + // If rename UI was canceled, we will get a null result. + // If null, return an empty list to avoid Rename failure dialog. + if (referencesResult !== null) { + for (let reference of referencesResult.referenceInfos) { + let uri: vscode.Uri = vscode.Uri.file(reference.file); + let range: vscode.Range = new vscode.Range(reference.position.line, reference.position.character, reference.position.line, reference.position.character + referencesResult.text.length); + workspaceEdit.replace(uri, range, newName); + } + } + this.client.references.closeRenameUI(); } - // If rename UI was canceled, we will get a null result. - // If null, return an empty list to avoid Rename failure dialog. - if (referencesResult !== null) { - for (let reference of referencesResult.referenceInfos) { - let uri: vscode.Uri = vscode.Uri.file(reference.file); - let range: vscode.Range = new vscode.Range(reference.position.line, reference.position.character, reference.position.line, reference.position.character + referencesResult.text.length); - workspaceEdit.replace(uri, range, newName); + if (doResolve) { + if (referencesResult.referenceInfos === null || referencesResult.referenceInfos.length === 0) { + vscode.window.showErrorMessage(localize("unable.to.locate.selected.symbol", "A definition for the selected symbol could not be located.")); } + resolve(workspaceEdit); + } else if (workspaceEdit.size > 0) { + vscode.workspace.applyEdit(workspaceEdit); } - this.client.references.closeRenameUI(); } - resolve(workspaceEdit); }); this.client.references.startRename(params); }); @@ -1165,7 +1167,7 @@ export class DefaultClient implements Client { }, () => ask.Value = false); } - } else if (selectedProvider === provider.extensionId) { + } else if (isSameProviderExtensionId(selectedProvider, provider.extensionId)) { onRegistered(); telemetry.logLanguageServerEvent("customConfigurationProvider", { "providerId": provider.extensionId }); } else if (selectedProvider === provider.name) { @@ -1177,6 +1179,7 @@ export class DefaultClient implements Client { public updateCustomConfigurations(requestingProvider?: CustomConfigurationProvider1): Thenable { return this.notifyWhenReady(() => { + this.clearCustomConfigurations(); if (!this.configurationProvider) { return; } @@ -1294,7 +1297,7 @@ export class DefaultClient implements Client { return Promise.resolve(); } console.log("provideCustomConfiguration"); - let providerId: string|undefined = this.configuration.CurrentConfigurationProvider; + let providerId: string | undefined = this.configuration.CurrentConfigurationProvider; if (!providerId) { onFinished(); return Promise.resolve(); @@ -1305,43 +1308,48 @@ export class DefaultClient implements Client { uri: docUri.toString() }; let response: QueryTranslationUnitSourceResult = await this.languageClient.sendRequest(QueryTranslationUnitSourceRequest, params); - if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.ConfigNotNeeded) { + if (!response.candidates || response.candidates.length === 0) { + // If we didn't receive any candidates, no configuration is needed. onFinished(); return Promise.resolve(); } - let tuUri: vscode.Uri = vscode.Uri.parse(response.uri); - let configName: string = this.configuration.CurrentConfiguration.name; const notReadyMessage: string = `${providerName} is not ready`; - let provideConfigurationAsync: () => Thenable = async () => { - // The config requests that we use a provider, try to get IntelliSense configuration info from that provider. - try { - let provider: CustomConfigurationProvider1|null = providers.get(providerId); - if (provider) { - if (!provider.isReady) { - return Promise.reject(notReadyMessage); - } + let provider: CustomConfigurationProvider1 | null = providers.get(providerId); + if (provider) { + if (!provider.isReady) { + return Promise.reject(notReadyMessage); + } + providerName = provider.name; + } - providerName = provider.name; - if (await provider.canProvideConfiguration(tuUri, tokenSource.token)) { - return provider.provideConfigurations([tuUri], tokenSource.token); + // Need to loop through candidates, to see if we can get a custom configuration from any of them. + // Wrap all lookups in a single task, so we can apply a timeout to the entire duration. + let provideConfigurationAsync: () => Thenable = async () => { + if (provider) { + for (let i: number = 0; i < response.candidates.length; ++i) { + try { + let candidate: string = response.candidates[i]; + let tuUri: vscode.Uri = vscode.Uri.parse(candidate); + if (await provider.canProvideConfiguration(tuUri, tokenSource.token)) { + let configs: SourceFileConfigurationItem[] = await provider.provideConfigurations([tuUri], tokenSource.token); + if (configs && configs.length > 0 && configs[0]) { + return configs; + } + } + if (tokenSource.token.isCancellationRequested) { + return null; + } + } catch (err) { + console.warn("Caught exception request configuration"); } } - } catch (err) { } - console.warn("failed to provide configuration"); - return Promise.reject(""); }; - return this.callTaskWithTimeout(provideConfigurationAsync, configProviderTimeout, tokenSource).then( (configs: SourceFileConfigurationItem[]) => { if (configs && configs.length > 0) { this.sendCustomConfigurations(configs, false); - if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.AncestorConfigNeeded) { - // replacing uri with original uri - let newConfig: SourceFileConfigurationItem = { uri: docUri, configuration: configs[0].configuration }; - this.sendCustomConfigurations([newConfig], false); - } } onFinished(); }, @@ -1357,6 +1365,7 @@ export class DefaultClient implements Client { if (settings.configurationWarnings === "Enabled" && !this.isExternalHeader(docUri) && !vscode.debug.activeDebugSession) { const dismiss: string = localize("dismiss.button", "Dismiss"); const disable: string = localize("diable.warnings.button", "Disable Warnings"); + let configName: string = this.configuration.CurrentConfiguration.name; let message: string = localize("unable.to.provide.configuraiton", "{0} is unable to provide IntelliSense configuration information for '{1}'. Settings from the '{2}' configuration will be used instead.", providerName, docUri.fsPath, configName); @@ -1965,10 +1974,7 @@ export class DefaultClient implements Client { this.model.activeConfigName.Value = configurations[params.currentConfiguration].name; }).then(() => { let newProvider: string = this.configuration.CurrentConfigurationProvider; - if (this.configurationProvider !== newProvider) { - if (this.configurationProvider) { - this.clearCustomConfigurations(); - } + if (!isSameProviderExtensionId(newProvider, this.configurationProvider)) { this.configurationProvider = newProvider; this.updateCustomConfigurations(); this.updateCustomBrowseConfiguration(); diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index e50caa792a..5ff719042d 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -157,7 +157,7 @@ export class CppProperties { public get CurrentConfiguration(): Configuration { return this.Configurations ? this.Configurations[this.CurrentConfigurationIndex] : null; } public get KnownCompiler(): KnownCompiler[] { return this.knownCompilers; } - public get CurrentConfigurationProvider(): string|null { + public get CurrentConfigurationProvider(): string | null { if (this.CurrentConfiguration.configurationProvider) { return this.CurrentConfiguration.configurationProvider; } @@ -1022,7 +1022,7 @@ export class CppProperties { return errors; } - private validatePath(input: string|string[], isDirectory: boolean = true): string { + private validatePath(input: string | string[], isDirectory: boolean = true): string { if (!input) { return undefined; } @@ -1087,17 +1087,15 @@ export class CppProperties { return; } - if (!this.configurationJson.enableConfigurationSquiggles) { - this.diagnosticCollection.clear(); - return; - } - + // Disable squiggles if + // this.configurationJson.enableConfigurationSquiggles is false OR + // this.configurationJson.enableConfigurationSquiggles is undefined and settings.defaultEnableConfigurationSquiggles is false. const settings: CppSettings = new CppSettings(this.rootUri); - if (!settings.defaultEnableConfigurationSquiggles) { + if ((this.configurationJson.enableConfigurationSquiggles !== undefined && !this.configurationJson.enableConfigurationSquiggles) || + (this.configurationJson.enableConfigurationSquiggles === undefined && !settings.defaultEnableConfigurationSquiggles)) { this.diagnosticCollection.clear(); return; } - vscode.workspace.openTextDocument(this.propertiesFile).then((document: vscode.TextDocument) => { let diagnostics: vscode.Diagnostic[] = new Array(); diff --git a/Extension/src/LanguageServer/customProviders.ts b/Extension/src/LanguageServer/customProviders.ts index 3fa475982c..73f881c5da 100644 --- a/Extension/src/LanguageServer/customProviders.ts +++ b/Extension/src/LanguageServer/customProviders.ts @@ -17,6 +17,9 @@ export interface CustomConfigurationProvider1 extends CustomConfigurationProvide readonly version: Version; } +const oldCmakeToolsExtensionId: string = "vector-of-bool.cmake-tools"; +const newCmakeToolsExtensionId: string = "ms-vscode.cmake-tools"; + /** * Wraps the incoming CustomConfigurationProvider so that we can treat all of them as if they were the same version (e.g. latest) */ @@ -136,7 +139,7 @@ export class CustomConfigurationProviderCollection { console.error(`CustomConfigurationProvider was not registered. The following properties are missing from the implementation: ${missing.join(", ")}.`); } - private getId(provider: string|CustomConfigurationProvider): string { + private getId(provider: string | CustomConfigurationProvider): string { if (typeof provider === "string") { return provider; } else if (provider.extensionId) { @@ -179,12 +182,24 @@ export class CustomConfigurationProviderCollection { return !exists; } - public get(provider: string|CustomConfigurationProvider): CustomConfigurationProvider1|null { + public get(provider: string | CustomConfigurationProvider): CustomConfigurationProvider1 | null { let id: string = this.getId(provider); if (this.providers.has(id)) { return this.providers.get(id); } + + if (typeof provider === "string") { + // Consider old and new names for cmake-tools as equivalent + if (provider === newCmakeToolsExtensionId) { + id = oldCmakeToolsExtensionId; + } else if (provider === oldCmakeToolsExtensionId) { + id = newCmakeToolsExtensionId; + } + if (this.providers.has(id)) { + return this.providers.get(id); + } + } return null; } @@ -231,3 +246,15 @@ let providerCollection: CustomConfigurationProviderCollection = new CustomConfig export function getCustomConfigProviders(): CustomConfigurationProviderCollection { return providerCollection; } + +export function isSameProviderExtensionId(settingExtensionId: string, providerExtensionId: string): boolean { + if (settingExtensionId === providerExtensionId) { + return true; + } + // Consider old and new names for cmake-tools as equivalent + if ((settingExtensionId === newCmakeToolsExtensionId && providerExtensionId === oldCmakeToolsExtensionId) + || (settingExtensionId === oldCmakeToolsExtensionId && providerExtensionId === newCmakeToolsExtensionId)) { + return true; + } + return false; +} diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index a61c8ea580..f3cca6260f 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -471,15 +471,15 @@ function realActivation(): void { // Register a protocol handler to serve localized versions of the schema for c_cpp_properties.json class SchemaProvider implements vscode.TextDocumentContentProvider { public async provideTextDocumentContent(uri: vscode.Uri): Promise { - let fileName: string = uri.authority; + console.assert(uri.path[0] === '/', "A preceeding slash is expected on schema uri path"); + let fileName: string = uri.path.substr(1); let locale: string = util.getLocaleId(); let localizedFilePath: string = util.getExtensionFilePath(path.join("dist/schema/", locale, fileName)); - return util.checkFileExists(localizedFilePath).then((fileExists) => { - if (!fileExists) { - localizedFilePath = util.getExtensionFilePath(fileName); - } - return util.readFileText(localizedFilePath); - }); + const fileExists: boolean = await util.checkFileExists(localizedFilePath); + if (!fileExists) { + localizedFilePath = util.getExtensionFilePath(fileName); + } + return util.readFileText(localizedFilePath); } } diff --git a/Extension/src/LanguageServer/references.ts b/Extension/src/LanguageServer/references.ts index 1cd0470fc5..966b3f7c02 100644 --- a/Extension/src/LanguageServer/references.ts +++ b/Extension/src/LanguageServer/references.ts @@ -420,9 +420,12 @@ export class ReferencesManager { if (!foundUnconfirmed) { this.resultsCallback(referencesResult, true); } else { + // Passing a null result and doResult of true to resultsCallback will cause + // the RenameProvider to resolve the promise, which causes the progress bar to be dismissed. + this.resultsCallback(null, true); this.renameView.setData(referencesResult, this.groupByFile.Value, (result: ReferencesResult) => { this.referencesCanceled = false; - this.resultsCallback(result, true); + this.resultsCallback(result, false); }); this.renameView.show(true); } diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index d43c7170bc..7920eaf9f4 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -50,14 +50,15 @@ export class CppSettings extends Settings { public get loggingLevel(): string { return super.Section.get("loggingLevel"); } public get navigationLength(): number { return super.Section.get("navigation.length", 60); } public get autoAddFileAssociations(): boolean { return super.Section.get("autoAddFileAssociations"); } - public get workspaceParsingPriority(): boolean { return super.Section.get("workspaceParsingPriority"); } + public get workspaceParsingPriority(): string { return super.Section.get("workspaceParsingPriority"); } public get workspaceSymbols(): string { return super.Section.get("workspaceSymbols"); } - public get exclusionPolicy(): boolean { return super.Section.get("exclusionPolicy"); } + public get exclusionPolicy(): string { return super.Section.get("exclusionPolicy"); } public get commentContinuationPatterns(): (string | CommentPattern)[] { return super.Section.get<(string | CommentPattern)[]>("commentContinuationPatterns"); } public get configurationWarnings(): string { return super.Section.get("configurationWarnings"); } public get preferredPathSeparator(): string { return super.Section.get("preferredPathSeparator"); } public get updateChannel(): string { return super.Section.get("updateChannel"); } public get vcpkgEnabled(): boolean { return super.Section.get("vcpkg.enabled"); } + public get renameRequiresIdentifier(): boolean { return super.Section.get("renameRequiresIdentifier"); } public get defaultIncludePath(): string[] { return super.Section.get("default.includePath"); } public get defaultDefines(): string[] { return super.Section.get("default.defines"); } public get defaultMacFrameworkPath(): string[] { return super.Section.get("default.macFrameworkPath"); } diff --git a/Extension/src/LanguageServer/settingsPanel.ts b/Extension/src/LanguageServer/settingsPanel.ts index efd5d45450..0f58586575 100644 --- a/Extension/src/LanguageServer/settingsPanel.ts +++ b/Extension/src/LanguageServer/settingsPanel.ts @@ -153,7 +153,7 @@ export class SettingsPanel { return this.configValues; } - public updateConfigUI(configSelection: string[], configuration: config.Configuration, errors: config.ConfigurationErrors|null): void { + public updateConfigUI(configSelection: string[], configuration: config.Configuration, errors: config.ConfigurationErrors | null): void { if (this.panel) { this.updateWebview(configSelection, configuration, errors); } @@ -208,7 +208,7 @@ export class SettingsPanel { } } - private updateWebview(configSelection: string[], configuration: config.Configuration, errors: config.ConfigurationErrors|null): void { + private updateWebview(configSelection: string[], configuration: config.Configuration, errors: config.ConfigurationErrors | null): void { this.configValues = {...configuration}; // Copy configuration values this.isIntelliSenseModeDefined = (this.configValues.intelliSenseMode !== undefined); if (this.panel) { diff --git a/Extension/src/LanguageServer/ui.ts b/Extension/src/LanguageServer/ui.ts index 76fea00709..19e795bb61 100644 --- a/Extension/src/LanguageServer/ui.ts +++ b/Extension/src/LanguageServer/ui.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { Client } from './client'; import { ReferencesCommandMode, referencesCommandModeToString } from './references'; -import { getCustomConfigProviders, CustomConfigurationProviderCollection } from './customProviders'; +import { getCustomConfigProviders, CustomConfigurationProviderCollection, isSameProviderExtensionId } from './customProviders'; import * as nls from 'vscode-nls'; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); @@ -187,7 +187,7 @@ export class UI { .then(selection => (selection) ? selection.index : -1); } - public showConfigurationProviders(currentProvider: string|null): Thenable { + public showConfigurationProviders(currentProvider: string | null): Thenable { let options: vscode.QuickPickOptions = {}; options.placeHolder = localize("select.configuration.provider", "Select a Configuration Provider..."); let providers: CustomConfigurationProviderCollection = getCustomConfigProviders(); @@ -195,7 +195,7 @@ export class UI { let items: KeyedQuickPickItem[] = []; providers.forEach(provider => { let label: string = provider.name; - if (provider.extensionId === currentProvider) { + if (isSameProviderExtensionId(currentProvider, provider.extensionId)) { label += ` (${localize("active", "active")})`; } items.push({ label: label, description: "", key: provider.extensionId }); diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 58b8f1363c..47dc19b719 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -277,7 +277,7 @@ export function isArray(input: any): input is any[] { return input instanceof Array; } -export function isOptionalString(input: any): input is string|undefined { +export function isOptionalString(input: any): input is string | undefined { return input === undefined || isString(input); } @@ -285,7 +285,7 @@ export function isArrayOfString(input: any): input is string[] { return isArray(input) && input.every(isString); } -export function isOptionalArrayOfString(input: any): input is string[]|undefined { +export function isOptionalArrayOfString(input: any): input is string[] | undefined { return input === undefined || isArrayOfString(input); } @@ -957,3 +957,119 @@ export function getLocalizedString(params: LocalizeStringParams): string { } return indent + text; } + +function decodeUCS16(input: string): number[] { + let output: number[] = []; + let counter: number = 0; + let length: number = input.length; + let value: number; + let extra: number; + while (counter < length) { + value = input.charCodeAt(counter++); + // tslint:disable-next-line: no-bitwise + if ((value & 0xF800) === 0xD800 && counter < length) { + // high surrogate, and there is a next character + extra = input.charCodeAt(counter++); + // tslint:disable-next-line: no-bitwise + if ((extra & 0xFC00) === 0xDC00) { // low surrogate + // tslint:disable-next-line: no-bitwise + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + output.push(value, extra); + } + } else { + output.push(value); + } + } + return output; +} + +let allowedIdentifierUnicodeRanges: number[][] = [ + [0x0030, 0x0039], // digits + [0x0041, 0x005A], // upper case letters + [0x005F, 0x005F], // underscore + [0x0061, 0x007A], // lower case letters + [0x00A8, 0x00A8], // DIARESIS + [0x00AA, 0x00AA], // FEMININE ORDINAL INDICATOR + [0x00AD, 0x00AD], // SOFT HYPHEN + [0x00AF, 0x00AF], // MACRON + [0x00B2, 0x00B5], // SUPERSCRIPT TWO - MICRO SIGN + [0x00B7, 0x00BA], // MIDDLE DOT - MASCULINE ORDINAL INDICATOR + [0x00BC, 0x00BE], // VULGAR FRACTION ONE QUARTER - VULGAR FRACTION THREE QUARTERS + [0x00C0, 0x00D6], // LATIN CAPITAL LETTER A WITH GRAVE - LATIN CAPITAL LETTER O WITH DIAERESIS + [0x00D8, 0x00F6], // LATIN CAPITAL LETTER O WITH STROKE - LATIN SMALL LETTER O WITH DIAERESIS + [0x00F8, 0x167F], // LATIN SMALL LETTER O WITH STROKE - CANADIAN SYLLABICS BLACKFOOT W + [0x1681, 0x180D], // OGHAM LETTER BEITH - MONGOLIAN FREE VARIATION SELECTOR THREE + [0x180F, 0x1FFF], // SYRIAC LETTER BETH - GREEK DASIA + [0x200B, 0x200D], // ZERO WIDTH SPACE - ZERO WIDTH JOINER + [0x202A, 0x202E], // LEFT-TO-RIGHT EMBEDDING - RIGHT-TO-LEFT OVERRIDE + [0x203F, 0x2040], // UNDERTIE - CHARACTER TIE + [0x2054, 0x2054], // INVERTED UNDERTIE + [0x2060, 0x218F], // WORD JOINER - TURNED DIGIT THREE + [0x2460, 0x24FF], // CIRCLED DIGIT ONE - NEGATIVE CIRCLED DIGIT ZERO + [0x2776, 0x2793], // DINGBAT NEGATIVE CIRCLED DIGIT ONE - DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN + [0x2C00, 0x2DFF], // GLAGOLITIC CAPITAL LETTER AZU - COMBINING CYRILLIC LETTER IOTIFIED BIG YUS + [0x2E80, 0x2FFF], // CJK RADICAL REPEAT - IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID + [0x3004, 0x3007], // JAPANESE INDUSTRIAL STANDARD SYMBOL - IDEOGRAPHIC NUMBER ZERO + [0x3021, 0x302F], // HANGZHOU NUMERAL ONE - HANGUL DOUBLE DOT TONE MARK + [0x3031, 0xD7FF], // VERTICAL KANA REPEAT MARK - HANGUL JONGSEONG PHIEUPH-THIEUTH + [0xF900, 0xFD3D], // CJK COMPATIBILITY IDEOGRAPH-F900 - ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM + [0xFD40, 0xFDCF], // ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM - ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM + [0xFDF0, 0xFE44], // ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM - PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET + [0xFE47, 0xFFFD], // PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET - REPLACEMENT CHARACTER + [0x10000, 0x1FFFD], // LINEAR B SYLLABLE B008 A - CHEESE WEDGE (U+1F9C0) + [0x20000, 0x2FFFD], // + [0x30000, 0x3FFFD], // + [0x40000, 0x4FFFD], // + [0x50000, 0x5FFFD], // + [0x60000, 0x6FFFD], // + [0x70000, 0x7FFFD], // + [0x80000, 0x8FFFD], // + [0x90000, 0x9FFFD], // + [0xA0000, 0xAFFFD], // + [0xB0000, 0xBFFFD], // + [0xC0000, 0xCFFFD], // + [0xD0000, 0xDFFFD], // + [0xE0000, 0xEFFFD] // LANGUAGE TAG (U+E0001) - VARIATION SELECTOR-256 (U+E01EF) +]; + +let disallowedFirstCharacterIdentifierUnicodeRanges: number[][] = [ + [0x0030, 0x0039], // digits + [0x0300, 0x036F], // COMBINING GRAVE ACCENT - COMBINING LATIN SMALL LETTER X + [0x1DC0, 0x1DFF], // COMBINING DOTTED GRAVE ACCENT - COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW + [0x20D0, 0x20FF], // COMBINING LEFT HARPOON ABOVE - COMBINING ASTERISK ABOVE + [0xFE20, 0xFE2F], // COMBINING LIGATURE LEFT HALF - COMBINING CYRILLIC TITLO RIGHT HALF +]; + +export function isValidIdentifier(candidate: string): boolean { + if (!candidate) { + return false; + } + let decoded: number[] = decodeUCS16(candidate); + if (!decoded || !decoded.length) { + return false; + } + + // Reject if first character is disallowed + for (let i: number = 0; i < disallowedFirstCharacterIdentifierUnicodeRanges.length; i++) { + let disallowedCharacters: number[] = disallowedFirstCharacterIdentifierUnicodeRanges[i]; + if (decoded[0] >= disallowedCharacters[0] && decoded[0] <= disallowedCharacters[1]) { + return false; + } + } + + for (let position: number = 0; position < decoded.length; position++) { + let found: boolean = false; + for (let i: number = 0; i < allowedIdentifierUnicodeRanges.length; i++) { + let allowedCharacters: number[] = allowedIdentifierUnicodeRanges[i]; + if (decoded[position] >= allowedCharacters[0] && decoded[position] <= allowedCharacters[1]) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} diff --git a/Extension/ui/settings.html b/Extension/ui/settings.html index d340efe5e1..c2a02208be 100644 --- a/Extension/ui/settings.html +++ b/Extension/ui/settings.html @@ -572,7 +572,7 @@
Configuration provider
-
The ID of a VS Code extension that can provide IntelliSense configuration information for source files. For example, use the VS Code extension ID vector-of-bool.cmake-tools to provide configuration information from the CMake Tools extension.
+
The ID of a VS Code extension that can provide IntelliSense configuration information for source files. For example, use the VS Code extension ID ms-vscode.cmake-tools to provide configuration information from the CMake Tools extension.