Skip to content

Commit

Permalink
Merge branch 'release/v2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Nov 3, 2020
2 parents 4a56666 + 7ccbfb6 commit 198be48
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 140 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release Notes

## 2.2.0 (2020-11-03)

- Refactored "Project Tasks" view
* Add button (icon) with a project environment switcher
* Group tasks by project environments
* Automatically expand selected environment
* Preload "Platform" tasks from the selected project environment
- Do not reopen device monitor automatically if a project build fails (issue [#2197](https://github.com/platformio/platformio-vscode-ide/issues/2197))
- Do not start PlatformIO Home in the background when there is no PlatformIO project in a workspace (reduce startup time)
- Fixed an issue when selected project environment is not used for regenerating of C/C++ index (issue [#2196](https://github.com/platformio/platformio-vscode-ide/issues/2196))
- Fixed an issue when debugger does not honor selected environment (issue [#2203](https://github.com/platformio/platformio-vscode-ide/issues/2203))
- Fixed an issue when opening a new PlatformIO Core CLI terminal session does not work after the closing

## 2.1.3 (2020-10-17)

- Fixed a regression bug with debugging solution
Expand Down
75 changes: 22 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-ide",
"version": "2.1.3",
"version": "2.2.0",
"publisher": "platformio",
"engines": {
"vscode": "^1.44.0"
Expand Down Expand Up @@ -95,6 +95,12 @@
"title": "Home",
"category": "PlatformIO"
},
{
"command": "platformio-ide.switchProjectEnv",
"title": "Switch Project Environment",
"category": "PlatformIO",
"icon": "$(root-folder)"
},
{
"command": "platformio-ide.refreshProjectTasks",
"title": "Refresh Project Tasks",
Expand Down Expand Up @@ -171,11 +177,6 @@
"title": "Upgrade PlatformIO Core to the latest version",
"category": "PlatformIO"
},
{
"command": "platformio-ide.switchProjectEnv",
"title": "Switch Project Environment",
"category": "PlatformIO"
},
{
"category": "PlatformIO Debug",
"command": "platformio-debug.peripherals.updateNode",
Expand Down Expand Up @@ -247,14 +248,6 @@
],
"debuggers": [
{
"enableBreakpointsFor": {
"languageIds": [
"c",
"cpp",
"platformio-debug.asm",
"platformio-debug.disassembly"
]
},
"configurationAttributes": {
"launch": {
"properties": {
Expand All @@ -266,6 +259,10 @@
"description": "Path of toolchain binary directory",
"type": "string"
},
"projectEnvName": {
"description": "Working project environment",
"type": "string"
},
"svdPath": {
"default": null,
"description": "Path to an SVD file describing the peripherals of the microcontroller",
Expand Down Expand Up @@ -312,38 +309,6 @@
],
"menus": {
"commandPalette": [
{
"command": "platformio-debug.peripherals.updateNode",
"when": "false"
},
{
"command": "platformio-debug.peripherals.selectedNode",
"when": "false"
},
{
"command": "platformio-debug.peripherals.copyValue",
"when": "false"
},
{
"command": "platformio-debug.peripherals.setFormat",
"when": "false"
},
{
"command": "platformio-debug.registers.copyValue",
"when": "false"
},
{
"command": "platformio-debug.registers.selectedNode",
"when": "false"
},
{
"command": "platformio-debug.registers.setFormat",
"when": "false"
},
{
"command": "platformio-debug.memory.deleteHistoryItem",
"when": "false"
},
{
"command": "platformio-debug.examineMemory",
"when": "debugType == platformio-debug"
Expand Down Expand Up @@ -409,6 +374,11 @@
}
],
"view/title": [
{
"command": "platformio-ide.switchProjectEnv",
"when": "pioCoreReady && pioMultiEnvProject && view == platformio-ide.projectTasks",
"group": "navigation"
},
{
"command": "platformio-ide.refreshProjectTasks",
"when": "pioCoreReady && view == platformio-ide.projectTasks",
Expand Down Expand Up @@ -441,7 +411,6 @@
{
"id": "platformio-ide.projectTasks",
"name": "Project Tasks",
"icon": "root-folder",
"when": "pioProjectReady"
},
{
Expand Down Expand Up @@ -609,25 +578,25 @@
"vscode:package": "webpack --mode production && vsce package"
},
"devDependencies": {
"@babel/core": "~7.12.1",
"@babel/core": "~7.12.3",
"@types/node": "~12",
"@types/vscode": "~1.44.0",
"babel-eslint": "~10.1.0",
"babel-loader": "~8.1.0",
"babel-plugin-transform-class-properties": "~6.24.1",
"babel-preset-env": "~1.7.0",
"eslint": "~7.11.0",
"eslint": "~7.12.1",
"eslint-import-resolver-webpack": "~0.13.0",
"eslint-plugin-import": "~2.22.1",
"prettier": "~2.1.2",
"vsce": "~1.81.1",
"webpack": "~5.1.3",
"webpack-cli": "~4.0.0"
"webpack": "~5.3.2",
"webpack-cli": "~4.1.0"
},
"dependencies": {
"fs-plus": "~3.1.1",
"platformio-node-helpers": "~8.0.1",
"platformio-vscode-debug": "~1.2.12"
"platformio-node-helpers": "~8.1.0",
"platformio-vscode-debug": "~1.3.0"
},
"extensionDependencies": [
"ms-vscode.cpptools"
Expand Down
3 changes: 2 additions & 1 deletion src/installer/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class InstallationManager {
LOCK_KEY = 'platformio-ide:installer-lock';
STORAGE_STATE_KEY = 'platformio-ide:installer-state';

constructor(globalState) {
constructor(globalState, disableAutoUpdates = false) {
this.globalState = globalState;
this.stateStorage = new StateStorage(globalState, this.STORAGE_STATE_KEY);

Expand All @@ -33,6 +33,7 @@ export default class InstallationManager {
useBuiltinPIOCore: config.get('useBuiltinPIOCore'),
useDevelopmentPIOCore: config.get('useDevelopmentPIOCore'),
pythonPrompt: new PythonPrompt(),
disableAutoUpdates: disableAutoUpdates,
}
),
];
Expand Down
7 changes: 3 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PlatformIOVSCodeExtension {
}

this.patchOSEnviron();
await this.startInstaller();
await this.startInstaller(!hasPIOProject);
this.subscriptions.push(this.handleUseDevelopmentPIOCoreConfiguration());

vscode.commands.executeCommand('setContext', 'pioCoreReady', true);
Expand All @@ -76,7 +76,6 @@ class PlatformIOVSCodeExtension {
this.registerGlobalCommands();

if (!hasPIOProject) {
await this.startPIOHome();
this.initToolbar({ filterCommands: ['platformio-ide.showHome'] });
return;
}
Expand Down Expand Up @@ -150,8 +149,8 @@ class PlatformIOVSCodeExtension {
});
}

async startInstaller() {
const im = new InstallationManager(this.context.globalState);
async startInstaller(disableAutoUpdates) {
const im = new InstallationManager(this.context.globalState, disableAutoUpdates);
if (im.locked()) {
vscode.window.showInformationMessage(
'PlatformIO IDE installation has been suspended, because PlatformIO ' +
Expand Down
17 changes: 9 additions & 8 deletions src/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class ProjectManager {
constructor() {
this.subscriptions = [];
this._lastActiveProjectDir = undefined;
this._activeProjectEnv = {};
this._selectedProjectEnv = {};
this._indexObsorver = undefined;
}

Expand All @@ -28,18 +28,19 @@ export default class ProjectManager {
return false;
}

getActiveProjectEnv(projectDir) {
return this._activeProjectEnv[projectDir];
getSelectedProjectEnv(projectDir) {
return this._selectedProjectEnv[projectDir];
}

setActiveProjectEnv(projectDir, envName) {
if (this._activeProjectEnv[projectDir] && !envName) {
delete this._activeProjectEnv[projectDir];
setSelectedProjectEnv(projectDir, envName) {
if (this._selectedProjectEnv[projectDir] && !envName) {
delete this._selectedProjectEnv[projectDir];
}
this._activeProjectEnv[projectDir] = envName;
this._selectedProjectEnv[projectDir] = envName;
if (this._indexObsorver) {
const projectIndexer = this._indexObsorver.getProjectIndexer(projectDir);
projectIndexer.rebuild(envName);
projectIndexer.setActiveEnv(envName);
projectIndexer.rebuild();
}
}

Expand Down
Loading

0 comments on commit 198be48

Please sign in to comment.