diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java index 3722ad107cc..e4fb1288589 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java @@ -41,7 +41,7 @@ public class ExtractConstantRefactoringTest extends RefactoringTest { protected void runTest() throws Throwable { IFile refFile = project.getFile(fileName); NameNVisibilityInformation info = new NameNVisibilityInformation(); - ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring( refFile, selection, info, true); + ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring( refFile, selection, info); RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR); assertConditionsOk(checkInitialConditions); info.setName("theAnswer"); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java index 65917269db8..e9ebacc8666 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java @@ -77,26 +77,14 @@ public abstract class CRefactoring extends Refactoring { private IIndex fIndex; public static final String NEWLINE = System.getProperty("line.separator"); //$NON-NLS-1$ - public CRefactoring(IFile file, ISelection selection, boolean runHeadless) { + public CRefactoring(IFile file, ISelection selection) { this.file = file; this.selection = selection; this.initStatus=new RefactoringStatus(); - if(!runHeadless) { - IWorkbenchPage activePage = EclipseObjects.getActivePage(); - - if(!activePage.saveAllEditors(true)){ - initStatus.addError("EDITOR_NOT_SAVE"); //$NON-NLS-1$ - } - } if(selection == null){ initStatus.addError(Messages.HSRRefactoring_SelectionNotValid); } - - } - - public CRefactoring(IFile file, ISelection selection) { - this(file, selection, false); } private class ProblemFinder extends ASTVisitor{