mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Removes head-less refactoring option, by Emanuel Graf, bug 225528.
This commit is contained in:
parent
3177d17585
commit
9404ffb8d4
3 changed files with 8 additions and 9 deletions
|
@ -24,7 +24,6 @@ import org.eclipse.jface.viewers.ISelection;
|
|||
import org.eclipse.ltk.core.refactoring.Change;
|
||||
import org.eclipse.ltk.core.refactoring.Refactoring;
|
||||
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
|
@ -58,8 +57,6 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousStatement;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IASTDeclarationAmbiguity;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.refactoring.utils.EclipseObjects;
|
||||
|
||||
/**
|
||||
* The baseclass for all other refactorings, provides some common implementations for
|
||||
* condition checking, change generating, selection handling and translation unit loading.
|
||||
|
|
|
@ -80,11 +80,7 @@ public class ExtractConstantRefactoring extends CRefactoring {
|
|||
private final NameNVisibilityInformation info;
|
||||
|
||||
public ExtractConstantRefactoring(IFile file, ISelection selection, NameNVisibilityInformation info){
|
||||
this(file, selection, info, false);
|
||||
}
|
||||
|
||||
public ExtractConstantRefactoring(IFile file, ISelection selection, NameNVisibilityInformation info, boolean runHeadless){
|
||||
super(file,selection, runHeadless);
|
||||
super(file,selection);
|
||||
this.info = info;
|
||||
name = Messages.ExtractConstantRefactoring_ExtractConst;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ import org.eclipse.cdt.core.model.ICElement;
|
|||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.refactoring.utils.EclipseObjects;
|
||||
|
||||
/**
|
||||
* Common base class for refactoring actions
|
||||
* @since 5.0
|
||||
|
@ -52,7 +54,11 @@ public abstract class RefactoringAction extends Action {
|
|||
|
||||
@Override
|
||||
public final void run() {
|
||||
if (fEditor != null) {
|
||||
EclipseObjects.getActivePage().saveAllEditors(true);
|
||||
if(EclipseObjects.getActivePage().getDirtyEditors().length != 0) {
|
||||
return;
|
||||
}
|
||||
if (fEditor != null) {
|
||||
ISelectionProvider provider= fEditor.getSelectionProvider();
|
||||
if (provider != null) {
|
||||
ISelection s= provider.getSelection();
|
||||
|
|
Loading…
Add table
Reference in a new issue