Monday, April 23, 2012

How to apply Checkstyle format automaticaly ?

Problem :

You want to format your code with checkstyle rule with CTRL-ALT-F.

Solution :

Right clic on the project -> Checkstyle -> Create a Formatter

Then go Windows -> Preferences -> Code Style -> Formatter 

Next, you just have to select the formatter you have created.
After that, you can make CTRL - ALT - F to format you code