--- /dev/null
+package no.uio.ifi.refaktor.change.changers;
+
+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;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+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 ExtractAndMoveMethodCandidate}.
+ *
+ * This is done with the help of a {@link ProjectWideExtractAndMoveMethodAnalyzer}
+ * and an {@link AggregationAnalyzerChanger}.
+ */
+public class ProjectWideExtractAndMoveMethodChanger implements RefaktorChanger {
+
+ private AggregationAnalyzerChanger changer;
+
+ public ProjectWideExtractAndMoveMethodChanger(IProject project) {
+ changer = new AggregationAnalyzerChanger(new ProjectWideExtractAndMoveMethodAnalyzer(project));
+ }
+
+ public ProjectWideExtractAndMoveMethodChanger(IJavaProject javaProject) {
+ changer = new AggregationAnalyzerChanger(new ProjectWideExtractAndMoveMethodAnalyzer(javaProject));
+ }
+
+ @Override
+ public void checkPreconditions() throws RefaktorAnalyzerException {
+ changer.checkPreconditions();
+ }
+
+ @Override
+ public void execute(IProgressMonitor monitor) throws CoreException {
+ changer.execute(monitor);
+ }
+
+}