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:
parent
f86e0598de
commit
3177d17585
2 changed files with 2 additions and 14 deletions
|
@ -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$
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Add table
Reference in a new issue