aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2014-01-31 07:03:11 (EST)
committerGerrit Code Review @ Eclipse.org2014-02-05 05:45:48 (EST)
commit6ef7c10177462b02c293a03d37b7e6cff1bbc59f (patch)
tree4171f235117d3aa3b143e7399a08f070d133a953
parentbe8c3040213cbe8f429629105cd107b4ac9cf08a (diff)
downloadeclipse.platform.ui-6ef7c10177462b02c293a03d37b7e6cff1bbc59f.zip
eclipse.platform.ui-6ef7c10177462b02c293a03d37b7e6cff1bbc59f.tar.gz
eclipse.platform.ui-6ef7c10177462b02c293a03d37b7e6cff1bbc59f.tar.bz2
Bug 426828 - Context created for MDynamicMenuContribution processingrefs/changes/88/21388/2
should be disposed Change-Id: Icfeaf4b940f61367360b00ea311e742c06f1773a Signed-off-by: Sopot Cela <sopotcela@gmail.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java1
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerShowProcessor.java6
2 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java
index eac8428..396daa8 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java
@@ -100,6 +100,7 @@ public class MenuManagerHideProcessor implements IMenuListener2 {
ContextInjectionFactory.invoke(contribution,
AboutToHide.class, parentContext,
dynamicMenuContext, null);
+ dynamicMenuContext.dispose();
}
}
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerShowProcessor.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerShowProcessor.java
index 6cd03c9..b857f1e 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerShowProcessor.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerShowProcessor.java
@@ -166,9 +166,11 @@ public class MenuManagerShowProcessor implements IMenuListener2 {
dynamicMenuContext.set(List.class, mel);
IEclipseContext parentContext = modelService
.getContainingContext(currentMenuElement);
- if (ContextInjectionFactory.invoke(contribution,
+ Object rc = ContextInjectionFactory.invoke(contribution,
AboutToShow.class, parentContext, dynamicMenuContext,
- this) == this) {
+ this);
+ dynamicMenuContext.dispose();
+ if (rc == this) {
if (logger != null) {
logger.error("Missing @AboutToShow method in " + contribution); //$NON-NLS-1$
}