2011/4/7 Martin Grigorov <mgrigo...@apache.org> > On Thu, Apr 7, 2011 at 1:54 PM, James Carman <ja...@carmanconsulting.com > >wrote: > > > On Thu, Apr 7, 2011 at 7:48 AM, Attila Király <kiralyattila...@gmail.com > > > > wrote: > > > (Also an answer to Hans Lesmeister) > > > > > > Afaik there is no checkstyle plugin that can do the same as eclipse > > > formatter + save actions: format and clean up code upon save. > Checkstyle > > > will only test that the rules are met or not. It is not very convenient > > > (also not possible to reformat whole projects with one click). > > > > > > > Again, we don't all use Eclipse. The Checkstyle plugin is convenient > > because it works in any environment (IDE or not). > > > > Does that mean that when I save a file or format it explicitly in my IDE > the > checkstyle plugin will intercept the action and apply its settings ? > Using checkstyle in Maven is stupid for this kind of projects - OSS > development in my spare time. I will be very unhappy to code something in > 30mins and then to spend another 30mins or more trying to apply > *manually*the formatting style in my IDE just to satisfy the build > tool. > > It means that Checkstyle check formatting, and Eclipse is able to show you as warning or error, that your file is not well formatted. Additionnally, some configuration of checkstyle plugin within m2eclipse are able to edit format configuration and save action in Eclipse, but I don't remember the way to do so.
Nonetheless, you will be able to see if your files are not compliant with formatting rules, and if you want to, you may configure your Eclipse formatter and save actions accordingly. > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com <http://jweekend.com/> >