Skip to content

Commit

Permalink
Added a new setting platformio-ide.autoPreloadEnvTasks to enable …
Browse files Browse the repository at this point in the history
…automatic preloading of the project environment tasks // Resolve #2004
  • Loading branch information
ivankravets committed Sep 16, 2020
1 parent 5a51382 commit a270596
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2.1.0 (2020-09-16)

* Added a new setting ``platformio-ide.autoPreloadEnvTasks`` to enable automatic preloading of the project environment tasks (issue [#2004](https://github.com/platformio/platformio-vscode-ide/issues/2004))
* Renamed "PIO Remote" group of tasks to "Remote Development"
* Updated PlatformIO Core installer to [v0.3.5](https://github.com/platformio/platformio-core-installer/releases/tag/v0.3.5)

Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@
"default": null,
"description": "The build task (label) used for the `Build` button in the bottom toolbar and for key bindings. The default is `PlatformIO: Build`."
},
"platformio-ide.autoPreloadEnvTasks": {
"type": "boolean",
"default": false,
"description": "Automatically preload ALL project environment tasks"
},
"platformio-ide.customPATH": {
"type": [
"string",
Expand Down
6 changes: 6 additions & 0 deletions src/tasks/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export default class ProjectTaskManager {
})
);

if (extension.getSetting('autoPreloadEnvTasks')) {
for (const item of envs) {
await this.onDidLoadEnvTasks(item.name);
}
}

this.addProjectConfigWatcher();
this.controlDeviceMonitorTasks();
this.registerTaskBasedCommands();
Expand Down

0 comments on commit a270596

Please sign in to comment.