Skip to content

Commit 081c058

Browse files
committed
Merge branch 'release/v0.5.2'
2 parents 7c08ea3 + 474ba54 commit 081c058

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release Notes
22

3+
## 0.5.2 (2017-07-27)
4+
5+
* Use dedicated terminal panel per unique PIO Task
6+
* Avoid concurrent "IntelliSense Index Rebuild" processes
7+
38
## 0.5.1 (2017-07-18)
49

510
* Add new Tasks

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Please follow to the official documentation [PlatformIO IDE for VSCode](http://d
4343

4444
## License
4545

46-
Copyright (c) 2017-present PlatformIO <contact@platformio.org>
46+
Copyright (C) 2017-present PlatformIO <contact@platformio.org>
4747

4848
The PlatformIO IDE for VSCode is licensed under the permissive Apache 2.0 license,
4949
so you can use it in both commercial and personal projects with confidence.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "platformio-ide",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"preview": true,
55
"displayName": "PlatformIO IDE",
66
"description": "Official PlatformIO IDE for VSCode: The next generation integrated development environment for IoT. Cross-platform build system and unified debugger. Remote unit testing and firmware updates.",
@@ -89,7 +89,7 @@
8989
},
9090
{
9191
"command": "platformio-ide.rebuildProjectIndex",
92-
"title": "Rebuild C/C++ Project Index",
92+
"title": "Rebuild IntelliSense Index",
9393
"category": "PlatformIO"
9494
},
9595
{

src/project/indexer.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default class ProjectIndexer {
2323
this.libDirSubscriptions = new Map();
2424

2525
this._isActive = false;
26+
this._inProgress = false;
2627
this._rebuildTimeout = null;
2728
this._updateLibDirWatchersTimeout = null;
2829
}
@@ -140,12 +141,12 @@ export default class ProjectIndexer {
140141
}
141142

142143
doRebuild({ verbose = false } = {}) {
143-
if (!this._isActive) {
144+
if (!this._isActive || this._inProgress) {
144145
return;
145146
}
146147
return vscode.window.withProgress({
147148
location: vscode.ProgressLocation.Window,
148-
title: 'PlatformIO C/C++ Index Rebuild',
149+
title: 'PlatformIO: IntelliSense Index Rebuild',
149150
}, async (progress) => {
150151
progress.report({
151152
message: 'Verifying if the current directory is a PlatformIO project',
@@ -154,10 +155,10 @@ export default class ProjectIndexer {
154155
if (!await isPIOProject(this.projectDir)) {
155156
return;
156157
}
157-
158158
progress.report({
159-
message: 'Performing index rebuild',
159+
message: '',
160160
});
161+
this._inProgress = true;
161162
await new Promise((resolve, reject) => {
162163
runPIOCommand(['init', '--ide', 'vscode', '--project-dir', this.projectDir], (code, stdout, stderr) => {
163164
if (code === 0) {
@@ -167,14 +168,14 @@ export default class ProjectIndexer {
167168
}
168169
});
169170
});
170-
171171
if (verbose) {
172-
vscode.window.showInformationMessage('PlatformIO: C/C++ Project Index (for Autocomplete, Linter) has been successfully rebuilt.');
172+
vscode.window.showInformationMessage('PlatformIO: IntelliSense Index has been successfully rebuilt.');
173173
}
174174
} catch (err) {
175175
console.error(err);
176-
vscode.window.showErrorMessage(`PlatformIO: C/C++ Project Index failed: ${err.toString()}`);
176+
vscode.window.showErrorMessage(`PlatformIO: IntelliSense Index failed: ${err.toString()}`);
177177
}
178+
this._inProgress = false;
178179
});
179180
}
180181

src/tasks.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export default class PIOTasksProvider {
193193
}
194194

195195
// PIO Core tasks
196-
result.push(new TaskCreator('Rebuild C/C++ Project Index', ['init', '--ide', 'vscode']).create());
196+
result.push(new TaskCreator('Rebuild IntelliSense Index', ['init', '--ide', 'vscode']).create());
197197
result.push(new TaskCreator('Update installed platforms, packages and libraries', ['update']).create());
198198
result.push(new TaskCreator('Upgrade PlatformIO Core', ['upgrade']).create());
199199

@@ -250,6 +250,9 @@ class TaskCreator {
250250
new vscode.ProcessExecution(IS_WINDOWS ? 'platformio.exe' : 'platformio', this._args, { env: process.env }),
251251
'$platformio'
252252
);
253+
task.presentationOptions = {
254+
panel: vscode.TaskPanelKind.Dedicated
255+
};
253256
if (this.isBuild()) {
254257
task.group = vscode.TaskGroup.Build;
255258
} else if (this.isClean()) {

0 commit comments

Comments
 (0)