Skip to content

Commit 783ef72

Browse files
committed
Merge for 0.26.0.
2 parents d68f76b + 7f1efd4 commit 783ef72

File tree

437 files changed

+61472
-10869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+61472
-10869
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ browse*.db*
44
*.obj
55
*.pdb
66
*.exe
7-
*.ilk
7+
*.ilk
8+
9+
# ignore exported localization xlf directory
10+
vscode-extensions-localization-export
11+
12+
# ignore imported localization xlf directory
13+
vscode-translations-import

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,18 @@
1818
* [**LanguageServer/configurations.ts**](Extension/src/LanguageServer/configurations.ts) handles functionality related to **c_cpp_properties.json**.
1919
* [**telemetry.ts**](Extension/src/telemetry.ts): Telemetry data gets sent to either `logLanguageServerEvent` or `logDebuggerEvent`.
2020
* The Tag Parser (symbol database) doesn't automatically expand macros, so the [**cpp.hint**](Extension/cpp.hint) file contains definitions of macros that should be expanded in order for symbols to be parsed correctly.
21+
22+
## String Localization
23+
24+
* [vscode-nls](https://github.com/microsoft/vscode-nls) is used to localize strings in TypeScript code. To use [vscode-nls](https://github.com/microsoft/vscode-nls), the source file must contain:
25+
```typescript
26+
import * as nls from 'vscode-nls';
27+
28+
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
29+
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
30+
```
31+
* For each user-facing string, wrap the string in a call to localize:
32+
```typescript
33+
const readmeMessage: string = localize("refer.read.me", "Please refer to {0} for troubleshooting information. Issues can be created at {1}", readmePath, "https://github.com/Microsoft/vscode-cpptools/issues");
34+
```
35+
* The first parameter to localize should be a unique key for that string, not used by any other call to localize() in the file unless representing the same string. The second parameter is the string to localize. Both of these parameters must be string literals. Tokens such as {0} and {1} are supported in the localizable string, with replacement values passed as additional parameters to localize().

Documentation/Building the Extension.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ These steps will allow you to debug the TypeScript code that is part of the Micr
55
Prerequisite steps:
66
* Clone the release branch of [this](https://github.com/Microsoft/vscode-cpptools) repository.
77
* git clone -b release https://github.com/Microsoft/vscode-cpptools
8-
* Install [npm](https://nodejs.org).
8+
* Install [node](https://nodejs.org).
9+
* Install [yarn](https://yarnpkg.com).
910
* From a command line, run the following commands from the **Extension** folder in the root of the repository:
10-
* `npm install` will install the dependencies needed to build the extension.
11-
* **(optional)** `npm install -g vsce` will install `vsce` globally to create a VSIX package that you can install.
11+
* `yarn install` will install the dependencies needed to build the extension.
12+
* **(optional)** `yarn global add vsce` will install `vsce` globally to create a VSIX package that you can install.
1213
* **(optional)** Set an environment variable `CPPTOOLS_DEV=1`.
1314
* This enables the local developer workflow when testing the debugger, copying dependencies from the **node_modules** folder. Testing the language server does not require this step.
1415
* Open the **Extension** folder in Visual Studio Code and press F5. This will launch a VS Code Extension Host window and activate the TypeScript debugger. You can set breakpoints on the extension source code and debug your scenario.

Extension/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,14 @@ install.lock
1919

2020
# ignore vscode test
2121
.vscode-test/
22+
23+
# ignore generated localization file
24+
**/nls.*.json
25+
**/*.nls.json
26+
**/*.nls.*.json
27+
28+
# ignore generate native header
29+
localized_string_ids.h
30+
31+
# ignore generate files. It will be generated when building
32+
src/nativeStrings.ts

Extension/.vscode/launch.json

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"configurations": [
55
{
6-
"name": "Launch Extension",
6+
"name": "Launch Extension (development)",
77
"type": "extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
@@ -17,6 +17,65 @@
1717
],
1818
"preLaunchTask": "Compile Dev",
1919
},
20+
{
21+
"name": "Launch Extension (production)",
22+
"type": "extensionHost",
23+
"request": "launch",
24+
"runtimeExecutable": "${execPath}",
25+
"args": [
26+
"--extensionDevelopmentPath=${workspaceFolder}"
27+
],
28+
"stopOnEntry": false,
29+
"sourceMaps": true,
30+
"outFiles": [
31+
"${workspaceFolder}/dist/**/*.js"
32+
],
33+
"preLaunchTask": "TypeScript Compile",
34+
},
35+
{
36+
"name": "Launch Extension (do not build)",
37+
"type": "extensionHost",
38+
"request": "launch",
39+
"runtimeExecutable": "${execPath}",
40+
"args": [
41+
"--extensionDevelopmentPath=${workspaceFolder}"
42+
],
43+
"stopOnEntry": false,
44+
"sourceMaps": true,
45+
"outFiles": [
46+
"${workspaceFolder}/dist/**/*.js"
47+
]
48+
},
49+
{
50+
"name": "Launch Extension (watch, development)",
51+
"type": "extensionHost",
52+
"request": "launch",
53+
"runtimeExecutable": "${execPath}",
54+
"args": [
55+
"--extensionDevelopmentPath=${workspaceFolder}"
56+
],
57+
"stopOnEntry": false,
58+
"sourceMaps": true,
59+
"outFiles": [
60+
"${workspaceFolder}/dist/**/*.js"
61+
],
62+
"preLaunchTask": "Compile Dev Watch",
63+
},
64+
{
65+
"name": "Launch Extension (watch, production)",
66+
"type": "extensionHost",
67+
"request": "launch",
68+
"runtimeExecutable": "${execPath}",
69+
"args": [
70+
"--extensionDevelopmentPath=${workspaceFolder}"
71+
],
72+
"stopOnEntry": false,
73+
"sourceMaps": true,
74+
"outFiles": [
75+
"${workspaceFolder}/dist/**/*.js"
76+
],
77+
"preLaunchTask": "TypeScript Compile Watch",
78+
},
2079
{
2180
"name": "Launch Tests",
2281
"type": "extensionHost",
@@ -31,7 +90,7 @@
3190
"outFiles": [
3291
"${workspaceFolder}/out/test/**/*.js"
3392
],
34-
"preLaunchTask": "TypeScript Compile"
93+
"preLaunchTask": "Pretest"
3594
},
3695
{
3796
"name": "Node Attach",

Extension/.vscode/tasks.json

Lines changed: 103 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,28 @@
99
"kind": "build",
1010
"isDefault": true
1111
},
12-
"isBackground": true,
12+
"isBackground": false,
1313
"type": "shell",
1414
"presentation": {
1515
"echo": true,
1616
"reveal": "silent",
1717
"focus": false,
1818
"panel": "shared"
1919
},
20-
"command": "npm",
20+
"command": "yarn",
2121
"args": [
2222
"run",
2323
"compile",
2424
"--loglevel",
2525
"silent"
26-
],
27-
"problemMatcher": "$tsc-watch"
26+
]
2827
},
2928
{
3029
"label": "TypeScript Lint",
3130
"group": "build",
3231
"isBackground": false,
3332
"type": "shell",
34-
"command": "npm",
33+
"command": "yarn",
3534
"args": [
3635
"run",
3736
"tslint"
@@ -51,35 +50,126 @@
5150
]
5251
},
5352
"dependsOn": [
54-
"TypeScript Compile"
53+
"Compile Dev"
5554
]
5655
},
5756
{
5857
"label": "Compile Dev",
5958
"group": "build",
6059
"isBackground": false,
6160
"type": "shell",
62-
"command": "npm",
61+
"command": "yarn",
6362
"args": [
6463
"run",
65-
"compileDev"
66-
],
67-
"problemMatcher": "$tsc-watch"
64+
"compile-dev"
65+
]
6866
},
6967
{
7068
"label": "Pretest",
7169
"group": "build",
7270
"isBackground": false,
7371
"type": "shell",
74-
"command": "npm",
72+
"command": "yarn",
7573
"args": [
7674
"run",
7775
"pretest"
7876
],
7977
"dependsOn": [
80-
"TypeScript Compile"
78+
"Compile Dev"
79+
]
80+
},
81+
{
82+
"label": "TypeScript Compile Watch",
83+
"group": {
84+
"kind": "build",
85+
"isDefault": true
86+
},
87+
"isBackground": true,
88+
"type": "shell",
89+
"presentation": {
90+
"echo": true,
91+
"reveal": "silent",
92+
"focus": false,
93+
"panel": "shared"
94+
},
95+
"command": "yarn",
96+
"args": [
97+
"run",
98+
"compile-watch",
99+
"--loglevel",
100+
"silent"
101+
],
102+
"problemMatcher": [
103+
{
104+
"owner": "typescript",
105+
"source": "ts",
106+
"applyTo": "closedDocuments",
107+
"fileLocation": "absolute",
108+
"severity": "error",
109+
"pattern": [
110+
{
111+
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
112+
"file": 1,
113+
"line": 2,
114+
"column": 3
115+
},
116+
{
117+
"regexp": "\\s*TS\\d+:\\s*(.*)",
118+
"message": 1
119+
}
120+
],
121+
"background": {
122+
"activeOnStart": true,
123+
"beginsPattern": {
124+
"regexp": "Compilation (.*?)starting…"
125+
},
126+
"endsPattern": {
127+
"regexp": "Compilation (.*?)finished"
128+
}
129+
}
130+
}
131+
]
132+
},
133+
{
134+
"label": "Compile Dev Watch",
135+
"group": "build",
136+
"isBackground": true,
137+
"type": "shell",
138+
"command": "yarn",
139+
"args": [
140+
"run",
141+
"compile-dev-watch"
81142
],
82-
"problemMatcher": "$tsc-watch"
143+
"problemMatcher": [
144+
{
145+
"owner": "typescript",
146+
"source": "ts",
147+
"applyTo": "closedDocuments",
148+
"fileLocation": "absolute",
149+
"severity": "error",
150+
"pattern": [
151+
{
152+
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
153+
"file": 1,
154+
"line": 2,
155+
"column": 3
156+
},
157+
{
158+
"regexp": "\\s*TS\\d+:\\s*(.*)",
159+
"message": 1
160+
}
161+
],
162+
"background": {
163+
"activeOnStart": true,
164+
"beginsPattern": {
165+
"regexp": "Compilation (.*?)starting…"
166+
},
167+
"endsPattern": {
168+
"regexp": "Compilation (.*?)finished"
169+
}
170+
}
171+
}
172+
]
83173
}
84174
]
85175
}

Extension/.vscodeignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ gulpfile.js
3333
CMakeLists.txt
3434
debugAdapters/install.lock*
3535
typings/**
36-
**/*.map
36+
**/*.map
37+
import_edge_strings.js
38+
localized_string_ids.h
39+
translations_auto_pr.js
40+
41+
# ignore i18n language files
42+
i18n/**

Extension/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# C/C++ for Visual Studio Code Change Log
22

3+
## Version 0.26.0: October 15, 2019
4+
### New Features
5+
* Add localization support (translated text) via `Configure Display Language`. [#7](https://github.com/microsoft/vscode-cpptools/issues/7)
6+
* Add `Rename Symbol` with a pending rename UI. [#296](https://github.com/microsoft/vscode-cpptools/issues/296), [PR #4277](https://github.com/microsoft/vscode-cpptools/pull/4277)
7+
* Add support for navigation breadcrumbs and nested symbols in the Outline view (and removed the Navigation status bar item). [#2230](https://github.com/microsoft/vscode-cpptools/issues/2230)
8+
* Add support for C++/CX (`/ZW`, `/ZW:nostdlib`, `/FI`, `/FU`, and `/AI` compiler arguments). [#3039](https://github.com/microsoft/vscode-cpptools/issues/3039)
9+
* Add a tree view UI for the other C++ references results. [#4079](https://github.com/microsoft/vscode-cpptools/issues/4079)
10+
11+
### Enhancements
12+
* App support for .rsp files in `compile_commands.json`. [#1718](https://github.com/microsoft/vscode-cpptools/issues/1718)
13+
* Add support for `SymbolLoadInfo` to `launch.json`. [#3324](https://github.com/microsoft/vscode-cpptools/issues/3324)
14+
* Enable `${workspaceFolder}` in `compilerPath` and `compilerArgs`. [#3440](https://github.com/microsoft/vscode-cpptools/issues/3440)
15+
* Add support for parsing more file types by default. [#3567](https://github.com/microsoft/vscode-cpptools/issues/3567)
16+
* Move status icons to the left to minimize shifting and change the red flame to use the foreground color. [#4198](https://github.com/microsoft/vscode-cpptools/issues/4198)
17+
18+
### Bug Fixes
19+
* Fix querying of non-ENU compilers. [#2874](https://github.com/microsoft/vscode-cpptools/issues/2874)
20+
* Fix `Find All References` not confirming references of method overrides in an inheritance hierarchy. [#4078](https://github.com/microsoft/vscode-cpptools/issues/4078)
21+
* Fix missing references on the last line. [#4150](https://github.com/microsoft/vscode-cpptools/issues/4150)
22+
* Fix `Go to Definition` on implicit default constructors. [#4162](https://github.com/microsoft/vscode-cpptools/issues/4162)
23+
* Fix configuration prompts from appearing if a configuration provider is set. [#4168](https://github.com/microsoft/vscode-cpptools/issues/4168)
24+
* Fix vcpkg code action for missing includes with more than one forward slash. [PR #4172](https://github.com/microsoft/vscode-cpptools/pull/4172)
25+
* Fix parsing of `__has_include` (and other system macros) with gcc. [#4193](https://github.com/microsoft/vscode-cpptools/issues/4193)
26+
* Fix tag parse database not getting updated after changes occur to unopened files in the workspace. [#4211](https://github.com/microsoft/vscode-cpptools/issues/4211)
27+
* Fix `files.exclude` ending with `/` being treated like a per-file exclude (which aren't enabled by default). [#4262](https://github.com/microsoft/vscode-cpptools/issues/4262)
28+
* Fix `Find All References` incorrect results for string and comment references. [#4279](https://github.com/microsoft/vscode-cpptools/issues/4279)
29+
* Fix bug with forced includes in `compile_commands.json`. [#4293](https://github.com/microsoft/vscode-cpptools/issues/4293)
30+
* Fix `Find All References` giving `Not a Reference` for constructors of templated classes. [#4345](https://github.com/microsoft/vscode-cpptools/issues/4345)
31+
* Fix squiggles appearing after a multi-edit replace or rename. [#4351](https://github.com/microsoft/vscode-cpptools/issues/4351)
32+
* Fix `gcc-x86` and `clang-x86` modes. [#4353](https://github.com/microsoft/vscode-cpptools/issues/4353)
33+
* Fix crashes if the database can't be created. [#4359](https://github.com/microsoft/vscode-cpptools/issues/4359)
34+
* Fix bugs with comment references. [#4371](https://github.com/microsoft/vscode-cpptools/issues/4371), [#4372](https://github.com/microsoft/vscode-cpptools/issues/4372)
35+
336
## Version 0.25.1: August 28, 2019
437
### Bug Fixes
538
* Fix `Switch Header/Source` for `.H` and `.C` targets. [#3048](https://github.com/microsoft/vscode-cpptools/issues/3048)

0 commit comments

Comments
 (0)