From 48d10e512c1aefa9e74e357d9f9bd8dbb7b62dce Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Jan 2018 12:56:01 +0200 Subject: [PATCH 1/5] Changed minimum requirements for Python to 2.7.5+; Handle correctly conda's virtual environment --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e3963..e665770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes +## 0.10.1 (2018-01-16) + +* Changed minimum requirements for Python to 2.7.5+ +* Handle correctly conda's virtual environment + ## 0.10.0 (2018-01-11) * Added PIO Remote & PIO Unit Testing buttons and commands diff --git a/package.json b/package.json index 026944b..f3044d4 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,7 @@ "dependencies": { "fs-plus": "^3.0.0", "ini": "^1.3.4", - "platformio-node-helpers": "^0.3.2" + "platformio-node-helpers": "^0.3.3" }, "extensionDependencies": [ "ms-vscode.cpptools", From 7ef66702ec04f3aa38affc73a8793eaf159aae87 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Jan 2018 13:02:40 +0200 Subject: [PATCH 2/5] Don't update Terminal configuration with patched PATH environment for non-PlatformIO projects // Resolve #64 --- CHANGELOG.md | 1 + src/main.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e665770..df66876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Changed minimum requirements for Python to 2.7.5+ * Handle correctly conda's virtual environment +* Don't update Terminal configuration with patched PATH environment for non-PlatformIO projects (issue [#64](https://github.com/platformio/platformio-vscode-ide/issues/64)) ## 0.10.0 (2018-01-11) diff --git a/src/main.js b/src/main.js index 72bb4d3..feb6caf 100644 --- a/src/main.js +++ b/src/main.js @@ -40,9 +40,6 @@ class PlatformIOVSCodeExtension { } }); - if (this.config.get('updateTerminalPathConfiguration')) { - this.pioTerm.updateEnvConfiguration(); - } this.registerCommands(); await this.startInstaller(); @@ -56,6 +53,10 @@ class PlatformIOVSCodeExtension { return; } + if (this.config.get('updateTerminalPathConfiguration')) { + this.pioTerm.updateEnvConfiguration(); + } + this.initTasksProvider(); this.initStatusBar(); this.initProjectIndexer(); From 860fe2e821d22c8bb7e184c4aa5f1379bbdceba4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Jan 2018 14:05:07 +0200 Subject: [PATCH 3/5] Ignore Python interpreter from Cygwin environment // Resolve #43 --- CHANGELOG.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df66876..b6afd8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Changed minimum requirements for Python to 2.7.5+ * Handle correctly conda's virtual environment * Don't update Terminal configuration with patched PATH environment for non-PlatformIO projects (issue [#64](https://github.com/platformio/platformio-vscode-ide/issues/64)) +* Ignore Python interpreter from Cygwin environment (issue [#43](https://github.com/platformio/platformio-vscode-ide/issues/43)) ## 0.10.0 (2018-01-11) diff --git a/package.json b/package.json index f3044d4..256720a 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,7 @@ "dependencies": { "fs-plus": "^3.0.0", "ini": "^1.3.4", - "platformio-node-helpers": "^0.3.3" + "platformio-node-helpers": "^0.3.4" }, "extensionDependencies": [ "ms-vscode.cpptools", From d4cc024c705ea508dcc064baddbd649a1a4e0166 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Jan 2018 20:14:47 +0200 Subject: [PATCH 4/5] Added new option `activateOnlyOnPlatformIOProject` // Resolve #66 --- CHANGELOG.md | 3 ++- package.json | 5 +++++ src/main.js | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6afd8a..0aa46c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Release Notes -## 0.10.1 (2018-01-16) +## 0.11.0 (2018-01-16) +* Added new option `activateOnlyOnPlatformIOProject` (activate extension only when PlatformIO-based project (with `platformio.ini`) is opened in workspace) (issue [#66](https://github.com/platformio/platformio-vscode-ide/issues/66)) * Changed minimum requirements for Python to 2.7.5+ * Handle correctly conda's virtual environment * Don't update Terminal configuration with patched PATH environment for non-PlatformIO projects (issue [#64](https://github.com/platformio/platformio-vscode-ide/issues/64)) diff --git a/package.json b/package.json index 256720a..592c10a 100644 --- a/package.json +++ b/package.json @@ -203,6 +203,11 @@ "type": "boolean", "default": true, "description": "Update Terminal configuration with patched PATH environment" + }, + "platformio-ide.activateOnlyOnPlatformIOProject": { + "type": "boolean", + "default": false, + "description": "Activate extension only when PlatformIO-based project (with `platformio.ini`) is opened in workspace" } } } diff --git a/src/main.js b/src/main.js index feb6caf..f60bb51 100644 --- a/src/main.js +++ b/src/main.js @@ -30,6 +30,11 @@ class PlatformIOVSCodeExtension { async activate(context) { this._context = context; + const hasPIOProject = this.workspaceHasPIOProject(); + + if (this.config.get('activateOnlyOnPlatformIOProject') && !hasPIOProject) { + return; + } pioNodeHelpers.misc.patchOSEnviron({ caller: 'vscode', @@ -48,7 +53,7 @@ class PlatformIOVSCodeExtension { vscode.commands.executeCommand('platformio-ide.showHome'); } - if (!vscode.workspace.rootPath || !isPIOProject(vscode.workspace.rootPath)) { + if (!hasPIOProject) { this.initStatusBar(['PlatformIO: Home']); return; } @@ -62,6 +67,10 @@ class PlatformIOVSCodeExtension { this.initProjectIndexer(); } + workspaceHasPIOProject() { + return vscode.workspace.rootPath && isPIOProject(vscode.workspace.rootPath); + } + startInstaller() { return vscode.window.withProgress({ location: vscode.ProgressLocation.Window, From 122aebc27a8114c8ecf053c94c73754279f33f7b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 16 Jan 2018 20:15:54 +0200 Subject: [PATCH 5/5] Bump version to 0.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 592c10a..ed14960 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "platformio-ide", - "version": "0.10.0", + "version": "0.11.0", "preview": true, "displayName": "PlatformIO IDE", "description": "Official PlatformIO IDE for IoT, Arduino, ARM mbed, Espressif (ESP8266/ESP32), STM32, PIC32, nRF51/nRF52, FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3",