]> git.uio.no Git - ifi-stolz-refaktor.git/commitdiff
ExtractAndMoveMethodAnalysisResult: renaming to ExtractAndMoveMethodCandidate
authorErlend Kristiansen <erlenkr@ifi.uio.no>
Sun, 23 Mar 2014 20:12:59 +0000 (21:12 +0100)
committerErlend Kristiansen <erlenkr@ifi.uio.no>
Sun, 23 Mar 2014 20:12:59 +0000 (21:12 +0100)
26 files changed:
software/no.uio.ifi.refaktor.benchmark/src/no/uio/ifi/refaktor/benchmark/SearchBasedExtractAndMoveMethodAnalysisBenchmark.java
software/no.uio.ifi.refaktor.tests/src/no/uio/ifi/refaktor/tests/SearchBasedExtractAndMoveMethodAnalyzerTest.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ExtractAndMoveMethodCandidate.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ExtractAndMoveMethodAnalysisResult.java with 89% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/CompilationUnitWideExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/PackageFragmentParentExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/PackageWideExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/SearchBasedExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/TypeWideExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodAnalysisResultComparator.java [deleted file]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodCandidateComparator.java [new file with mode: 0644]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/FavorNoUnfixesCandidateComparator.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/FavorNoUnfixesAnalysisResultComparator.java with 70% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantAnalysisResultComparator.java [deleted file]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantCandidateComparator.java [new file with mode: 0644]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/aspects/ExtractAndMoveMethodExecutionResult.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/aspects/StatisticsAspect.aj
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/change/changers/AggregationAnalyzerChanger.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/change/changers/ProjectWideExtractAndMoveMethodChanger.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/change/changers/SearchBasedExtractAndMoveMethodChanger.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/change/executors/ExtractAndMoveMethodExecutor.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/AbstractSearchBasedExtractAndMoveMethodHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/CompilationUnitWideSearchBasedExtractAndMoveMethodAnalysisHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/PackageFragmentRootWideSearchBasedExtractAndMoveMethodAnalysisHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/PackageWideSearchBasedExtractAndMoveMethodAnalysisHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/ProjectWideSearchBasedExtractAndMoveMethodAnalysisHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/SearchBasedExtractAndMoveMethodAnalysisHandler.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/handlers/TypeWideSearchBasedExtractAndMoveMethodAnalysisHandler.java

index a783a3c245f6fe0f8936ef6930e4fb6b3a5d391e..efe07a52fe49b5de7daa26781b8e81bed1965e63 100644 (file)
@@ -5,7 +5,7 @@ import static org.junit.Assert.assertTrue;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.ProjectWideExtractAndMoveMethodAnalyzer;
 import no.uio.ifi.refaktor.aspects.StatisticsAspect;
 import no.uio.ifi.refaktor.aspects.StatisticsAspect.Statistics;
@@ -15,7 +15,7 @@ import org.junit.Test;
 
 public class SearchBasedExtractAndMoveMethodAnalysisBenchmark extends AbstractSearchBasedExtractAndMoveMethodBenchmark {
 
-       private List<ExtractAndMoveMethodAnalysisResult> results;
+       private List<ExtractAndMoveMethodCandidate> results;
 
        @Test
        public void bench() throws Throwable {
@@ -37,14 +37,14 @@ public class SearchBasedExtractAndMoveMethodAnalysisBenchmark extends AbstractSe
                        RefaktorDebug.log(t);
                        throw t;
                } finally {
-                       results = new LinkedList<ExtractAndMoveMethodAnalysisResult>(analyzer.getResults());
+                       results = new LinkedList<ExtractAndMoveMethodCandidate>(analyzer.getResults());
                }
        }
 
        private void debugPrintFinalStatistics() {
                Statistics snapshot = StatisticsAspect.aspectOf().getSnapshot();
 
-               for (ExtractAndMoveMethodAnalysisResult result: results)
+               for (ExtractAndMoveMethodCandidate result: results)
                        RefaktorDebug.println(result);
 
                RefaktorDebug.println("Number of results: " + results.size() + "\n");
index eb8b38593d30a59ba06c52147b2504e69704074a..8c30fe0e17880c9ed49221459f52ea85508e9ec9 100644 (file)
@@ -5,7 +5,7 @@ import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.junit.Assert.assertTrue;
 import no.uio.ifi.refaktor.analyze.analyzers.Analyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.SearchBasedExtractAndMoveMethodAnalyzer;
-import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesAnalysisResultComparator;
+import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesCandidateComparator;
 import no.uio.ifi.refaktor.analyze.exceptions.NoTargetFoundException;
 import no.uio.ifi.refaktor.examples.manager.ExampleCodeManager;
 import no.uio.ifi.refaktor.prefix.Prefix;
@@ -49,7 +49,7 @@ public class SearchBasedExtractAndMoveMethodAnalyzerTest {
 
                int methodOffset = method.getSourceRange().getOffset();
                CompilationUnitTextSelection textSelection = new CompilationUnitTextSelection(method.getCompilationUnit(), methodOffset + 69, 10);
-               assertThat(textSelection.isEquivalentTo(analyzer.getResult().textSelection));
+               assertThat(textSelection.isEquivalentTo(analyzer.getCandidate().textSelection));
 
                ASTNode coveredNode = textSelection.getCoveredNode();
                assertThat(coveredNode, instanceOf(ExpressionStatement.class));
@@ -59,19 +59,19 @@ public class SearchBasedExtractAndMoveMethodAnalyzerTest {
 
                MethodInvocation methodInvocation = (MethodInvocation) expressionStatement.getExpression();
                Prefix prefix = new Prefix(methodInvocation);
-               assertTrue(prefix.getVariableBindingOfFirstExpression().isEqualTo(analyzer.getResult().calculateOriginalTarget()));
+               assertTrue(prefix.getVariableBindingOfFirstExpression().isEqualTo(analyzer.getCandidate().calculateOriginalTarget()));
        }
 
        @Test
        public void testSearchableMethodFavorNoUnfixes() throws Exception {
                IMethod method = getTestDataMethod("searchableMethod");
 
-               SearchBasedExtractAndMoveMethodAnalyzer analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesAnalysisResultComparator());
+               SearchBasedExtractAndMoveMethodAnalyzer analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesCandidateComparator());
                analyzer.analyze();
 
                int methodOffset = method.getSourceRange().getOffset();
                CompilationUnitTextSelection textSelection = new CompilationUnitTextSelection(method.getCompilationUnit(), methodOffset + 100, 31);
-               assertThat(textSelection.isEquivalentTo(analyzer.getResult().textSelection)); 
+               assertThat(textSelection.isEquivalentTo(analyzer.getCandidate().textSelection)); 
 
                ASTNode coveredNode = textSelection.getCoveredNode();
                assertThat(coveredNode, instanceOf(ExpressionStatement.class));
@@ -81,7 +81,7 @@ public class SearchBasedExtractAndMoveMethodAnalyzerTest {
 
                MethodInvocation methodInvocation = (MethodInvocation) expressionStatement.getExpression();
                Prefix prefix = new Prefix(methodInvocation);
-               assertTrue(prefix.getVariableBindingOfFirstExpression().isEqualTo(analyzer.getResult().calculateOriginalTarget()));
+               assertTrue(prefix.getVariableBindingOfFirstExpression().isEqualTo(analyzer.getCandidate().calculateOriginalTarget()));
        }
 
        @Test(expected=NoTargetFoundException.class)
similarity index 89%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ExtractAndMoveMethodAnalysisResult.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ExtractAndMoveMethodCandidate.java
index 262c330e2cf1d28fd29705a74b0cd88c156dcf7d..5952ce58a4a35589e62062f3a1bb36eef123f2bf 100644 (file)
@@ -11,11 +11,11 @@ import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 
-public class ExtractAndMoveMethodAnalysisResult {
-       private class ResultDataCalculator {
+public class ExtractAndMoveMethodCandidate {
+       private class CandidateDataCalculator {
                private final ExtractAndMoveMethodAnalyzer analyzer;
 
-               public ResultDataCalculator(ExtractAndMoveMethodAnalyzer analyzer) {
+               public CandidateDataCalculator(ExtractAndMoveMethodAnalyzer analyzer) {
                        this.analyzer = analyzer;
                }
 
@@ -54,13 +54,13 @@ public class ExtractAndMoveMethodAnalysisResult {
        private final boolean hasNoUnfixes;
        private final String originalTargetKey;
 
-       public ExtractAndMoveMethodAnalysisResult(IMethod method, ExtractAndMoveMethodAnalyzer analyzer, CompilationUnitTextSelection textSelection, int numberOfStatementsAnalyzed, int numberOfTextSelectionsAnalyzed) {
+       public ExtractAndMoveMethodCandidate(IMethod method, ExtractAndMoveMethodAnalyzer analyzer, CompilationUnitTextSelection textSelection, int numberOfStatementsAnalyzed, int numberOfTextSelectionsAnalyzed) {
                this.method = method;
                this.textSelection = new MethodRelativeCompilationUnitTextSelection(method, textSelection);
                this.numberOfStatementsAnalyzed = numberOfStatementsAnalyzed;
                this.numberOfTextSelectionsAnalyzed = numberOfTextSelectionsAnalyzed;
                
-               ResultDataCalculator calculator = new ResultDataCalculator(analyzer);
+               CandidateDataCalculator calculator = new CandidateDataCalculator(analyzer);
                hasMoreThanOnePossibleTarget = calculator.hasMoreThanOnePossibleTarget();
                targetFrequency = calculator.getTargetFrequency();
                hasNoUnfixes = calculator.hasNoUnfixes();
index 09422ee33f458576229b6c4c99e6534d3c3e8caa..6c0e879b8de84a7db1983803af277b04590e4864 100644 (file)
@@ -3,7 +3,7 @@ package no.uio.ifi.refaktor.analyze.analyzers;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.utils.RefaktorDebug;
 
@@ -15,18 +15,18 @@ import org.eclipse.jdt.core.JavaModelException;
  * Responsible for analyzing all methods in a compilation unit for
  * candidates to the Extract and Move Method refactoring.
  */
-public class CompilationUnitWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> {
+public class CompilationUnitWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodCandidate> {
 
        private final ICompilationUnit compilationUnit;
-       private final List<ExtractAndMoveMethodAnalysisResult> results;
+       private final List<ExtractAndMoveMethodCandidate> results;
 
        public CompilationUnitWideExtractAndMoveMethodAnalyzer(ICompilationUnit compilationUnit) {
                this.compilationUnit = compilationUnit;
-               results = new LinkedList<ExtractAndMoveMethodAnalysisResult>();
+               results = new LinkedList<ExtractAndMoveMethodCandidate>();
        }
 
        @Override
-       public List<ExtractAndMoveMethodAnalysisResult> getResults() {
+       public List<ExtractAndMoveMethodCandidate> getResults() {
                return results;
        }
 
index 9b3d52b2dd2a87881b018e3e5e028a381fe9c9d4..c7952271840a7a219acb9a12b64a9a6d89282af4 100644 (file)
@@ -3,23 +3,23 @@ package no.uio.ifi.refaktor.analyze.analyzers;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.utils.RefaktorDebug;
 
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaModelException;
 
-abstract public class PackageFragmentParentExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> {
+abstract public class PackageFragmentParentExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodCandidate> {
 
-       private final List<ExtractAndMoveMethodAnalysisResult> results;
+       private final List<ExtractAndMoveMethodCandidate> results;
 
        public PackageFragmentParentExtractAndMoveMethodAnalyzer() {
-               results = new LinkedList<ExtractAndMoveMethodAnalysisResult>();
+               results = new LinkedList<ExtractAndMoveMethodCandidate>();
        }
 
        @Override
-       public List<ExtractAndMoveMethodAnalysisResult> getResults() {
+       public List<ExtractAndMoveMethodCandidate> getResults() {
                return results;
        }
 
index 6cb7b3cb7ebad6ec1af4aaf032c53f3950b245f4..8e434a51581f2fd7b056187932cfbf1fbeca87a5 100644 (file)
@@ -3,7 +3,7 @@ package no.uio.ifi.refaktor.analyze.analyzers;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.utils.RefaktorDebug;
 
@@ -15,18 +15,18 @@ import org.eclipse.jdt.core.JavaModelException;
  * Responsible for analyzing all methods in a package for
  * candidates to the Extract and Move Method refactoring.
  */
-public class PackageWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> {
+public class PackageWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodCandidate> {
 
        private final IPackageFragment packageFragment;
-       private final List<ExtractAndMoveMethodAnalysisResult> results;
+       private final List<ExtractAndMoveMethodCandidate> results;
 
        public PackageWideExtractAndMoveMethodAnalyzer(IPackageFragment packageFragment) {
                this.packageFragment = packageFragment;
-               results = new LinkedList<ExtractAndMoveMethodAnalysisResult>();
+               results = new LinkedList<ExtractAndMoveMethodCandidate>();
        }
 
        @Override
-       public List<ExtractAndMoveMethodAnalysisResult> getResults() {
+       public List<ExtractAndMoveMethodCandidate> getResults() {
                return results;
        }
 
index 16533375bb71967a75a1a33bf74395ebfb2e19da..ad96106ad131943dccb9d2f05d255065dbcb33e5 100644 (file)
@@ -4,9 +4,9 @@ import java.util.Collections;
 import java.util.LinkedList;
 import java.util.Set;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
-import no.uio.ifi.refaktor.analyze.comparators.ExtractAndMoveMethodAnalysisResultComparator;
-import no.uio.ifi.refaktor.analyze.comparators.IgnorantAnalysisResultComparator;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
+import no.uio.ifi.refaktor.analyze.comparators.ExtractAndMoveMethodCandidateComparator;
+import no.uio.ifi.refaktor.analyze.comparators.IgnorantCandidateComparator;
 import no.uio.ifi.refaktor.analyze.exceptions.GenericAnalyzerException;
 import no.uio.ifi.refaktor.analyze.exceptions.NoTargetFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
@@ -24,31 +24,31 @@ import org.eclipse.jdt.core.JavaModelException;
 public class SearchBasedExtractAndMoveMethodAnalyzer implements Analyzer {
 
        private final IMethod method;
-       private final ExtractAndMoveMethodAnalysisResultComparator analysisResultComparator;
-       private final LinkedList<ExtractAndMoveMethodAnalysisResult> possibleResults;
+       private final ExtractAndMoveMethodCandidateComparator candidateComparator;
+       private final LinkedList<ExtractAndMoveMethodCandidate> candidates;
        private final StatementListsCreator statementsCreator;
 
        private Set<CompilationUnitTextSelection> textSelections;
-       private ExtractAndMoveMethodAnalysisResult chosenResult;
+       private ExtractAndMoveMethodCandidate chosenCandidate;
 
        public SearchBasedExtractAndMoveMethodAnalyzer(IMethod method) {
-               this(method, new IgnorantAnalysisResultComparator());
+               this(method, new IgnorantCandidateComparator());
        }
 
        /**
         * @param method The handle of the method to analyze.
-        * @param analysisResultComparator A result comparator to compare two analysis results when deciding
+        * @param candidateComparator A candidate comparator to compare two analysis candidates when deciding
         *              which of them that is the best candidate for the refactoring.
         */
-       public SearchBasedExtractAndMoveMethodAnalyzer(IMethod method, ExtractAndMoveMethodAnalysisResultComparator analysisResultComparator) {
+       public SearchBasedExtractAndMoveMethodAnalyzer(IMethod method, ExtractAndMoveMethodCandidateComparator candidateComparator) {
                this.method = method;
-               this.analysisResultComparator = analysisResultComparator;
-               possibleResults = new LinkedList<ExtractAndMoveMethodAnalysisResult>();
+               this.candidateComparator = candidateComparator;
+               candidates = new LinkedList<ExtractAndMoveMethodCandidate>();
                statementsCreator = new StatementListsCreator(method);
        }
 
-       public ExtractAndMoveMethodAnalysisResult getResult() {
-               return chosenResult;
+       public ExtractAndMoveMethodCandidate getCandidate() {
+               return chosenCandidate;
        }
 
        @Override
@@ -58,15 +58,15 @@ public class SearchBasedExtractAndMoveMethodAnalyzer implements Analyzer {
 
                try {
                        generateTextSelections();
-                       generatePossibleResults();
+                       findPotentialCandidates();
                } catch (RefaktorAnalyzerException e) {
                        throw new NoTargetFoundException(e);
                }
 
-               if (possibleResults.isEmpty())
+               if (candidates.isEmpty())
                        throw new NoTargetFoundException();
 
-               chooseResult();
+               chooseCandidate();
        }
 
        private void abortIfStaticMethod() {
@@ -83,22 +83,22 @@ public class SearchBasedExtractAndMoveMethodAnalyzer implements Analyzer {
                textSelections = TextSelectionsGenerator.generateTextSelections(statementsCreator, method.getCompilationUnit());
        }
 
-       private void generatePossibleResults() {
+       private void findPotentialCandidates() {
                for (CompilationUnitTextSelection textSelection: textSelections) {
                        ExtractAndMoveMethodAnalyzer analyzer = new ExtractAndMoveMethodAnalyzer(textSelection);
                        analyzer.analyze();
 
                        if (analyzer.hasUsefulResults())
-                               possibleResults.add(new ExtractAndMoveMethodAnalysisResult(method, analyzer, textSelection, statementsCreator.getNumberOfStatements(), textSelections.size()));
+                               candidates.add(new ExtractAndMoveMethodCandidate(method, analyzer, textSelection, statementsCreator.getNumberOfStatements(), textSelections.size()));
                }
        }
 
-       private void chooseResult() {
-               sortPossibleResults();
-               chosenResult = possibleResults.getLast();
+       private void chooseCandidate() {
+               sortCandidates();
+               chosenCandidate = candidates.getLast();
        }
 
-       private void sortPossibleResults() {
-               Collections.sort(possibleResults, analysisResultComparator);
+       private void sortCandidates() {
+               Collections.sort(candidates, candidateComparator);
        }
 }
\ No newline at end of file
index f161e8a231fb717c89b64d4980db4bd5365234e4..75c2dc84108af650f7022129f30e38b8d76422c0 100644 (file)
@@ -3,8 +3,8 @@ package no.uio.ifi.refaktor.analyze.analyzers;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
-import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesAnalysisResultComparator;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
+import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesCandidateComparator;
 import no.uio.ifi.refaktor.analyze.exceptions.NoTargetFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.utils.RefaktorDebug;
@@ -17,19 +17,19 @@ import org.eclipse.jdt.core.JavaModelException;
  * Responsible for analyzing all methods in a type for
  * candidates to the Extract and Move Method refactoring.
  */
-public class TypeWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> {
+public class TypeWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer<ExtractAndMoveMethodCandidate> {
 
        private final IType type;
-       private final List<ExtractAndMoveMethodAnalysisResult> results;
+       private final List<ExtractAndMoveMethodCandidate> candidates;
 
        public TypeWideExtractAndMoveMethodAnalyzer(IType type) {
                this.type = type;
-               results = new LinkedList<ExtractAndMoveMethodAnalysisResult>();
+               candidates = new LinkedList<ExtractAndMoveMethodCandidate>();
        }
 
        @Override
-       public List<ExtractAndMoveMethodAnalysisResult> getResults() {
-               return results;
+       public List<ExtractAndMoveMethodCandidate> getResults() {
+               return candidates;
        }
 
        @Override
@@ -50,9 +50,9 @@ public class TypeWideExtractAndMoveMethodAnalyzer implements AggregationAnalyzer
        private void analyzeMethod(IMethod method) {
                try {
                        SearchBasedExtractAndMoveMethodAnalyzer analyzer = 
-                                       new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesAnalysisResultComparator());
+                                       new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesCandidateComparator());
                        analyzer.analyze();
-                       results.add(analyzer.getResult());
+                       candidates.add(analyzer.getCandidate());
                } catch (NoTargetFoundException e) {
                        // Ignoring
                } catch (AssertionError err) {
diff --git a/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodAnalysisResultComparator.java b/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodAnalysisResultComparator.java
deleted file mode 100644 (file)
index b4a26b4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package no.uio.ifi.refaktor.analyze.comparators;
-
-import java.util.Comparator;
-
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
-
-/**
- * The {@link ExtractAndMoveMethodAnalysisResult} that is to be favored
- * must be greater in comparison to a result that is less preferred.
- */
-public interface ExtractAndMoveMethodAnalysisResultComparator extends Comparator<ExtractAndMoveMethodAnalysisResult>{
-
-}
\ No newline at end of file
diff --git a/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodCandidateComparator.java b/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/ExtractAndMoveMethodCandidateComparator.java
new file mode 100644 (file)
index 0000000..031baea
--- /dev/null
@@ -0,0 +1,13 @@
+package no.uio.ifi.refaktor.analyze.comparators;
+
+import java.util.Comparator;
+
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
+
+/**
+ * The {@link ExtractAndMoveMethodCandidate} that is to be favored
+ * must be greater in comparison to a result that is less preferred.
+ */
+public interface ExtractAndMoveMethodCandidateComparator extends Comparator<ExtractAndMoveMethodCandidate>{
+
+}
\ No newline at end of file
@@ -1,10 +1,10 @@
 package no.uio.ifi.refaktor.analyze.comparators;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 
-public final class FavorNoUnfixesAnalysisResultComparator implements ExtractAndMoveMethodAnalysisResultComparator {
+public final class FavorNoUnfixesCandidateComparator implements ExtractAndMoveMethodCandidateComparator {
        @Override
-       public int compare(ExtractAndMoveMethodAnalysisResult resultOne, ExtractAndMoveMethodAnalysisResult resultTwo) {
+       public int compare(ExtractAndMoveMethodCandidate resultOne, ExtractAndMoveMethodCandidate resultTwo) {
                if (resultOne.hasNoUnfixes() && resultTwo.hasUnfixes())
                        return 1;
                else if (resultOne.hasUnfixes() && resultTwo.hasNoUnfixes())
diff --git a/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantAnalysisResultComparator.java b/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantAnalysisResultComparator.java
deleted file mode 100644 (file)
index 6acc9f3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package no.uio.ifi.refaktor.analyze.comparators;
-
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
-
-
-/**
- * An ignorant {@link ExtractAndMoveMethodAnalysisResultComparator} 
- * that compares all analysis results to be equal.
- */
-public class IgnorantAnalysisResultComparator implements ExtractAndMoveMethodAnalysisResultComparator {
-
-       @Override
-       public int compare(ExtractAndMoveMethodAnalysisResult o1, ExtractAndMoveMethodAnalysisResult o2) {
-               return 0;
-       }
-
-}
diff --git a/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantCandidateComparator.java b/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/comparators/IgnorantCandidateComparator.java
new file mode 100644 (file)
index 0000000..aa69e1c
--- /dev/null
@@ -0,0 +1,17 @@
+package no.uio.ifi.refaktor.analyze.comparators;
+
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
+
+
+/**
+ * An ignorant {@link ExtractAndMoveMethodCandidateComparator} 
+ * that compares all analysis results to be equal.
+ */
+public class IgnorantCandidateComparator implements ExtractAndMoveMethodCandidateComparator {
+
+       @Override
+       public int compare(ExtractAndMoveMethodCandidate o1, ExtractAndMoveMethodCandidate o2) {
+               return 0;
+       }
+
+}
index 44ca5e5057645f34e6f1340a2bbb5eb60822b87c..f1a553bc7076e1622e7ec64f1edc550224aa22b4 100644 (file)
@@ -1,18 +1,18 @@
 package no.uio.ifi.refaktor.aspects;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.reports.Report;
 
 import org.eclipse.jdt.core.dom.IVariableBinding;
 
 public class ExtractAndMoveMethodExecutionResult {
 
-       private final ExtractAndMoveMethodAnalysisResult analysisResult;
+       private final ExtractAndMoveMethodCandidate analysisResult;
        private final String signatureOfExtractedMethod;
        private final String originalTargetString;
        private final int executionNumber;
 
-       public ExtractAndMoveMethodExecutionResult(int executionNumber, ExtractAndMoveMethodAnalysisResult analysisResult, 
+       public ExtractAndMoveMethodExecutionResult(int executionNumber, ExtractAndMoveMethodCandidate analysisResult, 
                        String signatureOfExtractedMethod, IVariableBinding originalTarget) {
                this.executionNumber = executionNumber;
                this.analysisResult = analysisResult;
index 0b9b58dae92abff36d47c99efb29ee166abbf181..c631142dfdf8025c991c47e501b260a8afa2dd18 100644 (file)
@@ -11,7 +11,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.CompilationUnitWideExtractAndMoveMethodAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.ExtractAndMoveMethodAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.SearchBasedExtractAndMoveMethodAnalyzer;
@@ -255,7 +255,7 @@ privileged public aspect StatisticsAspect {
                call(* ExtractAndMoveMethodExecutor.execute(..)) && target(executor);
 
        pointcut analysisResultCreated() : 
-               call(public ExtractAndMoveMethodAnalysisResult.new(..));
+               call(public ExtractAndMoveMethodCandidate.new(..));
 
        after() : selectionAnalyze() {
                statistics.selectionsAnalyzedCount++;
index 2104495b4696462c3ed45a7934be2fe3bc6721b9..427cb085a8b8a1a3663905949810847a5363df9c 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.change.changers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.change.exceptions.RefactoringNotExecutedException;
@@ -19,9 +19,9 @@ import org.eclipse.core.runtime.NullProgressMonitor;
  */
 public class AggregationAnalyzerChanger implements RefaktorChanger {
 
-       private AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> analyzer;
+       private AggregationAnalyzer<ExtractAndMoveMethodCandidate> analyzer;
 
-       public AggregationAnalyzerChanger(AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> analyzer) {
+       public AggregationAnalyzerChanger(AggregationAnalyzer<ExtractAndMoveMethodCandidate> analyzer) {
                this.analyzer = analyzer;
        }
 
@@ -32,7 +32,7 @@ public class AggregationAnalyzerChanger implements RefaktorChanger {
 
        @Override
        public void execute(IProgressMonitor monitor) throws CoreException {
-               for (ExtractAndMoveMethodAnalysisResult result: analyzer.getResults()) {
+               for (ExtractAndMoveMethodCandidate result: analyzer.getResults()) {
                        try {
                                RefaktorDebug.println();
                                RefaktorDebug.println(this, result);
index 01e09ec2f417d2a7a4034a3befd1bf32e857a3c3..2707968b6c7169918b73b96fe8452670eb208a2c 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.change.changers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.ProjectWideExtractAndMoveMethodAnalyzer;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.change.executors.ExtractAndMoveMethodExecutor;
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.IJavaProject;
 /**
  * A {@link RefaktorChanger} that is responsible for analyzing all of the methods
  * in a project and execute the {@link ExtractAndMoveMethodExecutor} on all of the
- * positive results from the analysis. See {@link ExtractAndMoveMethodAnalysisResult}.
+ * positive results from the analysis. See {@link ExtractAndMoveMethodCandidate}.
  * 
  * This is done with the help of a {@link ProjectWideExtractAndMoveMethodAnalyzer}
  * and an {@link AggregationAnalyzerChanger}.
index 6bfa5684fba4bede6a78673d3c8f112926534fd2..f20bc598afe9d690a3abcf3d29cc552977dde3a2 100644 (file)
@@ -1,7 +1,7 @@
 package no.uio.ifi.refaktor.change.changers;
 
 import no.uio.ifi.refaktor.analyze.analyzers.SearchBasedExtractAndMoveMethodAnalyzer;
-import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesAnalysisResultComparator;
+import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesCandidateComparator;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.change.executors.ExtractAndMoveMethodExecutor;
 
@@ -15,7 +15,7 @@ public class SearchBasedExtractAndMoveMethodChanger implements RefaktorChanger {
        private SearchBasedExtractAndMoveMethodAnalyzer analyzer;
 
        public SearchBasedExtractAndMoveMethodChanger(IMethod method) {
-               this.analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesAnalysisResultComparator());
+               this.analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesCandidateComparator());
        }
 
        @Override
@@ -25,7 +25,7 @@ public class SearchBasedExtractAndMoveMethodChanger implements RefaktorChanger {
 
        @Override
        public void execute(IProgressMonitor monitor) throws CoreException {
-               ExtractAndMoveMethodExecutor executor = new ExtractAndMoveMethodExecutor(analyzer.getResult());
+               ExtractAndMoveMethodExecutor executor = new ExtractAndMoveMethodExecutor(analyzer.getCandidate());
                executor.execute(new NullProgressMonitor());
        }
 
index 9a3c87260abb282e934ad1106187fa9ad750da54..01006613744157e513319dd23bf5e42087232c46 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.change.executors;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.change.exceptions.RefactoringNotExecutedException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 
@@ -12,7 +12,7 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 /**
  * This {@link Executor} composes the refactorings known as 'Extract Method' and 'Move Method'.
  * 
- * It takes the result of an analysis (see {@link ExtractAndMoveMethodAnalysisResult})
+ * It takes the result of an analysis (see {@link ExtractAndMoveMethodCandidate})
  * and uses its textSelection, new method name and original target. First it executes 
  * an {@link ExtractMethodRefactoringExecutor} and then a 
  * {@link MoveMethodRefactoringExecutor}.
@@ -21,11 +21,11 @@ public class ExtractAndMoveMethodExecutor implements Executor {
        private final CompilationUnitTextSelection textSelection;
        private final IVariableBinding originalTarget;
        private String newMethodName;
-       private ExtractAndMoveMethodAnalysisResult analysisResult;
+       private ExtractAndMoveMethodCandidate analysisResult;
        private ExtractMethodPostExecutionResources postExecutionResources;
        private IProgressMonitor monitor;
 
-       public ExtractAndMoveMethodExecutor(ExtractAndMoveMethodAnalysisResult analysisResult) {
+       public ExtractAndMoveMethodExecutor(ExtractAndMoveMethodCandidate analysisResult) {
                this(analysisResult.textSelection, analysisResult.getNewMethodName(), analysisResult.calculateOriginalTarget());
                this.analysisResult = analysisResult;
        }
index a3958901e960d8ea55b8cb2897d1622c4de4bf6b..58f20b1989e4e46afbf93a4ce22418a703ed7eb9 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.aspects.StatisticsAspect;
 import no.uio.ifi.refaktor.aspects.StatisticsAspect.Statistics;
@@ -17,7 +17,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
 
 public abstract class AbstractSearchBasedExtractAndMoveMethodHandler extends AbstractHandler {
 
-       protected abstract AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element);
+       protected abstract AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element);
 
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -30,7 +30,7 @@ public abstract class AbstractSearchBasedExtractAndMoveMethodHandler extends Abs
 
                StatisticsAspect.init();
 
-               AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> analyzer = createAnalyzer(element);
+               AggregationAnalyzer<ExtractAndMoveMethodCandidate> analyzer = createAnalyzer(element);
                analyzer.analyze();
 
                Statistics statistics = StatisticsAspect.getSnapshot();
index 212dc03ce4d6367cc554d321206987fe5c366959..7ab03b51517291d95466464095f229438ad94c77 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.CompilationUnitWideExtractAndMoveMethodAnalyzer;
 
@@ -9,7 +9,7 @@ import org.eclipse.jdt.core.ICompilationUnit;
 public class CompilationUnitWideSearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractSearchBasedExtractAndMoveMethodHandler {
 
        @Override
-       protected AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element) {
+       protected AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element) {
                assert element instanceof ICompilationUnit;
                ICompilationUnit compilationUnit = (ICompilationUnit) element;
                return new CompilationUnitWideExtractAndMoveMethodAnalyzer(compilationUnit);
index ada26a15283b3d9cc6ee6dac718cf82f6d2669a9..f0ba3c3fcceca7edf9d68e7474e671fff026554a 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.PackageFragmentRootWideExtractAndMoveMethodAnalyzer;
 
@@ -9,7 +9,7 @@ import org.eclipse.jdt.core.IPackageFragmentRoot;
 public class PackageFragmentRootWideSearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractSearchBasedExtractAndMoveMethodHandler {
 
        @Override
-       protected AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element) {
+       protected AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element) {
                assert element instanceof IPackageFragmentRoot;
                IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) element;
                return new PackageFragmentRootWideExtractAndMoveMethodAnalyzer(packageFragmentRoot);
index eba29ad6de33a9516e711537f7b1d6b9ed7c21e2..84560ceb123c570bea3b85f851139e8a16cd509f 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.PackageWideExtractAndMoveMethodAnalyzer;
 
@@ -9,7 +9,7 @@ import org.eclipse.jdt.core.IPackageFragment;
 public class PackageWideSearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractSearchBasedExtractAndMoveMethodHandler {
 
        @Override
-       protected AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element) {
+       protected AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element) {
                assert element instanceof IPackageFragment;
                IPackageFragment packageFragment = (IPackageFragment) element;
                return new PackageWideExtractAndMoveMethodAnalyzer(packageFragment);
index 3ccc2dd40c18666ac0bc4c3a4e6bdc31612f4b2e..eaf1f10a30829b25587221ec1c64d10109066139 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.ProjectWideExtractAndMoveMethodAnalyzer;
 
@@ -10,7 +10,7 @@ import org.eclipse.jdt.core.IJavaProject;
 public class ProjectWideSearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractSearchBasedExtractAndMoveMethodHandler {
 
        @Override
-       protected AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element) {
+       protected AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element) {
                assert element instanceof IProject || element instanceof IJavaProject;
                
                if (element instanceof IProject)
index 7e58683dd347a241344a43cdc2dfb023ce150ef1..48f2d57f1f5366f3f6ed8d04538854cef49d02e5 100644 (file)
@@ -1,8 +1,8 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.SearchBasedExtractAndMoveMethodAnalyzer;
-import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesAnalysisResultComparator;
+import no.uio.ifi.refaktor.analyze.comparators.FavorNoUnfixesCandidateComparator;
 import no.uio.ifi.refaktor.analyze.exceptions.NoTargetFoundException;
 
 import org.eclipse.core.commands.AbstractHandler;
@@ -30,9 +30,9 @@ public class SearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractHand
 
                String message = "";
                try {
-                       SearchBasedExtractAndMoveMethodAnalyzer analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesAnalysisResultComparator());
+                       SearchBasedExtractAndMoveMethodAnalyzer analyzer = new SearchBasedExtractAndMoveMethodAnalyzer(method, new FavorNoUnfixesCandidateComparator());
                        analyzer.analyze();
-                       ExtractAndMoveMethodAnalysisResult result = analyzer.getResult();
+                       ExtractAndMoveMethodCandidate result = analyzer.getCandidate();
                        message = "Result:\n\nText selection:\n" + result.textSelection 
                                        + "\n\nNumber of text selections analyzed:\n" + result.numberOfTextSelectionsAnalyzed
                                        + "\n\nOriginal target:\n" + result.calculateOriginalTarget()
index 7be1175237a49c921313eb3037cdd1671c2451dc..1ea57d8ad81d7651073c82644a6ad4dc2d3641a7 100644 (file)
@@ -1,6 +1,6 @@
 package no.uio.ifi.refaktor.handlers;
 
-import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodAnalysisResult;
+import no.uio.ifi.refaktor.analyze.ExtractAndMoveMethodCandidate;
 import no.uio.ifi.refaktor.analyze.analyzers.AggregationAnalyzer;
 import no.uio.ifi.refaktor.analyze.analyzers.TypeWideExtractAndMoveMethodAnalyzer;
 
@@ -9,7 +9,7 @@ import org.eclipse.jdt.core.IType;
 public class TypeWideSearchBasedExtractAndMoveMethodAnalysisHandler extends AbstractSearchBasedExtractAndMoveMethodHandler {
 
        @Override
-       protected AggregationAnalyzer<ExtractAndMoveMethodAnalysisResult> createAnalyzer(Object element) {
+       protected AggregationAnalyzer<ExtractAndMoveMethodCandidate> createAnalyzer(Object element) {
                assert element instanceof IType;
                IType type = (IType) element;
                return new TypeWideExtractAndMoveMethodAnalyzer(type);