Skip to content

Commit

Permalink
Merge branch 'release/v0.15.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed May 26, 2018
2 parents 5781708 + 899470e commit 5dd00cb
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

## 0.15.1 (2018-05-26)

* Moved PlatformIO Toolbar to the beginning of the bottom status bar
* Fixed issue when trying to open an opened PIO Home again

## 0.15.0 (2018-05-08)

**Requires VSCode 1.23.0 or above**
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.15.0",
"version": "0.15.1",
"publisher": "platformio",
"engines": {
"vscode": "^1.23.0"
Expand All @@ -23,7 +23,7 @@
"preview": true,
"main": "./lib/main",
"icon": "resources/platformio-logo.png",
"homepage": "http://platformio.org",
"homepage": "https://platformio.org",
"author": {
"name": "PlatformIO.Org"
},
Expand Down
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export const IS_OSX = process.platform == 'darwin';
export const IS_LINUX = !IS_WINDOWS && !IS_OSX;

export const AUTO_REBUILD_DELAY = 3000;
export const PIO_CORE_MIN_VERSION = '3.5.2';
export const PIO_CORE_MIN_VERSION = '3.5.3-b.3';
30 changes: 21 additions & 9 deletions src/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ import vscode from 'vscode';
export default class PIOHome {

constructor() {
this._currentPanel = null;
this._currentPanel = undefined;
this._disposables = [];
}

toggle() {
const column = vscode.window.activeTextEditor ? vscode.window.activeTextEditor.viewColumn : undefined;
if (this._currentPanel) {
this._currentPanel.reveal(vscode.ViewColumn.One);
this._currentPanel.reveal(column);
} else {
this._currentPanel = this.newPanel();
}
}

async newPanel() {
newPanel() {
const panel = vscode.window.createWebviewPanel(
'pioHome',
extension.getEnterpriseSetting('pioHomeTitle', 'PIO Home'),
Expand All @@ -36,9 +38,9 @@ export default class PIOHome {
retainContextWhenHidden: true
}
);
panel.onDidDispose(this.onPanelDisposed.bind(this));
panel.onDidDispose(this.onPanelDisposed.bind(this), null, this._disposables);
panel.webview.html = this.getLoadingContent();
this.getWebviewContent().then(html => panel.webview.html = html );
this.getWebviewContent().then(html => panel.webview.html = html);
return panel;
}

Expand All @@ -51,7 +53,7 @@ export default class PIOHome {
const theme = this.getTheme();
return `<!DOCTYPE html>
<html lang="en">
<body style="background-color: ${theme === 'light' ? '#FFF' : '#1E1E1E' }">
<body style="background-color: ${theme === 'light' ? '#FFF' : '#1E1E1E'}">
Loading...
</body>
</html>`;
Expand All @@ -69,12 +71,12 @@ export default class PIOHome {
const theme = this.getTheme();
return `<!DOCTYPE html>
<html lang="en">
<body style="margin: 0; padding: 0; height: 100%; overflow: hidden; background-color: ${theme === 'light' ? '#FFF' : '#1E1E1E' }">
<body style="margin: 0; padding: 0; height: 100%; overflow: hidden; background-color: ${theme === 'light' ? '#FFF' : '#1E1E1E'}">
<iframe src="${ pioNodeHelpers.home.getFrontendUri(params.host, params.port, {
start,
theme,
workspace: extension.getEnterpriseSetting('defaultPIOHomeWorkspace')
}) }"
})}"
width="100%"
height="100%"
frameborder="0"
Expand All @@ -85,14 +87,24 @@ export default class PIOHome {
}

onPanelDisposed() {
this._currentPanel = null;
this._currentPanel = undefined;
}

shutdownServer() {
pioNodeHelpers.home.shutdownServer();
}

dispose() {
if (this._currentPanel) {
this._currentPanel.dispose();
this._currentPanel = undefined;
}
while (this._disposables.length) {
const x = this._disposables.pop();
if (x) {
x.dispose();
}
}
this.shutdownServer();
}

Expand Down
2 changes: 1 addition & 1 deletion src/installer/state-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class StateStorage {
if (data && data.hasOwnProperty(key)) {
return data[key];
}
return null;
return undefined;
}

setValue(key, value) {
Expand Down
10 changes: 5 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import vscode from 'vscode';
class PlatformIOVSCodeExtension {

constructor() {
this.context = null;
this.pioTerm = null;
this.pioHome = null;
this.context = undefined;
this.pioTerm = undefined;
this.pioHome = undefined;

this._isMonitorRun = false;
this._enterpriseSettings = undefined;
Expand Down Expand Up @@ -144,7 +144,7 @@ class PlatformIOVSCodeExtension {
}
}
im.destroy();
return Promise.reject(null);
return Promise.reject(undefined);
});
}

Expand Down Expand Up @@ -260,7 +260,7 @@ class PlatformIOVSCodeExtension {
.reverse()
.forEach((item, index) => {
const [text, tooltip, command] = item;
const sbItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 10 + index);
const sbItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 1000 + index);
sbItem.text = text;
sbItem.tooltip = tooltip;
sbItem.command = command;
Expand Down
6 changes: 3 additions & 3 deletions src/project/indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import vscode from 'vscode';

export default class ProjectIndexer {

static PythonExecutable = null;
static PythonExecutable = undefined;

constructor(projectDir) {
this.projectDir = projectDir;
Expand All @@ -26,8 +26,8 @@ export default class ProjectIndexer {

this._isActive = false;
this._inProgress = false;
this._rebuildTimeout = null;
this._updateLibDirWatchersTimeout = null;
this._rebuildTimeout = undefined;
this._updateLibDirWatchersTimeout = undefined;
}

async activate() {
Expand Down
4 changes: 2 additions & 2 deletions src/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class PIOTasksProvider {
this.projectDir = projectDir;
this.subscriptions = [];

this._refreshTimeout = null;
this._refreshTimeout = undefined;

this.requestRefresh();
}
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class PIOTasksProvider {

async getTasks() {
const result = [];
let projectConf = null;
let projectConf = undefined;
try {
const content = await new Promise((resolve, reject) => {
fs.readFile(
Expand Down
6 changes: 3 additions & 3 deletions src/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import vscode from 'vscode';
export default class PIOTerminal {

constructor() {
this._instance = null;
this._instance = undefined;
}

new() {
return vscode.window.createTerminal({
name: 'PlatformIO',
shellPath: constants.IS_WINDOWS ? 'cmd.exe' : null,
shellPath: constants.IS_WINDOWS ? 'cmd.exe' : undefined,
env: {
PATH: process.env.PATH,
PLATFORMIO_CALLER: 'vscode'
Expand All @@ -40,7 +40,7 @@ export default class PIOTerminal {
if (this._instance) {
this._instance.dispose();
}
this._instance = null;
this._instance = undefined;
}

updateEnvConfiguration() {
Expand Down

0 comments on commit 5dd00cb

Please sign in to comment.