Wednesday, October 25, 2006

Saw a Java demo based on Eclipse

What to say. It was about this tool to automatically add more or less repeated code to methods, like some sort of "unrefactor" tool. No parse tree, just text based. All in Eclipse, based on files, etc.

Man... we are so spoiled with stuff like our debuggers and things like the Refactoring Browser... that I think sometimes we take it too much for granted... I wish others were more open to taking a look at them, so they would stop all that suffering for no good reason!


murphee said...

You don't happen to remember the name of this thing or what it did?

Doing something text based - or without parsetree - as you say, sounds rather odd.
Eclipse has shipped the JDT (Java Development Tools) with an extensive set of tools that make the Java AST available, have AST Rewrite code that makes it very easy to do high level modifications (ie. not text based), etc.
The basic infrastructure to do this is also very nice (emitting changes with automatic undo, fancy diff preview, etc). It's a realy joy writing your own refactoring tools in Eclipse.

For everyone interested:,id,4,nodeid,6.html
is an online available issue of the
EclipseMagazine, and it has a detailed article on writing your own refactorings with the JDT. They're showing how to build one that can be shipped to other people too. Eclipse doesn't come with a shell (Smalltalk "Workspace") yet, so you can't do fancy interactive things ... but that's going to happen too.

Andres said...


Yes, I do remember the name of this thing... but since I suggested the presenter to check out the Refactoring Browser, I feel a bit like keeping it away from potential flaming.

As for the Eclipse tools... well, even though I am much more productive in Smalltalk to begin with, I think that if you have to work in Java, at least have proper tools to do so (meaning that the Refactoring Browser for Java being available is a good thing).