Automatically place a semicolon at the end of Java statements in Eclipse | Eclipse On E
We all know that Java statements are terminated by a semicolon (;), but they're a bit of a pain to add to the end of a line. One way would be to press End (to move to the end of the line) then press semicolon, but this is tedious. Because this is something that you do often it's worth learning how to do this faster.
It's a good thing Eclipse can automatically put the semicolon at the end of the line, no matter where you are in the statement. It's as easy as setting one preference and there's a bonus preference for adding braces to the correct position as well. For something so small, it saves a lot of time.
So in the example below, if you imagine that your cursor is placed after the word blue since you were editing the string. Pressing semicolon will cause Eclipse to place the semicolon after the closing bracket at the end. Nice.
Read full article from Automatically place a semicolon at the end of Java statements in Eclipse | Eclipse On E
No comments:
Post a Comment