This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Formatter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Formatter" Watch "Formatter" New topic


Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
Having trouble with eclipse's formatter, it's supposed to be according to Sun's conventions but doesn't pass checkstyle, which is also set to Sun's conventions. Anyhat, what do you guys use?
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516

I modified eclipse formatter options to do it exactly the way I want :
- 80 caracters per line
- blank line before the 1st member in classes...

Also, Checkstyle checks more than what the Eclipse formatter does I believe.Their scope are different.

For instance, checkstyle will tell you that your variable name is not correct, or that you should use a keyword in a specific situation. Eclipse, will only put the right tabulation.

I use both.

I have a question though. Checkstyle keeps telling me that my methods should have final arguments. is that something I should really do ?
It also bugs me with the order of keywords "final public static" Is that important also ?

subject: Formatter
Similar Threads
Style. Which would you prefer?
What about line wrap?
About coding convention in Java...
Code Formatting Question
Please review my code