TMF: Add initialization method in xy line chart
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Thu, 26 Jun 2014 19:27:00 +0000 (15:27 -0400)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Mon, 7 Jul 2014 15:32:37 +0000 (11:32 -0400)
This allows to reinitialize the data even though the trace is already loaded.
It is to match the TimeGraphView's rebuild() method, so that XML defined XY
chart can be used with more than one view element.

Change-Id: Ib0573ea210bdd7ffb1c6dc550afb2cd021bd16d0
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/29080
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Hudson CI
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/xycharts/linecharts/TmfCommonXLineChartViewer.java

index 755b8298e54fe54608d892ae8cebef65b308bdf7..16b2e5a978779009761c5e73934f6aa0668ce7e6 100644 (file)
@@ -95,6 +95,16 @@ public abstract class TmfCommonXLineChartViewer extends TmfXYChartViewer {
     @Override
     public void loadTrace(ITmfTrace trace) {
         super.loadTrace(trace);
+        reinitialize();
+    }
+
+    /**
+     * Forces a reinitialization of the data sources, even if it has already
+     * been initialized for this trace before
+     *
+     * @since 3.1
+     */
+    protected void reinitialize() {
         fSeriesValues.clear();
         Thread thread = new Thread() {
             @Override
This page took 0.025401 seconds and 5 git commands to generate.