summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2013-03-01 05:38:00 (EST)
committer Sven Rottstock2013-03-01 05:38:00 (EST)
commitc02add3c6a55926ac9653b96be441ee2b06b8d36 (patch)
tree4c8a5017552db9df56316d2bded97482b9760f58
parent9f3f942815f25d8fb871cd742ce0a3732b59e294 (diff)
downloadorg.eclipse.stardust.ide-c02add3c6a55926ac9653b96be441ee2b06b8d36.zip
org.eclipse.stardust.ide-c02add3c6a55926ac9653b96be441ee2b06b8d36.tar.gz
org.eclipse.stardust.ide-c02add3c6a55926ac9653b96be441ee2b06b8d36.tar.bz2
Jira-ID: CRNT-25959
Memory leak in modeller git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@63383 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditor.java53
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditorOutlinePage.java13
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditor.java12
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java20
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ForwardDeleteAction.java1
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/tree/ModelTreeEditPart.java7
7 files changed, 14 insertions, 98 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditor.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditor.java
index 1fd50b1..3a785b2 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditor.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditor.java
@@ -19,33 +19,20 @@ import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gef.DefaultEditDomain;
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.KeyStroke;
-import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.*;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.commands.CommandStackListener;
import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
import org.eclipse.gef.editparts.ScalableRootEditPart;
import org.eclipse.gef.editparts.ZoomManager;
-import org.eclipse.gef.ui.actions.ActionRegistry;
-import org.eclipse.gef.ui.actions.AlignmentAction;
-import org.eclipse.gef.ui.actions.DirectEditAction;
-import org.eclipse.gef.ui.actions.EditorPartAction;
-import org.eclipse.gef.ui.actions.GEFActionConstants;
-import org.eclipse.gef.ui.actions.RedoAction;
-import org.eclipse.gef.ui.actions.SaveAction;
-import org.eclipse.gef.ui.actions.SelectionAction;
-import org.eclipse.gef.ui.actions.StackAction;
-import org.eclipse.gef.ui.actions.UndoAction;
-import org.eclipse.gef.ui.actions.UpdateAction;
-import org.eclipse.gef.ui.actions.ZoomInAction;
-import org.eclipse.gef.ui.actions.ZoomOutAction;
+import org.eclipse.gef.ui.actions.*;
import org.eclipse.gef.ui.parts.SelectionSynchronizer;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.stardust.common.CollectionUtils;
+import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.*;
+import org.eclipse.stardust.modeling.core.editors.parts.properties.UndoablePropSheetEntry;
+import org.eclipse.stardust.modeling.core.utils.FileEditorInputTracker;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
@@ -58,26 +45,6 @@ import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.stardust.common.CollectionUtils;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.AlignmentSnapToGridAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.CleanupModelAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.CopySymbolAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.CreateSubprocessFromSelectionAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.CutAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.DeleteAllAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.DiagramPrintAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.DistributeAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.GroupSymbolsAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.PasteSymbolAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.SetDefaultSizeAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.ShowInDiagramAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.ShowInOutlineAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.ShrinkToFitAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.SnapToGridAction;
-import org.eclipse.stardust.modeling.core.editors.parts.diagram.actions.UngroupSymbolsAction;
-import org.eclipse.stardust.modeling.core.editors.parts.properties.UndoablePropSheetEntry;
-import org.eclipse.stardust.modeling.core.utils.FileEditorInputTracker;
-
public abstract class AbstractMultiPageGraphicalEditor extends MultiPageEditorPart
implements IAdaptable
{
@@ -454,13 +421,7 @@ public abstract class AbstractMultiPageGraphicalEditor extends MultiPageEditorPa
// disposy the ActionRegistry (will unbind all actions)
getActionRegistry().dispose();
- //actionRegistry = null;
- editorInputTracker = null;
- if (outlinePage != null)
- {
- outlinePage.dispose();
- outlinePage = null;
- }
+
// important: always call super implementation of unbind
super.dispose();
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditorOutlinePage.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditorOutlinePage.java
index b011b38..b7d1d84 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditorOutlinePage.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/AbstractMultiPageGraphicalEditorOutlinePage.java
@@ -218,21 +218,8 @@ public abstract class AbstractMultiPageGraphicalEditorOutlinePage
getCanvas().removeDisposeListener(disposeListener);
}
- if (outlineTreeEditor != null)
- {
- outlineTreeEditor.dispose();
- outlineTreeEditor = null;
- }
-
editor.resetOutlinePage();
- /*if (actionRegistry != null)
- {
- actionRegistry.dispose();
- actionRegistry = null;
- }*/
-
-
super.dispose();
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditor.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditor.java
index d6ac77e..e4a3188 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditor.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditor.java
@@ -83,6 +83,7 @@ import org.eclipse.stardust.model.xpdl.carnot.DiagramType;
import org.eclipse.stardust.model.xpdl.carnot.EndEventSymbol;
import org.eclipse.stardust.model.xpdl.carnot.IGraphicalObject;
import org.eclipse.stardust.model.xpdl.carnot.IIdentifiableModelElement;
+import org.eclipse.stardust.model.xpdl.carnot.IModelElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelElementNodeSymbol;
import org.eclipse.stardust.model.xpdl.carnot.INodeSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
@@ -182,12 +183,12 @@ public class WorkflowModelEditor extends AbstractMultiPageGraphicalEditor
private ModelServer modelServer;
- private ValidationIssueManager validationIssueManager = new ValidationIssueManager();
+ private final ValidationIssueManager validationIssueManager = new ValidationIssueManager();
- private ModelResourceIssueSynchronizer issueSynchronizer = new ModelResourceIssueSynchronizer(
+ private final ModelResourceIssueSynchronizer issueSynchronizer = new ModelResourceIssueSynchronizer(
validationIssueManager);
- private EditorChangeTracker editorChangeTracker = new EditorChangeTracker();
+ private final EditorChangeTracker editorChangeTracker = new EditorChangeTracker();
public EditorChangeTracker getEditorChangeTracker()
{
@@ -249,11 +250,6 @@ public class WorkflowModelEditor extends AbstractMultiPageGraphicalEditor
modelServer.dispose();
}
variableContextHelper.removeContext(this.getWorkflowModel());
- validationIssueManager = null;
- issueSynchronizer = null;
- cwmModel = null;
- modelManager = null;
- editorChangeTracker = null;
super.dispose();
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
index 9fc9460..7beb89b 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/WorkflowModelEditorContextMenuProvider.java
@@ -101,10 +101,9 @@ import org.eclipse.stardust.modeling.repository.common.IObjectDescriptor;
import org.eclipse.stardust.modeling.repository.common.ObjectRepositoryActivator;
public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider {
+ private final ActionRegistry registry;
- private ActionRegistry registry;
-
- private ActionRegistry localRegistry;
+ private final ActionRegistry localRegistry;
private WorkflowModelEditor editor;
@@ -1084,19 +1083,4 @@ public class WorkflowModelEditorContextMenuProvider extends ContextMenuProvider
command.execute();
}
}
-
- public void dispose()
- {
- if (registry != null)
- {
- registry.dispose();
- registry = null;
- }
- if (localRegistry != null)
- {
- localRegistry.dispose();
- localRegistry = null;
- }
- super.dispose();
- }
} \ No newline at end of file
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
index b829ab8..d9a36e9 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/CreateApplicationAction.java
@@ -50,12 +50,6 @@ public class CreateApplicationAction extends SelectionAction
private ApplicationType application;
- public void dispose()
- {
- this.setWorkbenchPart(null);
- super.dispose();
- }
-
public CreateApplicationAction(IConfigurationElement config, WorkflowModelEditor part)
{
super(part);
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ForwardDeleteAction.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ForwardDeleteAction.java
index 35db6d3..2d5a75f 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ForwardDeleteAction.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/diagram/actions/ForwardDeleteAction.java
@@ -26,6 +26,7 @@ public class ForwardDeleteAction extends SelectionAction
public void dispose()
{
+ registry = null;
super.dispose();
}
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/tree/ModelTreeEditPart.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/tree/ModelTreeEditPart.java
index c616cde..c42697e 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/tree/ModelTreeEditPart.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/editors/parts/tree/ModelTreeEditPart.java
@@ -47,13 +47,6 @@ import org.eclipse.ui.PartInitException;
public class ModelTreeEditPart extends AbstractEObjectTreeEditPart
{
- @Override
- protected void finalize() throws Throwable
- {
- // TODO Auto-generated method stub
- super.finalize();
- }
-
private static final CarnotWorkflowModelPackage PKG_CWM = CarnotWorkflowModelPackage.eINSTANCE;
private ChildCategoryNode.Spec catApplications;