Updates for the 0.2.0 release (#39)

Signed-off-by: Kuba Wolanin <hi@kubawolanin.com>
pull/43/head 0.2.0
Kuba Wolanin 2017-10-20 19:18:16 +02:00 committed by GitHub
parent aa64c9fe73
commit f75f65c663
6 changed files with 1255 additions and 932 deletions

View File

@ -1,5 +1,14 @@
# openHAB VS Code Extension Change Log
## 0.2.0 - 2017-10-17
- Language Server Protocol support
- You can now disable REST API connection
- Updated logo icons
- Better error handling
- Fixed REST connection with Basic Authentication
- Paper UI URL is now dynamically detected
- More new snippets
## 0.1.0 - 2017-07-07
- Completely new openHAB Items Explorer view in the sidebar!
- Preview **all** of your items thanks to the REST API

View File

@ -14,6 +14,7 @@ The extension is designed with openHAB 2.x in mind - most snippets and design pa
* Integration with openHAB REST API
* List of all Items accessible from the tree view
* Code completions
* Language Server Protocol support
![openHAB2 code snippets](images/openhab-demo.gif)
@ -69,6 +70,14 @@ the following parameter in your User Settings (`Ctrl + Shift + S`):
You may need to reload the VSCode window to take effect.
## Validating the Rules
This extension comes with Language Server Protocol support.
Language servers allow you to add your own validation logic to files open in VS Code.
openHAB from version `openHAB 2.2.0 Build #1065` (SNAPSHOT) has the Language Server exposed on `5007` port.
In order to enable this feature in VSCode, please make sure that `misc-lsp`
(Misc / Language Server Support) add-on is installed on your openHAB instance.
## Sitemap preview with Basic UI
openHAB VS Code Extension allows you to preview the [sitemap structure](http://docs.openhab.org/configuration/sitemaps.html) in the [Basic UI](http://docs.openhab.org/addons/uis/basic/readme.html) running on your openHAB server instance.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 18 KiB

2117
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
"name": "openhab",
"displayName": "openHAB",
"description": "openHAB syntax highlight, code snippets, integrated Basic UI preview and docs search",
"version": "0.1.0",
"version": "0.2.0",
"publisher": "openhab",
"icon": "openhab.png",
"repository": {
@ -218,19 +218,21 @@
"test": "node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/node": "^6.0.40",
"@types/mocha": "^2.2.32",
"typescript": "^2.0.3",
"vscode": "^1.0.0",
"mocha": "^2.3.3"
"@types/mocha": "^2.2.43",
"@types/node": "^6.0.89",
"mocha": "^2.3.3",
"typescript": "^2.5.3",
"vscode": "^1.1.6"
},
"dependencies": {
"@types/lodash": "^4.14.58",
"@types/form-data": "^2.2.0",
"@types/lodash": "^4.14.77",
"@types/request": "^2.0.6",
"@types/request-promise-native": "^1.0.5",
"copy-paste": "^1.3.0",
"lodash": "^4.17.4",
"request": "^2.81.0",
"request-promise-native": "^1.0.4",
"request": "^2.83.0",
"request-promise-native": "^1.0.5",
"vscode-languageclient": "^2.6.3"
}
}

View File

@ -67,37 +67,37 @@
},
"sendHttpGetRequest": {
"prefix": "a:get",
"prefix": "sendHttpGet",
"body": "sendHttpGetRequest(\"${1:URL}\")",
"description": "openHAB Action: Sends an GET-HTTP request and returns the result as a String"
},
"sendHttpPutRequest": {
"prefix": "a:put",
"prefix": "sendHttpPut",
"body": "sendHttpPutRequest(\"${1:URL}\", \"${2:contentType}\", \"${3:content}\")",
"description": "openHAB Action: Sends a PUT-HTTP request with the given content and returns the result as a String"
},
"sendHttpPostRequest": {
"prefix": "a:postc",
"prefix": "sendHttpPost",
"body": "sendHttpPostRequest(\"${1:URL}\", \"${2:contentType}\", \"${3:content}\")",
"description": "openHAB Action: Sends a POST-HTTP request with the given content and returns the result as a String"
},
"sendHttpDeleteRequest": {
"prefix": "a:del",
"prefix": "sendHttpDelete",
"body": "sendHttpDeleteRequest(\"${1:URL}\")",
"description": "openHAB Action: Sends a DELETE-HTTP request and returns the result as a String"
},
"createTimer": {
"prefix": "a:timer",
"prefix": "createTimer",
"body": "createTimer(${1:instant}, ${2:procedure})",
"description": "openHAB Action: schedules a block of code to execute at a future time"
},
"getThingStatusInfo": {
"prefix": "a:thing",
"prefix": "getThingStatus",
"body": "getThingStatusInfo(\"${1:thingUID}\")",
"description": "openHAB Action: Gets status information of the given thing identified by `thingUID`"
},
@ -109,55 +109,55 @@
},
"setMasterVolume": {
"prefix": "a:smv",
"prefix": "smv",
"body": "setMasterVolume(${1:volume})",
"description": "Sets the volume of the host machine (volume in range 0-1)"
},
"increaseMasterVolume": {
"prefix": "a:imv",
"prefix": "imv",
"body": "increaseMasterVolume(${1:percent})",
"description": "Increases the volume by the given percent"
},
"decreaseMasterVolume": {
"prefix": "a:dmv",
"prefix": "dmv",
"body": "decreaseMasterVolume(${1:percent})",
"description": "Decreases the volume by the given percent"
},
"getMasterVolume": {
"prefix": "a:gmv",
"prefix": "gmv",
"body": "getMasterVolume()",
"description": "Returns the current volume as a float between 0 and 1"
},
"playSound": {
"prefix": "a:pso",
"prefix": "playSound",
"body": "playSound(\"${1:filename}\")",
"description": "Plays the given sound file. The file must be an mp3 or wav and located in ${openhab.home}/sounds"
},
"playStream": {
"prefix": "a:pst",
"prefix": "pst",
"body": "playStream(\"${1:URI}\")",
"description": "Plays the audio stream at the given url"
},
"say": {
"prefix": "a:say",
"prefix": "say",
"body": "say(\"${1:text}\")",
"description": "Says the given text through Text-to-Speech"
},
"say:v": {
"prefix": "a:say",
"prefix": "say",
"body": "say(\"${1:text}\", \"${2:voice}\")",
"description": "Says the given text through the given voice (depends on the TTS engine and voices installed)"
},
"a:say": {
"prefix": "a:say",
"say:v:d": {
"prefix": "say",
"body": "say(\"${1:text}\", \"${2:voice}\", \"${3:device}\")",
"description": "Says the given text through the given voice to the given output device (Mac OSX only)."
},