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

[beta2] sitemap alignment not working at all #34

Open CWempe opened 4 years ago

CWempe commented 4 years ago

I am not sure if I should report an issue with the current beta2.

I suspect this worked in the stable version. But I never tried it.

When I try to format my sitemaps, the only thing that happens is that lines with Color or Switch are moved all the way to the left with no ident. The rest of the document stays the same.

I guess the beta is still a work in progress and @MaxBec focused on the items files for now. 😅

maxbec commented 4 years ago

Indeed. The sitemap and thing formatting in v2 is still in the beta stage as it will be in the v2 release. The focus is on items formatting at the moment.

felixschndr commented 3 years ago

Are there any new developments to this?

When trying to format one sitemap of mine I get this error

Command 'Format Document With...' resulted in an error (Overlapping ranges are not allowed!)

and formatting this simple sitemap

sitemap testing label="Testing"
{
    Frame label="Trigger" //Nicht löschen!
    {
        Switch item=Test_Trigger_For_Testrules mappings=[ON="AN", OFF="AUS"]
        Switch item=Sprachassistent_Heizleistung mappings=[ON="AN", OFF="AUS"]
        Slider item=Rolladen
        Default item=Rolladen
    }
}

results in

sitemap testing label="Testing"
 {

Frame label="Trigger" 
//Nicht löschen!
     {

Switch item=Test_Trigger_For_Testrules mappings=[ON="AN", OFF="AUS"]

Switch item=Sprachassistent_Heizleistung mappings=[ON="AN", OFF="AUS"]

Slider item=Rolladen

Default item=Rolladen

}

}

which is basically unreadable^^

maxbec commented 3 years ago

Are there any new developments to this?

When trying to format one sitemap of mine I get this error

Command 'Format Document With...' resulted in an error (Overlapping ranges are not allowed!)

and formatting this simple sitemap

sitemap testing label="Testing"
{
    Frame label="Trigger" //Nicht löschen!
    {
        Switch item=Test_Trigger_For_Testrules mappings=[ON="AN", OFF="AUS"]
        Switch item=Sprachassistent_Heizleistung mappings=[ON="AN", OFF="AUS"]
        Slider item=Rolladen
        Default item=Rolladen
    }
}

results in

sitemap testing label="Testing"
 {

Frame label="Trigger" 
//Nicht löschen!
   {

Switch item=Test_Trigger_For_Testrules mappings=[ON="AN", OFF="AUS"]

Switch item=Sprachassistent_Heizleistung mappings=[ON="AN", OFF="AUS"]

Slider item=Rolladen

Default item=Rolladen

}

}

which is basically unreadable^^

Hey,

thank you for the feedback. At the moment i don't have time to implement and develop new features like sitemap-formatting. The focus right now is on improving the items-file formatting.

But feel free to open new PRs.

CWempe commented 3 years ago

I think you should hide the Enable Beta Features is you do not consider working on it in the near feature. Otherwise you might get more unnecessary feedback from users who try the sitemap feature and want to help you by giving feedback.