aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-01-16 14:55:24 (EST)
committerPaul Elder2014-01-17 14:39:38 (EST)
commitc1c38582be71611017f6cd654af1879a2c851043 (patch)
treebff2d6f6874347f2d0df763fef89500b5605c42e
parent465c81f795649e37757533b7f32ab7f12d0eb7f8 (diff)
downloadeclipse.platform.ui-c1c38582be71611017f6cd654af1879a2c851043.zip
eclipse.platform.ui-c1c38582be71611017f6cd654af1879a2c851043.tar.gz
eclipse.platform.ui-c1c38582be71611017f6cd654af1879a2c851043.tar.bz2
bug 412001: [KeyBindings] Ctrl+F in Browser widget in a dialog isM20140124-1600M20140122-1000refs/changes/68/20768/1
wrongly forwarded to workbench window Back port to 4.3.2 (bug 426019) Change-Id: I12c5a349c8b451a441035583e137eee06f1aa43a
-rw-r--r--bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/KeyAssistDialog.java2
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java40
2 files changed, 11 insertions, 31 deletions
diff --git a/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/KeyAssistDialog.java b/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/KeyAssistDialog.java
index 62f0af2..6810259 100644
--- a/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/KeyAssistDialog.java
+++ b/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/KeyAssistDialog.java
@@ -463,6 +463,8 @@ public class KeyAssistDialog extends PopupDialog {
return Window.OK;
}
create();
+ // Bug 412001. Stop ShellActivationListener from creating a context for this.
+ getShell().setData("org.eclipse.e4.ui.ignoreDialog", Boolean.TRUE); //$NON-NLS-1$
// Configure the size and location.
Point size = configureSize();
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java
index 3def60d..4d0a146 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 IBM Corporation and others.
+ * Copyright (c) 2010, 2014 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
@@ -129,36 +129,14 @@ public class ShellActivationListener implements Listener {
}
private void deactivate(Shell shell) {
- Shell parent = shell.isDisposed() ? null : (Shell) shell.getParent();
- if (parent == null) {
- // no parent shell, clear the chain to reflect reality, if there are
- // other shells, the chain will be reconstructed on activation
- IEclipseContext currentlyActive = application.getContext()
- .getActiveChild();
- if (currentlyActive != null)
- currentlyActive.deactivate();
- return;
- }
- final IEclipseContext prevChild = (IEclipseContext) parent
- .getData(ECLIPSE_CONTEXT_SHELL_CONTEXT);
- final IEclipseContext parentContext = application.getContext();
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- if (prevChild == null) {
- IEclipseContext activeChild = parentContext.getActiveChild();
- if (activeChild != null) {
- activeChild.deactivate();
- }
- } else {
- prevChild.activate();
- }
- }
-
- public void handleException(Throwable exception) {
- WorkbenchSWTActivator.trace("/trace/workbench",
- "failed resetting previous child", exception);
- }
- });
+ // bug 412001. Cannot assume anything about a non-modelled Shell's
+ // deactivation. It could be:
+ // * some other application got activated
+ // * some dialog we cannot see (IE's Find dialog in 412001) get's
+ // activated
+ // * another unmodelled shell is about to be activated
+ // * a modelled shell is about to be activated.
+ // No matter what, the time to do things is on activation
}