aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2014-01-31 07:03:11 (EST)
committerSopot Cela2014-01-31 07:03:11 (EST)
commit681f84722d5aabfcd8e944c3709dfed200f464aa (patch)
tree6604f9a8ef84ebfea44f71dd7311865a5969f0d4
parenta87ca3498cfa8995ef060c8747ef52a918e752fd (diff)
downloadeclipse.platform.ui-681f84722d5aabfcd8e944c3709dfed200f464aa.zip
eclipse.platform.ui-681f84722d5aabfcd8e944c3709dfed200f464aa.tar.gz
eclipse.platform.ui-681f84722d5aabfcd8e944c3709dfed200f464aa.tar.bz2
Bug 426828 - Context created for MDynamicMenuContribution processingrefs/changes/30/21330/3
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$
}