They do for me. But never mind, I updated the extension a little further so it now shows also references. Means: you hover over an item in a script and it shows where it is defined (items file ) and where its used.
you will find the .vsix file there.
To install it: (Vscode,Windows)
download the vsix file to your openhab machine
open vsc, connect to your openhab machine
hit F1 and enter Extensions: install from Vsix. Then browse to the vsix file
hit f1 again, enter developer: reload window
I will make PRs to the upstram repo, so maybe some of that new stull will make it to the official extension. Maybe not parsing variable states from log files as they feel the regex will break eventually (which it doesn’t)
A word of warning: this is new code. Seems to be working but consider it alpha. You are welcome to comment here.
Great work, extremely useful for troubleshooting, thx a lot.
Everything works as described, but I did not yet test the settings.
The only thing I noticed is a new error message in VSC, whenever I open a .things, .items, .rules or .sitemap file.
The error message does not appear when opening .js or .yaml files.
As I never had openhabian installed, I doubt the message is coming from my setup.
After updating from 1.0.1 to 1.0.2 I get the following error in the Output screen
openHAB vscode extension has been activated
Could not reload items for HoverProvider
--
Error:
Error while connecting to openHAB REST API.
Message:
Request cannot be constructed from a URL that includes credentials: http://xxxxx:yyyyyyyyy@192.168.2.167:8080/rest/items
--
Hovering the mouse over an item displays the scripts in which it is used or defined (only for file based items), but the item’s state is not shown.
The shown credentials are correct.
And additional, if Iclick the OH symbol in the activity bar I get this error
thanks for the feedback . Check out the updated vsix file, see link above. I didnt bump the version number. I also fixed another bug where groups were not resolved when the group name was followed by a “{” without white space in between.
But now I see a new warning in VSC, which disappears when the openHAB VSC extension is uninstalled:
(node:78420) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)