diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringHistoryTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringHistoryTest.java index dde6d2bef55..1456f22c0e1 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringHistoryTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringHistoryTest.java @@ -18,6 +18,7 @@ import java.util.Properties; import org.eclipse.core.filesystem.URIUtil; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.ltk.core.refactoring.Refactoring; import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy; import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.eclipse.ltk.core.refactoring.history.RefactoringHistory; @@ -25,8 +26,6 @@ import org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryServi import org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest; -import org.eclipse.cdt.internal.ui.refactoring.CRefactoring; - /** * @author Emanuel Graf IFS */ @@ -41,7 +40,6 @@ public class RefactoringHistoryTest extends ExtractFunctionRefactoringTest { protected void configureRefactoring(Properties refactoringProperties) { scriptFile = fileMap.get(refactoringProperties.getProperty( "scriptFile", "refScript.xml")); - } @Override @@ -49,27 +47,21 @@ public class RefactoringHistoryTest extends ExtractFunctionRefactoringTest { String xmlSource = scriptFile.getSource(); URI uri= URIUtil.toURI(project.getLocation()); xmlSource = xmlSource.replaceAll("\\$\\$projectPath\\$\\$", uri.getPath()); - RefactoringHistory refHist = RefactoringHistoryService.getInstance() - .readRefactoringHistory( - new ByteArrayInputStream(xmlSource - .getBytes()), 0); + RefactoringHistory refHist = RefactoringHistoryService.getInstance().readRefactoringHistory( + new ByteArrayInputStream(xmlSource.getBytes()), 0); for (RefactoringDescriptorProxy proxy : refHist.getDescriptors()) { RefactoringStatus status = new RefactoringStatus(); - CRefactoring ref = (CRefactoring) proxy - .requestDescriptor(new NullProgressMonitor()) - .createRefactoring(status); + Refactoring ref = proxy.requestDescriptor(new NullProgressMonitor()).createRefactoring(status); assertTrue(status.isOK()); RefactoringStatus checkInitialConditions = ref.checkInitialConditions(NULL_PROGRESS_MONITOR); - if(fatalError){ + if (fatalError) { assertConditionsFatalError(checkInitialConditions); return; - } - else{ + } else { assertConditionsOk(checkInitialConditions); executeRefactoring(ref); } } } - } diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java index cae7a2489da..75282a4b647 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java @@ -15,8 +15,8 @@ import java.util.Collection; import java.util.Properties; import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; import org.eclipse.ltk.core.refactoring.Change; +import org.eclipse.ltk.core.refactoring.Refactoring; import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest; @@ -66,7 +66,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTest { } } - protected void executeRefactoring(CRefactoring refactoring) throws CoreException, Exception { + protected void executeRefactoring(Refactoring refactoring) throws Exception { RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR); assertConditionsOk(finalConditions); Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);