Title: JDE and Transmogrify (was RE: jlint, antic or other code cleaning tools)
The
integration of Transmogrify with an IDE seems to be pretty well designed. It
seems a good candidate for integration with JDE. I looked in the past at the
integration of JRefactory http://jrefactory.sourceforge.net/csrefactory.html.
Althought JRefactory seems more advanced in terms of refactoring features,
Transmogrify makes it easier to integrate with IDEs.
Concerning the fact that the parsing is made twice and
would cost in terms of performance, in the short term I would rather approach
the use of Transmogrify as an explicit action by the developper rather than an
agent warning you constantly of improvements you could make to your code.
Consequently, we can imagine to only trigger
Transmogrify when the developer requires it. I would be very willing to wait a
few seconds every time I need a refactoring/check done, and have no performance
impact the rest of the time.
Consequently, the integration with Transmogrify would
be emacs-driven instead of the other way around. A same stdin/stdout tunnel than
the beanshell/JDEbug uses, could be used for this integration. Emacs would issue
beanshell instruction to Transmogrify for triggering refactorings, and the JDE
implementation of Transmogrify's Hook interface http://transmogrify.sourceforge.net/doc/api/net/sourceforge/transmogrify/hook/Hook.html
would issue lisp requests to emacs and parse the results to return them to
Transmogrify (such as data about current selection)
I
believe it might make sense to wait a bit to have Transmogrify stabilize and
expand the list of refactorings before integrating with the JDE. Transmogrify is
still in beta, and lots of improvements are scheduled ahead.
- Rename Symbol--like Rename Variable except it (sort of) works for methods,
too. Care must be taken when renaming interface or overridden methods.
- Extract Method
- Replace Temp With Query
- Inline Temp
- Pull up field
Regards,
Guillaume.
I was just checking the development notes, and here is what it
mentions about integrating Transmogrify with other IDE's (already integrates
with Forte and JBuilder):
"The Hook interface
If you want to
plug Transmogrify into a different pure-java IDE, all you have to do is extend
Hook and implement the abstract methods according to the IDEs plug-in
architecture. The IDE must have a few things exposed in its plug-in
architecture, but we feel these are fairly standard.
cursor position
position of beginning
and end of the selection
current file
files in a project"
I guess all this files would be available from Emacs/JDE, so
it should be possible to integrate this tool, using an approach similar to the
one used by JDEbug (using BeanShell as the "glue" between JDE and
Transmogrify).
On the other hand now you would have two heavy parsing
activities (semantic and Transmogrify) going on over the same set of data. It
could be a performance hit. But it sure sounds neat.
Regards,
Nascif