Author: scabanovich
Date: 2007-10-17 13:36:19 -0400 (Wed, 17 Oct 2007)
New Revision: 4301
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
Log:
JBIDE-800
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2007-10-17
17:35:28 UTC (rev 4300)
+++
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2007-10-17
17:36:19 UTC (rev 4301)
@@ -272,11 +272,17 @@
protected void createOutputStream(OutputStream os) throws IOException {
}
+
+ protected DiagramContentOutlinePage outline;
public void dispose() {
getSite().getWorkbenchWindow().getPartService().removePartListener(
partListener);
partListener = null;
+ if(outline != null) {
+ outline.dispose();
+ outline = null;
+ }
super.dispose();
}
@@ -301,7 +307,8 @@
if (type == CommandStackInspectorPage.class)
return new CommandStackInspectorPage(getCommandStack());
if (type == IContentOutlinePage.class) {
- DiagramContentOutlinePage outline = new DiagramContentOutlinePage(
+ if(outline != null) return outline;
+ outline = new DiagramContentOutlinePage(
new TreeViewer());
outline.setGraphicalViewer(getGraphicalViewer());
outline.setSelectionSynchronizer(getSelectionSynchronizer());