----- Original Message -----
From: "Stephane Bailliez" <[EMAIL PROTECTED]>
> No sweat. There is no code fix involved in this besides changing the
import
> and modifiers, so it really does not touch the implementation itself and
is
> normally safe. I still have some code clean up in the pipe to do because I
> would like to put ALL if/else/while/for with a block to avoid things such
as
> the following that can really make you crazy when debugging because you
> don't see there is no block:
>
> if (flag)
> doSomething();
> doConfuseYourEnemyWithIndent();
>
> More simply, we tend to add things inside condition/loops than remove it,
so
> it's good practice to me to always put a block.
The JavaStyle plugin for jEdit has a switch for "create brackets around
single-line blocks". Perhaps there is some pieces of code you could
leverage there to accomplish this more automatically.
> The fix for this will be automatic as well unfortunately the code style
will
> suffer a little bit, so I might need to do a second pass by hand or find
an
> indent tool that is good enough not to break everything. :-(
It might be worth investigating wrapping a recursive directory structure
crawler around JavaStyle to take care of that automatically. I'm pretty
sure it can't pull off the import expansion and cleanup you did, but it
wouldn't surprise me if there is another plugin that accomplishes that.
Erik
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>