[3rd Party] Tree view of current Rules file

Hello!

I’ve recently discovered a nice VSCode extension called File Tree View. It basically adds a new sidebar with a structure of any JSON, TypeScript/JavaScript or PHP file.

I planned to write my own openHAB file structure tree view inside openhab-vscode but this extension had all the logic in place.
I just needed to write a simple *.rules file parser.

I’ve submitted a pull request with this change to vscode-tree-view extension.

Preview

Here’s the tool in action:

tree

Download

If you’d like to use this feature already, you can download and install prepackaged extension manually:
vs-treeview-0.1.0.vsix.zip

Simply unpack the downloaded file, go to VSCode Extensions menu and select Install from VSIX:

Edit: Installation

You can install the extension directly from the following URL:
https://marketplace.visualstudio.com/items?itemName=DaGhostman.vs-treeview

Or by simply typing “File Tree View” in the Extensions panel in your VSCode.

Enjoy!

7 Likes

@kubawolanin Great Stuff again
You should have mentioned to disable autoupdate for Extensions until your PR will be merged, otherwise it will be updated to V1.1 which does not include your PR… (happende to me)

@hmerk thank you!

Good news is that the author of File Tree View has merged my PR already and the extension with that feature will soon be released :wink:

https://marketplace.visualstudio.com/items?itemName=DaGhostman.vs-treeview

1 Like

I have installed the File Tree View extension, but it doesn’t appear in the Explorer View.
OpenHAB Items and Things show up OK.
Is there a configuration required?
I’m running openHAB 2.2 if that’s relevant.

It looks like the author created a separate section for the tree view.
Look for this icon:

image

or hit Ctrl + Alt + T

Oh, btw - I’ve added Items support there as well :slight_smile:

image

Ah yes, found it thanks.
Not quite so convenient, but I guess it’s better if you have many rules in one file. Not something I personally do.
Thanks for the Items support as well.

It looks like Items with dimensions do not work.

image

But I am not sure if I find this feature for items even usefull. :wink: