"Foreach" template is formatted incorrectly
Answered
Hi,
When starting to type "foreach", a popup will open with the option "foreach". Clicking on it, my foreach method will be automatically generated like this:
for(:
)
{
}
Looking at the live template for "foreach" (in the "android" section), the template should be more like this:
for(:)
{
}
The only way I find to make it works is to uncheck the option "reformat according to style", which seem very strange to me, since I make sure that my style wasn't breaking the line after a ":" (https://ufile.io/x9u6l).
Therefore, it would seem that the "foreach" template use a different style that the one specified in "editor->code style" (unless this is a bug ?). Is someone know which style is apply on the template of a "foreach" ?
Thank you
Please sign in to leave a comment.
Bug report is welcome at https://youtrack.jetbrains.com/issues/IDEA.
See another issue related to foreach formatting: https://youtrack.jetbrains.com/v2/issue/IDEA-145538.