The code reformat doesn't work correctly on the SQL part in the '*.xml' file for Mybatis
Answered
I have set the ‘Editor/Code Style/SQL/Queries/Align the first word of clause' to 'Right'.
The language injection is also right.
I have also restart my computer many times after modify the configuration.
But it actually align the first word to the left when I do Code Reformat on the .xml file, which is Mapper file for Mybatis.
Thanks if anyone can help.
Please sign in to leave a comment.
Hello,
Is it reproducible in other files?
@...
Thank you for your reply~
The problem is not always reproducible in other .xml files for Mybatis.
In some files the reformat still failed, but in some files it succeed.
I can't use the function now. It's really confusing.
> In some files the reformat still failed, but in some files it succeed.
Do you mean .xml files or other formats?
> Do you mean .xml files or other formats?
I mean, in some .xml files it succeed but in some .xml files it failed.
The reformat function seems unstable.
I am using the newest ultimated version of Intellij IDEA licienced to students.
Thank you anyway, I will use the spaces to align my code now :(
Do you use any MyBatis plugin? Is it possible to share sample project example for investigation?
> Do you use any MyBatis plugin? Is it possible to share sample project example for investigation?
Yse I use the plugin named "Free MyBatis plugin".
I think I can share a project example later.
Could you please try to temporarily disable "MyBatis" plugin and check if the issue still occurs?