Why does "Join Lines" add '{' and '}'
"Join Lines" behaviour was recently modified, and I find it a major
annoyance :
In 3212,
, pressing
public int test ()
{
if (true) ]]>
return 1;
else
return 1;
}
would just join the lines and produce, as expected:
public int test ()
{
if (true) return 1;
else
return 1;
}
In 3229, Ctrl-J produces
public int test ()
{
if (true) { return 1;
}
else {
return 1;
}
}
This example is trivial, but it messes my code, and I miss the old way.
It should be either configurable, or fixed to work like before.
What do you think?
Alain
Please sign in to leave a comment.
AR> It should be either configurable, or fixed to work like before.
AR>
AR> What do you think?
Bug (IMO). The old way probably checked the "Force braces" option and if
unchecked removed the braces when joining.
Carlos
Alain, I'm sure, this is a bug - the whole layout system is unreliable since
the two or three last builds. Need to go back to 3144 for serious development.
Tom
posted as a bug:
"Join Lines" adds unrequested '{' and '}'
http://www.jetbrains.net/jira/browse/IDEA-601