I think this might be a problem for refactoring support, as you have to manipulate the 
source code on the abstract syntax tree level - a refactoring is usually implemented 
by applying a transformation to the AST, then generating code from the transformed 
tree or affected tree section (for all the files affected).

Since you have to correlate the source code with the AST, I don't think that the 
byte-code would have enough information (maybe it has with the line numbers from the 
debug information, not sure). Maybe for some simple refactorings it would be 
sufficient, but for example for extract method, the input to the refactoring is a 
region in the source code - not a symbol name, but a sequencial group of lines. One 
would have to be able to map that back to the structure created from the byte-code.

The documentation of CEDET (http://cedet.sourceforge.net/semantic.shtml) describes the 
following among the new features of the Semantic 2.0 package:

Bison ported to Emacs 
  David Ponce has ported Bison to Emacs Lisp. Languages supported via the new wisent 
parser will run faster. New languages will be easier to support as you can run a handy 
script to port directly from .y sources.

Maybe the new parser could provide the more advanced data structures required to 
support refactoring.

> -----Original Message-----
> From: Suraj Acharya [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 01, 2004 1:10 PM
> To: Nascif Abousalh-Neto
> Cc: [EMAIL PROTECTED]
> Subject: Re: refactoring in jdee
> 
> jde-usages doesn't parse any source at all, it only looks at 
> byte-code from classes in jde-global-classpath.
> 
> Suraj
> 
> On Fri, 1 Oct 2004 12:36:57 -0400, Nascif Abousalh-Neto 
> <[EMAIL PROTECTED]> wrote:
> > Another tool to consider is FreeFactor. It is in 
> SourceForge, and it is already integrated with Emacs.
> > It is still alpha, but is a good start for a true refactoring tool.
> > 
> > http://sourceforge.net/projects/freefactor.
> > 
> > A true refactoring tool needs access to the full syntactic 
> tree of the source code - not just method signatures, but 
> also method bodies. Does semantic support that? How about jde-usages?
> >
> 

Reply via email to