• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Eclipse formatter and checkstyle configurations

 
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
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
 
Ranch Hand
Posts: 221
Scala Python Java
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
 
Yes, my master! Here is the tiny ad you asked for:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic