Skip to content

Commit 70cff29

Browse files
authored
replace workspaceRoot with workspaceFolder (#1641)
* replace workspaceRoot with workspaceFolder (actual support is on the server side) * update changelog
1 parent bd181c3 commit 70cff29

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Extension/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Version 0.16.0: March 15, 2018
44
* Enable autocomplete for local and global scopes. [#13](https://github.com/Microsoft/vscode-cpptools/issues/13)
5-
* Support additional multiline comment patterns. [#1100](https://github.com/Microsoft/vscode-cpptools/issues/1100), [#1539](https://github.com/Microsoft/vscode-cpptools/issues/1539)
6-
* Add new setting: `C_Cpp.commentContinuationPatterns`.
7-
* Add a setting to disable inactive region highlighting. [#1592](https://github.com/Microsoft/vscode-cpptools/issues/1592)
8-
* Add support for forced includes. [#852](https://github.com/Microsoft/vscode-cpptools/issues/852)
5+
* Add a setting to define multiline comment patterns: `C_Cpp.commentContinuationPatterns`. [#1100](https://github.com/Microsoft/vscode-cpptools/issues/1100), [#1539](https://github.com/Microsoft/vscode-cpptools/issues/1539)
6+
* Add a setting to disable inactive region highlighting: `C_Cpp.dimInactiveRegions`. [#1592](https://github.com/Microsoft/vscode-cpptools/issues/1592)
7+
* Add `forcedInclude` configuration setting. [#852](https://github.com/Microsoft/vscode-cpptools/issues/852)
98
* Add `compilerPath`, `cStandard`, and `cppStandard` configuration settings, and query gcc/clang-based compilers for default defines. [#1293](https://github.com/Microsoft/vscode-cpptools/issues/1293), [#1251](https://github.com/Microsoft/vscode-cpptools/issues/1251), [#1448](https://github.com/Microsoft/vscode-cpptools/issues/1448), [#1465](https://github.com/Microsoft/vscode-cpptools/issues/1465), [#1484](https://github.com/Microsoft/vscode-cpptools/issues/1484)
109
* Fix text being temporarily gray when an inactive region is deleted. [Microsoft/vscode#44872](https://github.com/Microsoft/vscode/issues/44872)
10+
* Add support for `${workspaceFolder}` variable in **c_cpp_properties.json**. [#1392](https://github.com/Microsoft/vscode-cpptools/issues/1392)
1111

1212
## Version 0.15.0: February 15, 2018
1313
* Add colorization for inactive regions. [#1466](https://github.com/Microsoft/vscode-cpptools/issues/1466)

Extension/src/LanguageServer/client.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class DefaultClient implements Client {
254254
private disposables: vscode.Disposable[] = [];
255255
private configuration: configs.CppProperties;
256256
private rootPathFileWatcher: vscode.FileSystemWatcher;
257-
private workspaceRoot: vscode.WorkspaceFolder | undefined;
257+
private rootFolder: vscode.WorkspaceFolder | undefined;
258258
private trackedDocuments = new Set<vscode.TextDocument>();
259259
private outputChannel: vscode.OutputChannel;
260260
private debugChannel: vscode.OutputChannel;
@@ -279,16 +279,16 @@ class DefaultClient implements Client {
279279
public get ActiveConfigChanged(): vscode.Event<string> { return this.model.activeConfigName.ValueChanged; }
280280

281281
/**
282-
* don't use this.workspaceRoot directly since it can be undefined
282+
* don't use this.rootFolder directly since it can be undefined
283283
*/
284284
public get RootPath(): string {
285-
return (this.workspaceRoot) ? this.workspaceRoot.uri.fsPath : "";
285+
return (this.rootFolder) ? this.rootFolder.uri.fsPath : "";
286286
}
287287
public get RootUri(): vscode.Uri {
288-
return (this.workspaceRoot) ? this.workspaceRoot.uri : null;
288+
return (this.rootFolder) ? this.rootFolder.uri : null;
289289
}
290290
public get Name(): string {
291-
return this.getName(this.workspaceRoot);
291+
return this.getName(this.rootFolder);
292292
}
293293
public get TrackedDocuments(): Set<vscode.TextDocument> {
294294
return this.trackedDocuments;
@@ -312,7 +312,7 @@ class DefaultClient implements Client {
312312
languageClient.registerProposedFeatures();
313313
languageClient.start(); // This returns Disposable, but doesn't need to be tracked because we call .stop() explicitly in our dispose()
314314
util.setProgress(util.getProgressExecutableStarted());
315-
this.workspaceRoot = workspaceFolder;
315+
this.rootFolder = workspaceFolder;
316316
ui = getUI();
317317
ui.bind(this);
318318

@@ -520,12 +520,12 @@ class DefaultClient implements Client {
520520
}
521521

522522
/**
523-
* listen for file created/deleted events under the ${workspaceRoot} folder
523+
* listen for file created/deleted events under the ${workspaceFolder} folder
524524
*/
525525
private registerFileWatcher(): void {
526526
console.assert(this.languageClient !== undefined, "This method must not be called until this.languageClient is set in \"onReady\"");
527527

528-
if (this.workspaceRoot) {
528+
if (this.rootFolder) {
529529
// WARNING: The default limit on Linux is 8k, so for big directories, this can cause file watching to fail.
530530
this.rootPathFileWatcher = vscode.workspace.createFileSystemWatcher(
531531
path.join(this.RootPath, "*"),

Extension/src/LanguageServer/configurations.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ let defaultSettings: string = `{
1818
"includePath": [
1919
"/usr/include",
2020
"/usr/local/include",
21-
"$\{workspaceRoot\}"
21+
"$\{workspaceFolder\}"
2222
],
2323
"defines": [],
2424
"intelliSenseMode": "clang-x64",
2525
"browse": {
2626
"path": [
2727
"/usr/include",
2828
"/usr/local/include",
29-
"$\{workspaceRoot\}"
29+
"$\{workspaceFolder\}"
3030
],
3131
"limitSymbolsToIncludedHeaders": true,
3232
"databaseFilename": ""
@@ -41,15 +41,15 @@ let defaultSettings: string = `{
4141
"includePath": [
4242
"/usr/include",
4343
"/usr/local/include",
44-
"$\{workspaceRoot\}"
44+
"$\{workspaceFolder\}"
4545
],
4646
"defines": [],
4747
"intelliSenseMode": "clang-x64",
4848
"browse": {
4949
"path": [
5050
"/usr/include",
5151
"/usr/local/include",
52-
"$\{workspaceRoot\}"
52+
"$\{workspaceFolder\}"
5353
],
5454
"limitSymbolsToIncludedHeaders": true,
5555
"databaseFilename": ""
@@ -59,7 +59,7 @@ let defaultSettings: string = `{
5959
"name": "Win32",
6060
"includePath": [
6161
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
62-
"$\{workspaceRoot\}"
62+
"$\{workspaceFolder\}"
6363
],
6464
"defines": [
6565
"_DEBUG",
@@ -70,7 +70,7 @@ let defaultSettings: string = `{
7070
"browse": {
7171
"path": [
7272
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
73-
"$\{workspaceRoot\}"
73+
"$\{workspaceFolder\}"
7474
],
7575
"limitSymbolsToIncludedHeaders": true,
7676
"databaseFilename": ""

0 commit comments

Comments
 (0)