aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2011-11-07 16:25:53 (EST)
committerOleg Besedin2011-11-07 16:25:53 (EST)
commit37277ea92b4ea06cf34895b557ce0e068534383c (patch)
tree359662af59eabce7e39934fcfcca791678e7c922
parentecf1d9169f92decb1da00e36ba20bb6561887169 (diff)
downloadeclipse.platform.ui-37277ea92b4ea06cf34895b557ce0e068534383c.zip
eclipse.platform.ui-37277ea92b4ea06cf34895b557ce0e068534383c.tar.gz
eclipse.platform.ui-37277ea92b4ea06cf34895b557ce0e068534383c.tar.bz2
Bug 360513 - [Preferences] IPreferencePage.performCancel() does not stopv20111107-2125
PreferenceDialog.cancelPressed() if it returns false
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
index c28d36c..cf524b2 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -252,18 +252,19 @@ public class PreferenceDialog extends TrayDialog implements IPreferencePageConta
protected void cancelPressed() {
// Inform all pages that we are cancelling
Iterator nodes = preferenceManager.getElements(PreferenceManager.PRE_ORDER).iterator();
+ final boolean[] cancelOK = new boolean[] { true };
while (nodes.hasNext()) {
final IPreferenceNode node = (IPreferenceNode) nodes.next();
if (getPage(node) != null) {
SafeRunnable.run(new SafeRunnable() {
public void run() {
if (!getPage(node).performCancel()) {
- return;
+ cancelOK[0] = false;
}
}
-
-
});
+ if (!cancelOK[0])
+ return;
}
}