Title: JDE and Transmogrify (was RE: jlint, antic or other code cleaning tools)
Hi Guillaume,
-----Original Message-----
From: Guillaume Berche [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 3:44 AM
To: Abousalh-Neto, Nascif [NCRTP:3X50:EXCH]; Mark Mynsted
Cc: jde
Subject: RE: 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.
[Nascif] I got the same impression. I was playing with JRefactory recentely, and the main designer was kind enough to extend it to allow the user to configure gnuclient as a source code viewer. This makes for a nice one-direction integration; you now can, from the UML class diagram interface of JRefactory, launch Emacs to see the source code. But integration on the other direction (Emacs->JRefactory) would be much harder.
 
Concerning the fact that the parsing is made twice and would cost in terms of performance,
[Nascif] Plus the fact that Transmogrify uses a lot of memory
 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.
[Nascif] I agree 100% percent.
 
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)
[Nascif] I wonder if the BeanShell instance created by JDEbug could be re-used, shaving some seconds out of the start-up time. Having two JVMs running under Emacs/JDE will take a lot of resources...
 
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.
[Nascif] This is the point I disagree with. I think that the earlier JDE is integrated with Transmogrify the more users we will have using it, and thus the more feedback the tool will receive. Open Source projects grow based on feedback, and more users mean a faster evolution. Who knows, we may even have advanced JDE users extending Transmogrify and implementing new refactorings - or reverse-engineering them to a Semantic-based implementation, which I still think is the ideal solution for JDE.
 
Currently, the project lists the following refactorings: (http://transmogrify.sourceforge.net/doc/userguide.html)
  • 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
    [Nascif] Don't forget the lint (which can find unused variables, among other things) and code change (which can wrap blocks in try-catch exceptions, a functionality that has already been required in the JDE mailing list) extensions as well. They are also very useful - and already available.
 
 
Regards,

Nascif 

-----Message d'origine-----
De : Nascif Abousalh-Neto [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 3 août 2001 19:50
À : Mark Mynsted
Cc : [EMAIL PROTECTED]
Objet : JDE and Transmogrify (was RE: jlint, antic or other code cleaning tools)

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

 

Reply via email to