Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2015-06-05 08:14:38 +0000
committervincent lorenzo2015-06-08 14:44:58 +0000
commit4f2ae110d3c199b79801285d4e1946a05006372d (patch)
tree9076b6ced0fc323a113add25982f392bfb6c24c9 /plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu
parent0cf497f7fb13e6eb3f36835379480c31c9faa134 (diff)
downloadorg.eclipse.papyrus-4f2ae110d3c199b79801285d4e1946a05006372d.tar.gz
org.eclipse.papyrus-4f2ae110d3c199b79801285d4e1946a05006372d.tar.xz
org.eclipse.papyrus-4f2ae110d3c199b79801285d4e1946a05006372d.zip
469376: [Table] Memory Leak : (Tree)NattableWidgetManager, EObjectTreeItemAxis and others objects are not disposed when the table is closed
Change-Id: Ie35fd68b304cebed52e8dcc8dfd412a88082740d Reviewed-on: https://git.eclipse.org/r/49533 Reviewed-by: Camille Letavernier <camille.letavernier@cea.fr> Reviewed-by: vincent lorenzo <vincent.lorenzo@cea.fr> Tested-by: Hudson CI
Diffstat (limited to 'plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu')
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/handlers/AbstractUmlNattableCreateCommandHandler.java4
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/util/TableMenuUtils.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/handlers/AbstractUmlNattableCreateCommandHandler.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/handlers/AbstractUmlNattableCreateCommandHandler.java
index b6d599c3b0a..c55720743cc 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/handlers/AbstractUmlNattableCreateCommandHandler.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/handlers/AbstractUmlNattableCreateCommandHandler.java
@@ -16,14 +16,14 @@ import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.utils.INattableModelManagerUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.nattable.menu.util.TableMenuUtils;
-import org.eclipse.papyrus.uml.service.types.handlers.AbstractUmlCreateCommandHandler;
+import org.eclipse.papyrus.uml.service.types.handlers.AbstractUmlCreateElementCommandHandler;
import org.eclipse.papyrus.uml.service.types.utils.ICommandContext;
/**
* Abstract handler for the creation commands of UML elements in the Nattable editor
*
*/
-public abstract class AbstractUmlNattableCreateCommandHandler extends AbstractUmlCreateCommandHandler {
+public abstract class AbstractUmlNattableCreateCommandHandler extends AbstractUmlCreateElementCommandHandler {
/**
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/util/TableMenuUtils.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/util/TableMenuUtils.java
index 3e336928152..96ebb43678c 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/util/TableMenuUtils.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu/src/org/eclipse/papyrus/uml/nattable/menu/util/TableMenuUtils.java
@@ -149,6 +149,9 @@ public class TableMenuUtils {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ //see 469376: [Table] Memory Leak : (Tree)NattableWidgetManager, EObjectTreeItemAxis and others objects are not disposed when the table is closed
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=469376
+ final INattableModelManager nattableModelManager = INattableModelManagerUtils.getTableManagerFromWorkbenchPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart());
EObject newElement = createElementRequest.getNewElement();
Collection<Object> toAdd = new ArrayList<Object>();
toAdd.add(newElement);

Back to the top