Chris,

Thanks for your response and for the great piece of software you give to
the community. I believe tools like Jrefactory can really make a
difference in programmers daily effectiveness and pleasure, and I'm
confident that programmers themselves will have great ideas when it
comes to enhancing their every day tools.
Making JRefactory GPL appears to me as a great opportunity for the Java
community to get access to even more intelligent programming tools as
Martin Fowler described it so well (e.g. in "Crossing Refactoring's
Rubicon" at
http://www.martinfowler.com/articles/refactoringRubicon.html)


> I'd love to help you integrate JRefactory into JDE.

I'll try to work on it as much as my spare time and my yet-novice emacs
lisp skills allow me to. I've taken the liberty to forward our email
thread to the JDE list, I hope you don't mind. I'm sure other people on
the list including Richard den Adel (who originally pointed the JDE list
to Jrefactory home page at http://jrefactory.sourceforge.net/) will have
great interest in this integration and will suggest bright ideas.

> I haven't seen JDE, but I'm guessing it is not like
> IBM's Visual Age (or JOODA) where you edit one method
> at a time, but more like emacs or JBuilder where you
> edit the entire file at a time.  Is this right?

Yes, in fact the JDE is a mode in emacs that offer numerous features
supporting java programming. Here is an extract from the JDE release
notes:

"Features include:
* Menu of commonly used commands (compile, run, debug, build, insert
  javadoc, generate javadoc, interpret, help, etc.)
* extended syntax coloring
* automatic indentation
* source-level debugging based on either jdb or the
  JDE's integrated JPDA-based debugger (JDEbug)
* javadoc comment insertion and javadoc generation
* Intellisense-like completion of object methods and fields
* Java source code intepreter
* Code templates
* automatic generation of import statements
* control flow abbreviation expansion (e.g, if -> if then else)
* source code navigation tools, including a class index menu and
  a tree-structured source code browser"

I'll look into following the steps you kindly described in your response
to progressively integrate JRefactory with the JDE.

One thing that I am wondering is how much of the pretty printer feature
is used when applying refactorings? Since the JDE provides means to the
programmer to configure how code will be indented and formatted (such as
[semi] automated javadoc generation/checking/correction) it could appear
weird to re-specify similar things to JPrinter. Maybe we'll find a way
as the integration proceeds to configure JPrinter so that it can
integrate/delegate with the code formatting that JDE provides?

> Suddenly I forget how to do it, but it basically
> involves creating an
> org.acm.seguin.uml.refactor.ExtractMethodDialog
> object.  I'll check and get back to you on that.
>
> Up to now, I've always done the other refactorings
> from an UML class diagram.  I am about to start making
> them easier to call from a text based system -
> JBuilder.  I'll send some more information when it is
> done with a description of how to do it.

That will be indeed very valuable. The current approach the JDE
maintainers have followed was (correct me people if I'm wrong) to try to
integrate 3rd party tools using an emacs-based user interface. An
example of this is interface can be seen in the "method override wizard"
whose screen shot is available at
http://jde.sunsite.dk/jdedoc/ug/jde-ug-content.html#MethodOverrideWizard
. Another more elaborate example, the JDPA debugger front-end developped
by the JDE maintainers, provides a rich text-based interface for
interacting with the debugger (see the screen shot at
http://jde.sunsite.dk/jdedoc/jdebug/ug/jdebug-ug-content.html#LaunchingProcess)

Consequently, the philosphy would be to try not to bring up Swing GUI
during use of integrated tools. However, this might come as a second
step of the integration of Jrefactory in the JDE. Your work to make the
refactoring "easier to call from a text base system" will certainly be
of great help. Please let me/us know how it goes.

Thanks again for your help and JRefactory!

Sincerely,

Guillaume.


> -----Original Message-----
> From: Chris Seguin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 7:02 PM
> To: Guillaume Berche
> Subject: Re: Integrating JRefactory with the emacs JDE
>
>
> Hi Guillaume!
>
> I'd love to help you integrate JRefactory into JDE.  I
> haven't seen JDE, but I'm guessing it is not like
> IBM's Visual Age (or JOODA) where you edit one method
> at a time, but more like emacs or JBuilder where you
> edit the entire file at a time.  Is this right?
>
> When I've integrated JRefactory with an editor, my
> general approach has been:
>
> (1)  Get the pretty printer working
> (2)  Get extract method working
> (3)  Consider if it is worthwhile to get the UML
> diagrams to work
>
> To get the pretty printer working, you basically need
> a way to get the following information:
>
> (A)  The text of the current file that you are editing
> (B)  Get the current location in the file
> (C)  Set the text of the current file
>
> Then I subclass the object
> org.acm.seguin.pretty.PrettyPrintFromIDE.  Add it to a
> menu and the pretty printer is up and running.
>
> The next easiest refactoring is the extract method
> refactoring.  For this, you need the same 3 pieces of
> information listed above, and
>
> (D)  The currently selected text
>
> Suddenly I forget how to do it, but it basically
> involves creating an
> org.acm.seguin.uml.refactor.ExtractMethodDialog
> object.  I'll check and get back to you on that.
>
> Up to now, I've always done the other refactorings
> from an UML class diagram.  I am about to start making
> them easier to call from a text based system -
> JBuilder.  I'll send some more information when it is
> done with a description of how to do it.
>
> I hope this helps.  Let me know if this is what you
> were looking for.
>
> Chris
>


> -----Original Message-----
> From: Richard den Adel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 9:43 AM
> To: Berche, Guillaume; [EMAIL PROTECTED]
> Subject: Re: Ideas for new JDE intelligent coding features
>
>
> Berche, Guillaume wrote:
>
> > Richard,
> >
> > Thanks for pointing me to JRefactory. It's indeed a great
> tool! It might be interesting to integrate with the JDE. The
> actuall GUI of JRefactory does not seem to bring too many
> improvements over what the JDE offers. The refactoring parts
> however would be just great! I also love the undo feature.
> >
> > Thanks again,
> >
> > Guillaume.
> >
>
> Hi Guilaume,
>
> I was just typing an email to Chris Seguin, when I received
> your email
> to Chris.
> I couldn't have said it better.  Indeed, the GUI/Uml part of
> JRefactory
> would be a 'nice to have' feature, but every emacs user would like to
> have the refactoring `trigger' from the source code.
>
> I've seen the integration of JRefactory with JBuilder, it basically
> starts the same GUI for refactoring (only extract method is available
> from the source code.
>
> I am willing to spend some time on the integration with JDE.
>
> you will have to thank Chris for writing this excellent software and
> publishing it under the GNU license.
>
> Thanks Chris!
>
> Richard.
>
>
>



>
> --- Guillaume Berche <[EMAIL PROTECTED]> wrote:
> > Chris,
> >
> > I was pointed to the JRefactory tool by someone on
> > the Emacs JDE (Java
> > Development Environment http://jde.sunsite.dk/)
> > mailing list. Some
> > people on the JDE list were expressing their need
> > for some refactoring
> > features to complete the intelligent completion
> > features of the JDE.
> > I had a quick look at the JRefactory source and test
> > code, and was
> > pretty impressed by it.
> >
> > I was wondering what would be the best way to
> > integrate the JRefactory
> > into the JDE? The JDE provides a text-based user
> > interface, so it would
> > probably makes sense to preserve this during the
> > integration. This
> > interface provides support for argument entering and
> > displaying feedback
> > about completion of a task. The JDE projects define
> > a classpath for
> > source compilation and symbol lookup. I guess this
> > would mimic
> > Jrefactory classpath and source argument. The JDE
> > also hosts a JVM, so I
> > guess the general model for this integration would
> > be to host the UI
> > part in the JDE and then have the JDE request
> > JRefactory (through its
> > embedded JVM) to perform the refactoring, and would
> > try to get the
> > feedback information into a string (such as the
> > updated classes and
> > error messages if any)
> >
> > I've seen that you already integrated Jrefactory
> > into some IDEs. What
> > would you think would be the best way to perform
> > this integration? Can
> > you point me to the objects I could use to
> > initialize JRefactory, and
> > then request a particular refactoring?
> >
> > Thanks,
> >
> > Guillaume.
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>

Reply via email to