I have been converting a lot of code to the new JDK 1.5 constructs recently
and I decided it was too tedious, so I wrote a quick Eclipse plug-in to assist
me. It’s called J15 ("J One Five") and I am happy to announce its
first release.
Right now, J15 can convert for loops on arrays and collections but I have
quite a few other enhancements in mind which I will disclose as I implement
them.
In the meantime, please test it and let me know how it works for you, as I am
confident there are quite a few cases that I haven’t covered (manipulating a
Java Abstract Syntax Tree is fun but it produces very ugly code…).
By the way, you will need a recent Eclipse build to run it (since it needs to
support these new constructs). I am currently running N20040806 which
passed all the Windows tests.