Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Aug 31, 2018
2 parents 5518bf0 + 699f2cd commit a3504f2
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release Notes

## 1.1.0 (2018-08-31)

* New "Debug" group to "Quick Access" view
- "Start Debugging", will start debug session, activate debug console and focus "Debug" View
- "Toggle Debug Console", an optional button to show active debug console
* Improved support for Arduino files with `*.ino` extension
* Focus "Explorer" view when adding new project folder to workspace
* Do not shutdown PIO Home server when folder is added to workspace

## 1.0.0 (2018-08-30)

* [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces), work on several related projects at one time (issue [#50](https://github.com/platformio/platformio-vscode-ide/issues/50))
Expand Down
27 changes: 23 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-ide",
"version": "1.0.0",
"version": "1.1.0",
"publisher": "platformio",
"engines": {
"vscode": "^1.24.0"
Expand All @@ -15,10 +15,10 @@
],
"keywords": [
"IoT",
"c",
"c++",
"embedded",
"firmware",
"debug",
"microcontroller"
"arduino"
],
"main": "./lib/main",
"icon": "resources/platformio-logo.png",
Expand Down Expand Up @@ -70,6 +70,15 @@
".s"
],
"configuration": "./syntaxes/assembly-configuration.json"
},
{
"id": "cpp",
"extensions": [
".ino"
],
"aliases": [
"Arduino"
]
}
],
"grammars": [
Expand All @@ -87,6 +96,11 @@
"language": "platformio-debug.asm",
"scopeName": "source.platformio-debug-asm",
"path": "./syntaxes/assembly.tmLanguage"
},
{
"language": "cpp",
"path": "./syntaxes/arduino.tmLanguage",
"scopeName": "source.cpp.arduino"
}
],
"commands": [
Expand Down Expand Up @@ -135,6 +149,11 @@
"title": "New Terminal",
"category": "PlatformIO"
},
{
"command": "platformio-ide.startDebugging",
"title": "Start Debugging",
"category": "PlatformIO"
},
{
"command": "platformio-ide.updateGlobalLibs",
"title": "Update global libraries",
Expand Down
1 change: 1 addition & 0 deletions src/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default class PIOHome {
} else {
vscode.commands.executeCommand('vscode.openFolder', vscode.Uri.file(params));
}
vscode.commands.executeCommand('workbench.view.explorer');
}
}
});
Expand Down
18 changes: 14 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ class PlatformIOVSCodeExtension {

activate(context) {
this.context = context;
this.pioHome = new PIOHome();
this.pioTerm = new PIOTerminal();

this.context.subscriptions.push(
this.pioHome,
this.pioTerm,
vscode.workspace.onDidChangeWorkspaceFolders(this.reinit.bind(this)),
vscode.workspace.onDidChangeConfiguration(() => this.reinit(true))
);

this.reinit();
}

Expand All @@ -53,10 +59,6 @@ class PlatformIOVSCodeExtension {
return;
}

this.pioHome = new PIOHome();
this.pioTerm = new PIOTerminal();
this.subscriptions.push(this.pioHome, this.pioTerm);

if (!this._initedBefore) {
pioNodeHelpers.misc.patchOSEnviron({
caller: 'vscode',
Expand Down Expand Up @@ -203,6 +205,14 @@ class PlatformIOVSCodeExtension {
'platformio-ide.newTerminal',
() => this.pioTerm.new().show()
),
vscode.commands.registerCommand(
'platformio-ide.startDebugging',
() => {
vscode.commands.executeCommand('workbench.view.debug');
vscode.commands.executeCommand('workbench.debug.action.toggleRepl');
vscode.commands.executeCommand('workbench.action.debug.start');
}
),
vscode.commands.registerCommand(
'platformio-ide.updateGlobalLibs',
() => this.pioTerm.sendText('platformio lib --global update')
Expand Down
4 changes: 4 additions & 0 deletions src/views/quick-access-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default class QuickAccessTreeProvider {
new QuickItem('PIO Home', 'platformio-ide.showHome'),
new QuickItem('New Terminal', 'platformio-ide.newTerminal'),
new QuickItem('Clone Git Project', 'git.clone'),
new QuickItem('Debug', undefined, vscode.TreeItemCollapsibleState.Expanded, [
new QuickItem('Start Debugging', 'platformio-ide.startDebugging'),
new QuickItem('Toggle Debug Console', 'workbench.debug.action.toggleRepl')
]),
new QuickItem('Updates', undefined, vscode.TreeItemCollapsibleState.Expanded, [
new QuickItem('Update global libraries', 'platformio-ide.updateGlobalLibs'),
new QuickItem('Update platforms & packages', 'platformio-ide.updatePlatforms'),
Expand Down
67 changes: 67 additions & 0 deletions syntaxes/arduino.tmLanguage
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!--
language grammars reference document: https://manual.macromates.com/en/language_grammars
Arduino Language reference document: https://www.arduino.cc/en/Reference/HomePage
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scopeName</key>
<string>source.cpp.arduino</string>
<key>uuid</key>
<string>65E5AFAE-4AE7-4DAE-837B-1B99810E464D</string>
<key>fileTypes</key>
<array>
<string>ino</string>
</array>
<key>foldingStartMarker</key>
<string>/\*\*|\{\s*$</string>
<key>foldingStopMarker</key>
<string>\*\*/|^\s*\}</string>
<key>name</key>
<string>Arduino</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(HIGH|LOW|INPUT|OUTPUT|INPUT_PULLUP|LED_BUILTIN|DEC|BIN|HEX|OCT|BYTE|PI|HALF_PI|TWO_PI|LSBFIRST|MSBFIRST|CHANGE|FALLING|RISING|DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56|null)\b</string>
<key>name</key>
<string>storage.type.cpp.arduino</string>
</dict>
<dict>
<key>match</key>
<string>\b(boolean|byte|word|string|String|array)\b</string>
<key>name</key>
<string>storage.cpp.arduino</string>
</dict>
<dict>
<key>match</key>
<string>\b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan|bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte|analogReference|analogRead|analogWrite|analogReadResolution|analogWriteResolution|attachInterrupt|detachInterrupt|delay|delayMicroseconds|digitalWrite|digitalRead|interrupts|millis|micros|noInterrupts|noTone|pinMode|pulseIn|shiftIn|shiftOut|tone|begin|end|read|print|println|available|flush)\b</string>
<key>name</key>
<string>support.function.cpp.arduino</string>
</dict>
<dict>
<key>match</key>
<string>\b\s*(setup|loop)\b</string>
<key>name</key>
<string>keyword.control.cpp.arduino</string>
</dict>
<dict>
<key>match</key>
<string>\b(Serial\d?|Stream|Keyboard|Mouse)\b</string>
<key>name</key>
<string>support.class.cpp.arduino</string>
</dict>
<dict>
<key>match</key>
<string>\b(private|protected|public)</string>
<key>name</key>
<string>storage.modifier.cpp.arduino</string>
</dict>
<dict>
<key>include</key>
<string>source.cpp</string>
</dict>
</array>
</dict>
</plist>

0 comments on commit a3504f2

Please sign in to comment.