AST and Writing out to another CompilationUnit [message #188445] |
Tue, 16 January 2007 18:32 |
Eclipse User |
|
|
|
Originally posted by: gmclachl.cis.strath.ac.uk
Hi,
I am writing a refactoring tool using the AST available in eclipse.
Basically the idea behind it is that it could remove between 1..N
methods from an existing file and write them out to a new file. Creating
a new source file seems easy enough.
However I am concerned about dependencies, for instance, if I move
method X which uses field Y is there a simple way of making sure that
field Y is also written out to the new file along with method X.
George
|
|
|
Re: AST and Writing out to another CompilationUnit [message #188512 is a reply to message #188445] |
Tue, 16 January 2007 23:45 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"George McLachlan" <gmclachl@cis.strath.ac.uk> wrote in message
news:eoj5nr$dkv$1@utils.eclipse.org...
>
> Hi,
> I am writing a refactoring tool using the AST available in eclipse.
> Basically the idea behind it is that it could remove between 1..N
> methods from an existing file and write them out to a new file. Creating
> a new source file seems easy enough.
>
> However I am concerned about dependencies, for instance, if I move
> method X which uses field Y is there a simple way of making sure that
> field Y is also written out to the new file along with method X.
You might investigate how the existing refactoring methods, such as "Pull
Up" and "Push Down", are implemented in JDT. They have to solve that
problem already.
|
|
|
Re: AST and Writing out to another CompilationUnit [message #188518 is a reply to message #188512] |
Wed, 17 January 2007 00:44 |
Eclipse User |
|
|
|
Originally posted by: gmclachl.cis.strath.ac.uk
Thanks for the reply, I will have a look at those. I noticed after
posting here that there is a jdt newsgroup, I shold really post this
there, but I don't really want to cross post.
George
Walter Harley wrote:
> "George McLachlan" <gmclachl@cis.strath.ac.uk> wrote in message
> news:eoj5nr$dkv$1@utils.eclipse.org...
>> Hi,
>> I am writing a refactoring tool using the AST available in eclipse.
>> Basically the idea behind it is that it could remove between 1..N
>> methods from an existing file and write them out to a new file. Creating
>> a new source file seems easy enough.
>>
>> However I am concerned about dependencies, for instance, if I move
>> method X which uses field Y is there a simple way of making sure that
>> field Y is also written out to the new file along with method X.
>
>
> You might investigate how the existing refactoring methods, such as "Pull
> Up" and "Push Down", are implemented in JDT. They have to solve that
> problem already.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08770 seconds