Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse Refactoring
Eclipse Refactoring [message #218905] Mon, 14 November 2005 11:11
Eclipse UserFriend
Originally posted by: irum.cs.utoronto.ca

Hi,
I am trying to understand the data flow analysis in Eclipse Extract
Method Refactoring. These are the observations I have made and I would
appreciate if someone can confirm for me that I am not missing on
something, or misunderstood something.

1) Basically, in terms of data flow, the refactoring deterimines:
arguments, local variables and return values of the methods.

The selected portion of the code to be refactored is checked for
variables that are being read and written to. All variables that are being
read in their first use (inside the selection) are passed as arguments to
the
extracted method. All variables that are written to in their first use
are captured as local variables in the extracted method.

For return values, the variables that are being written(in the
selection)are compared to variables that are read in their first use right
"after" the selection. If there is one such variable it is captured as the
return value. If there are >1 such variables, then there is an error since
there are >1 return values. Also, there is the case of the loop
re-entrance.

2) Additionally, the flow analyzer checks if there are any partial
returns or branches off the selection, and if so, then it will throw an
error.

I will really appreciate if somebody can point out to me any scenarios
that I may have missed.

Thanks a lot,
Sincerely,
Irum Godil.
Previous Topic:TypeDeclararion modifiers in an AST visit
Next Topic:Extract Method Question in Eclipse Refactoring
Goto Forum:
  


Current Time: Sun May 11 07:00:47 EDT 2025

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

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

Back to the top