summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathieu Denis2012-08-24 14:49:40 (EDT)
committer Alexandre Montplaisir2012-08-24 15:53:55 (EDT)
commitb5d37722eaad66a3d8289e683e553fabd68ba470 (patch)
tree4753e00cdc554e6332808b285321e44230fd48b9
parent72c1dc07536399270f28f69e3fccc07b869caa9a (diff)
downloadorg.eclipse.linuxtools-b5d37722eaad66a3d8289e683e553fabd68ba470.zip
org.eclipse.linuxtools-b5d37722eaad66a3d8289e683e553fabd68ba470.tar.gz
org.eclipse.linuxtools-b5d37722eaad66a3d8289e683e553fabd68ba470.tar.bz2
tmf: Dispose of the model in the statistics viewer
Fixes bug 388022 When a statistics view is disposed, it cleans the complete static model that may still be in used by another statistics view. It is useless to suppress the complete model in the view, since the viewers are the one responsible to delete their own data. Change-Id: I450b935cebf317c9afca24858aef41139bd055e3 Signed-off-by: Mathieu Denis <mathieu.denis@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/7407 Reviewed-by: Bernd Hufmann <bhufmann@gmail.com> IP-Clean: Bernd Hufmann <bhufmann@gmail.com> Tested-by: Bernd Hufmann <bhufmann@gmail.com> Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java2
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java3
2 files changed, 1 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java
index 40ba29a..7d59e73 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java
@@ -230,7 +230,7 @@ public class TmfStatisticsViewer extends TmfViewer {
cancelOngoingRequest(fRequestRange);
cancelOngoingRequest(fRequest);
- // Clean the model
+ // Clean the model for this viewer
TmfStatisticsTreeRootFactory.removeStatTreeRoot(getTreeID());
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
index ac2bda9..7d2e858 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
@@ -28,7 +28,6 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceType;
import org.eclipse.linuxtools.tmf.ui.viewers.ITmfViewer;
import org.eclipse.linuxtools.tmf.ui.viewers.statistics.TmfStatisticsViewer;
-import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTreeRootFactory;
import org.eclipse.linuxtools.tmf.ui.views.TmfView;
import org.eclipse.linuxtools.tmf.ui.widgets.tabsview.TmfViewerFolder;
import org.eclipse.swt.SWT;
@@ -193,8 +192,6 @@ public class TmfStatisticsView extends TmfView {
public void dispose() {
super.dispose();
fStatsViewers.dispose();
- // clean the model
- TmfStatisticsTreeRootFactory.removeAll();
}
/*