Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse Refactoring (How does Eclipse Re-Analyse source code after Refactoring?)
icon5.gif  Eclipse Refactoring [message #644556] Mon, 13 December 2010 09:35 Go to next message
Dharam  is currently offline Dharam Friend
Messages: 18
Registered: December 2010
Junior Member
Hello All!

1. Eclipse uses AST based concept for Refactoring. Refactoring is a "Complete Operation",
- Preceded by set of Preconditions
- Transformation
- Follwed by set of PostConditions

Example:
After applying "Rename Variable" refactoring, Eclipse immediately makes impact analysis & changes the source code

Queries:
Does it also change AST?

If Yes, then it must unparse AST & perform re-analysis to collect results based on new change,

But I am wondering how eclipse does it too fast. For millions of lines of code, static analyis takes lots of time.

Analysis means:
Variable Use
Variable Def
Aliasing Info
Call Graph
gen kill
reaching & liveness
etc...

[Updated on: Mon, 13 December 2010 12:23]

Report message to a moderator

Re: Eclipse Refactoring [message #644635 is a reply to message #644556] Mon, 13 December 2010 14:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Dharam,

Comments below.

Dharam wrote:
> Hello All!
>
> 1. Eclipse uses AST based concept for Refactoring. Refactoring is a
> "Complete Operation", - Preceded by set of Preconditions
> - Transformation
> - Follwed by set of PostConditions
>
> Example:
> After applying "Rename Variable" refactoring, Eclipse immediately
> makes impact analysis & changes the source code?
>
> Queries:
> Does it also change AST?
Yes.
>
> If Yes, then it must unparse AST & perform re-analysis to collect
> results based on new change,
The analysis is done using the AST.
>
> But I am wondering how eclipse does it too fast. For millions of
> lines of code, static analyis takes lots of time.
The incremental compiler is very smart and knows where to focus the
attention.
>
> Analysis means:
> Variable Use
> Variable Def
> Aliasing Info
> Call Graph gen kill reaching & liveness
> etc...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Refactoring [message #644747 is a reply to message #644635] Tue, 14 December 2010 05:06 Go to previous message
Dharam  is currently offline Dharam Friend
Messages: 18
Registered: December 2010
Junior Member
Thanks.

I agree with you, changing & unparsing AST is somewht starightforward task. But collecting static analysis results each time after refactoring very expensive,

def use / use def
gen kill
aliasing info for each reference variable
liveness
reaching.

Would you pls eloborate more on this? I would also like to request if you can suggest me eclipse library for static analyis used in refactoring.
Previous Topic:Problem with imports
Next Topic:Search results list
Goto Forum:
  


Current Time: Tue Apr 16 11:06:23 GMT 2024

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

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

Back to the top