Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-09 16:07:37 +0000
committerMarkus Schorn2008-04-09 16:07:37 +0000
commit9404ffb8d45bae7128e3a9804fb73a7833972c55 (patch)
treee02ff82099d35ce9d38bb5447d80d2f6627a7724
parent3177d175858f122e18823e91f3f0865546f5ea30 (diff)
downloadorg.eclipse.cdt-9404ffb8d45bae7128e3a9804fb73a7833972c55.tar.gz
org.eclipse.cdt-9404ffb8d45bae7128e3a9804fb73a7833972c55.tar.xz
org.eclipse.cdt-9404ffb8d45bae7128e3a9804fb73a7833972c55.zip
Removes head-less refactoring option, by Emanuel Graf, bug 225528.
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java3
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractconstant/ExtractConstantRefactoring.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/RefactoringAction.java8
3 files changed, 8 insertions, 9 deletions
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 e9ebacc8666..382ce400bfb 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
@@ -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.
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractconstant/ExtractConstantRefactoring.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractconstant/ExtractConstantRefactoring.java
index 99848851773..bc84ad1d728 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractconstant/ExtractConstantRefactoring.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractconstant/ExtractConstantRefactoring.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/RefactoringAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/RefactoringAction.java
index 978fefdcfc1..5457fc05d38 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/RefactoringAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/RefactoringAction.java
@@ -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();

Back to the top