• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse formatter and checkstyle configurations

 
Maciej Kwiecien
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm wondering if someone can share 100% SUN compliant Eclipse formatter and checkstyle configurations ( 100% stands for configuration that was good enough to pass SUN tests ;-) )
I search forum and collect a bit contradictory information: there are posts where people claim built-in Eclipse formatter is doing his job on the other hand there are completely opposite opinions.

Any help would be appreciated.

Regards,
Maciej
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maciej,

I created my own SCJD formatter based on the Eclipse built-in formatter. I made the changes according to the coding conventions mentioned in the SCJD book by Andrew Monkhouse.
About using tools for checking your code I didn't use any of them before submitting my assignment, afterwards I tried a few of them. My experiences can be read here.

Kind regards,
Roel
 
Carlos Morillo
Ranch Hand
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel,


Pardon my ignorance, but from what I can tell all the Java Coding standards described
in the Monkhouse book are pretty much already built-in into Eclipse.

The only think as a Developer you need to watch out is the JavaBeans Naming convention
for classes, variables, method names and constants as far as I know.

I am using the Eclipse Format command all the time under the Source menu.

Am I missing anything else?

Thanks,


Carlos.
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carlos Morillo wrote:Am I missing anything else?
I don't know. I just kept the scjd-projects but I didn't kept a copy of the formatter settings, so I have no idea of the changes I made against the built-in eclipse formatter. But I do think it's not really important if you apply 1 blank line or 2 between package and import statements,... but just use it consistent on every source file. the only thing i can remember is that I chose to use spaces for identation (instead of tabs) and that i kept the 80 chars per line.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic