1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Removes head-less refactoring option, by Emanuel Graf, bug 225528.

This commit is contained in:
Markus Schorn 2008-04-09 16:06:05 +00:00
parent f86e0598de
commit 3177d17585
2 changed files with 2 additions and 14 deletions

View file

@ -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$

View file

@ -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{