Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » AST and Writing out to another CompilationUnit
AST and Writing out to another CompilationUnit [message #188445] Tue, 16 January 2007 18:32 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
>
Previous Topic:Find out which project wizard has been used to create a project
Next Topic:Liking the debugger to third-party source code
Goto Forum:
  


Current Time: Mon Sep 23 13:46:40 GMT 2024

Powered by FUDForum. Page generated in 0.08770 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top