Skip to content

Commit

Permalink
Merge branch 'release/v0.17.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jul 19, 2018
2 parents 4b22f7a + 1113589 commit 39000d1
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 10 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Release Notes

## 0.17.2 (2018-07-??)
## 0.17.3 (2018-07-19)

* Fixed "PIP: Command "python setup.py egg_info" failed" (issue [#179](https://github.com/platformio/platformio-vscode-ide/issues/179))
* Fixed "TypeError: Cannot read property 'title' of undefined" (issue [#170](https://github.com/platformio/platformio-vscode-ide/issues/170))

## 0.17.2 (2018-07-11)

- Do not force PIO IDE Terminal to `cmd.exe` on Windows (issue [#76](https://github.com/platformio/platformio-vscode-ide/issues/76))
- [PIO Unified Debugger](http://docs.platformio.org/page/plus/debugging.html): Fixed infinite loading of Peripheral Registers
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

**The next generation integrated development environment for IoT**

[PlatformIO](http://platformio.org) is an open source ecosystem for IoT development.
[PlatformIO](https://platformio.org) is an open source ecosystem for IoT development.
Cross-platform build system and unified debugger. Remote unit testing and firmware updates.

**Platforms**: Atmel AVR, Atmel SAM, Espressif 32, Espressif 8266, Freescale Kinetis, Intel ARC32, Lattice iCE40, Maxim 32, Microchip PIC32, Nordic nRF51, Nordic nRF52, NXP LPC, RISC-V, Samsung ARTIK, Silicon Labs EFM32, ST STM32, Teensy, TI MSP430, TI Tiva, WIZNet W7500
**Platforms**: Atmel AVR, Atmel SAM, Espressif 32, Espressif 8266, Freescale Kinetis, Infineon XMC, Intel ARC32, Lattice iCE40, Maxim 32, Microchip PIC32, Nordic nRF51, Nordic nRF52, NXP LPC, RISC-V, Samsung ARTIK, Silicon Labs EFM32, ST STM32, Teensy, TI MSP430, TI Tiva, WIZNet W7500

**Frameworks**: Arduino, ARTIK SDK, CMSIS, Energia, ESP-IDF, libOpenCM3, mbed, Pumbaa, Simba, SPL, STM32Cube, WiringPi

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-ide",
"version": "0.17.2",
"version": "0.17.3",
"publisher": "platformio",
"engines": {
"vscode": "^1.24.0"
Expand Down Expand Up @@ -544,7 +544,7 @@
"dependencies": {
"fs-plus": "^3.0.0",
"ini": "^1.3.4",
"platformio-node-helpers": "^2.0.1",
"platformio-node-helpers": "^2.0.4",
"platformio-vscode-debug": "^1.1.2",
"querystringify": "*"
},
Expand Down
8 changes: 4 additions & 4 deletions src/installer/python-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export default class PythonPrompt {
async prompt() {
const selectedItem = await vscode.window.showInformationMessage(
'PlatformIO: Can not find Python 2.7 Interpreter',
{ title: 'Install Python 2.7', isCloseAffordance: true },
{ title: 'I have Python 2.7', isCloseAffordance: true },
{ title: 'Try again', isCloseAffordance: true },
{ title: 'Install Python 2.7', isCloseAffordance: false },
{ title: 'I have Python 2.7', isCloseAffordance: false },
{ title: 'Try again', isCloseAffordance: false },
{ title: 'Abort PlatformIO IDE Installation', isCloseAffordance: true }
);

switch (selectedItem.title) {
switch (selectedItem ? selectedItem.title : undefined) {
case 'Install Python 2.7':
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('http://docs.platformio.org/page/faq.html#install-python-interpreter'));
return { status: this.STATUS_TRY_AGAIN };
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import PIOHome from './home';
import PIOTasksProvider from './tasks';
import PIOTerminal from './terminal';
import ProjectIndexer from './project/indexer';
import { maybeRateExtension } from './misc';
import vscode from 'vscode';


class PlatformIOVSCodeExtension {

constructor() {
Expand Down Expand Up @@ -75,6 +75,7 @@ class PlatformIOVSCodeExtension {
this.initStatusBar({ ignoreCommands: this.getEnterpriseSetting('ignoreToolbarCommands') });
this.initProjectIndexer();
await this.startPIOHome();
maybeRateExtension(this.context.globalState);
}

getConfig() {
Expand Down
52 changes: 52 additions & 0 deletions src/misc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Copyright (c) 2017-present PlatformIO <[email protected]>
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/

import vscode from 'vscode';


export async function maybeRateExtension(globalState) {
const momentoKey = 'rate-extension-state';
const askAfterSessionNums = 13;
let state = globalState.get(momentoKey);
if (state && state.done) {
return;
}
else if (!state || !state.callCounter) {
state = {
callCounter: 0,
done: false
};
}

state.callCounter += 1;
if (state.callCounter < askAfterSessionNums) {
globalState.update(momentoKey, state);
return;
}

const selectedItem = await vscode.window.showInformationMessage(
'If you enjoy using PlatformIO IDE for VSCode, would you mind taking a moment to rate it? ' +
'It will not take more than one minute. Thanks for your support!',
{ title: 'Rate PlatformIO IDE Extension', isCloseAffordance: false },
{ title: 'Remind me later', isCloseAffordance: false },
{ title: 'No, Thanks', isCloseAffordance: true }
);

switch (selectedItem ? selectedItem.title : undefined) {
case 'Rate PlatformIO IDE Extension':
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide#review-details'));
state.done = true;
break;
case 'No, Thanks':
state.done = true;
break;
default:
state.callCounter = 0;
}
globalState.update(momentoKey, state);
}

0 comments on commit 39000d1

Please sign in to comment.