maxbec / openHAB-Alignment-Tool

This extension adds support for formatting and indenting openHAB files. At the moment only the item-files are supported.
https://marketplace.visualstudio.com/items?itemName=max-beckenbauer.oh-alignment-tool
Eclipse Public License 2.0
21 stars 4 forks source link

Extension name, and formatting multi-line files. #2

Closed juanhaywood closed 5 years ago

juanhaywood commented 5 years ago

Just gave it a test. I actually was looking for a tool last night and came across the other one that formats as multi-line. So quite happy there is this column based one.

Unfortunately, I did run into some issues with your tool.

Firstly, it’s named exactly the same as the one from MarkHilbush. This caused the Command-Palette to not offer your one up for use. After disabling Mark’s one, it appeared in the Command-Palette, but the results weren’t what was expected.

Here is one of my item files before:

String                      JiPhone_BatteryStatus
                            "Battery Status [%s]"
                            <battery>
                            (iCloud_GroupJ)
                            {channel="icloud:device:myaccount:JiPhone7:batteryStatus"}

And here is what it looks like after using your tool:

StringJiPhone_BatteryStatus
                            "Battery Status [%s]"
                            <battery>
                            (iCloud_GroupJ)
                            {channel="icloud:device:myaccount:JiPhone7:batteryStatus"}
maxbec commented 5 years ago

Name-issue is now fixed.

maxbec commented 5 years ago

Version 1.0.6 added the function to decode line-by-line (multiline) item-definition files.

juanhaywood commented 5 years ago

Works great, thanks.