> I noticed that existing comments seem to be hacked around quite a lot by the
> Eclipse formatting profile, but assumed that was because the code pre-dated
> the profile, or was not written in Eclipse.

Actually, it seems that the comments are formatted based on a line width 
specified in the formatter (I had assumed that they used the workspace 
settings). This makes sense, though, since workspace settings would vary from 
developer to developer but the profile should be fixed. I have extended the 
comment wrap width to 100 in the formatter.

> Another option would be to have a pre-commit Ant task which would perform a
> trim-whitespace, format any changed files and any other relevant tasks.
> I don't know if it is possible to do that and limit it to just the blocks of
> code identified by a diff or something similar.

I think the best bet is probably to fix the formatter. I haven't found a way to 
tell it to wrap boolean expressions the way I like, but no one else seems to 
use my convention anyways, so maybe it is for the best.  :-)

Reply via email to