Hi!
I've been using Eclipse to develop programs in Java for a while now and I'm very pleased with it, but one thing I can't understand is the automatic formatting tool (Source->Format). I have coded in other languages before and in all of them (at least before I started coding Java) I formatted my code like this:
if(1 == 1)
{
// do something
}
Then I discovered the formatting tool and of course it moved up all my curly start brackets one line. I found that you can change this in the preferences, but it was much easier for me to just accept this.
if(1 == 1) {
// do something
}
Anyway to the thing I don't understand! How come it corrects my code above and leaves the following code untouched?
if(1 == 1)
{
// do something
}
And you can add even more line breaks if you want to
if
(
1
==
1
)
{
// do something
}
Seems like a really nice way to code! But honestly, how come this isn't retracted?
[Updated on: Sat, 10 March 2012 16:29]
Report message to a moderator