]> git.uio.no Git - ifi-stolz-refaktor.git/commitdiff
Thesis: refining "references to enclosing instances" sections
authorErlend Kristiansen <erlenkr@ifi.uio.no>
Tue, 15 Apr 2014 18:54:36 +0000 (20:54 +0200)
committerErlend Kristiansen <erlenkr@ifi.uio.no>
Tue, 15 Apr 2014 18:54:36 +0000 (20:54 +0200)
thesis/master-thesis-erlenkr.tex

index abdf498b9bb116845a98d65d6a32ef2424239757..1a86f844b7d40127a36303d34764e3acca8dff9e 100644 (file)
@@ -1668,16 +1668,16 @@ unsuitable for the \ExtractAndMoveMethod refactoring.
 \subsection{References to enclosing instances of the enclosing class}
 The title of this section may be a little hard to grasp at first. What it means 
 is that there is a (non-static) class \m{C} that is declared in the scope of 
-possibly multiple other classes. And there is a statement in a method declared 
-in class \m{C} that contains a reference to one or more instances of thes
-enclosing classes of \m{C}.
+possibly multiple other classes. And there is a statement in the body of a 
+method declared in class \m{C}, that contains a reference to one or mor
+instances of these enclosing classes of \m{C}.
 
 The problem with this, is that these references may not be valid if they are 
 moved to another class. Theoretically, some situations could easily be solved by 
 passing, to the moved method, a reference to the instance where the problematic 
-referenced member is declared, in the case where this member is public. This is 
-not done in the underlying \MoveMethod refactoring, so it cannot be allowed in 
-the \ExtractAndMoveMethod refactoring either.
+referenced member is declared. This should work in the case where this member is 
+publicly accessible. This is not done in the underlying \MoveMethod refactoring, 
+so it cannot be allowed in the \ExtractAndMoveMethod refactoring either.
 
 \subsection{Inconsistent return statements}
 To verify that a text selection is consistent with respect to return statements, 
@@ -3028,12 +3028,9 @@ instantiations gracefully when moving a method. This problem is also related to
 bug\ldots \todoin{File Eclipse bug report}
 
 \subsection{The EnclosingInstanceReferenceChecker}
-\todoin{Contains duplicate text from semantic section}
-The purpose of this checker is to verify that the names in a selection are not 
-referencing any enclosing instances. This is for making sure that all references 
-is legal in a method that is to be moved. Theoretically, some situations could 
-be easily solved my passing a reference to the referenced class with the moved 
-method (e.g. when calling public methods), but the dependency on the 
+The purpose of this checker is to verify that the names in a text selection are 
+not referencing any enclosing instances. In theory, the underlying problem could 
+be solved in some situations, but our dependency on the 
 \type{MoveInstanceMethodProcessor} prevents this.
 
 The 
@@ -3041,14 +3038,14 @@ The
 is a modified version of the 
 \typewithref{org.eclipse.jdt.internal.corext.refactoring.structure.MoveInstanceMethod\-Processor}{EnclosingInstanceReferenceFinder} 
 from the \type{MoveInstanceMethodProcessor}. Wherever the 
-\type{EnclosingInstanceReferenceFinder} would create a fatal error status, the 
-checker throws a \type{CheckerException}.
-
-It works by first finding all of the enclosing types of a selection. Thereafter 
-it visits all its simple names to check that they are not references to 
-variables or methods declared in any of the enclosing types. In addition the 
-checker visits \var{this}-expressions to verify that no such expressions are 
-qualified with any name.
+\type{EnclosingInstanceReferenceFinder} would create a fatal error status, the
+checker will throw a \type{CheckerException}.
+
+The checker works by first finding all of the enclosing types of a selection.  
+Thereafter, it visits all the simple names of the selection to check that they 
+are not references to variables or methods declared in any of the enclosing 
+types. In addition, the checker visits \var{this}-expressions to verify that no 
+such expressions are qualified with any name.
 
 \subsection{The ReturnStatementsChecker}\label{returnStatementsChecker}
 \todoin{Contains duplicate text from semantic section}