callstack: Update with latest Trace Compass

The ThreadStatusDataProvider now returns models of type
TimeGraphEntryModel.

Change-Id: Id92fca04e6dc59dfdf062113c5ec548feb3b8ac5
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/156817
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
index 639c410..04bbe86 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
@@ -67,6 +67,7 @@
 import org.eclipse.tracecompass.tmf.core.model.timegraph.ITimeGraphState;
 import org.eclipse.tracecompass.tmf.core.model.timegraph.ITimeGraphStateFilter;
 import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphArrow;
+import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphEntryModel;
 import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphModel;
 import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphRowModel;
 import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphState;
@@ -160,12 +161,16 @@
     private static class ThreadData {
 
         private final ThreadStatusDataProvider fThreadDataProvider;
-        private final List<ThreadEntryModel> fThreadTree;
+        private final List<ThreadEntryModel> fThreadTree = new ArrayList<>();
         private final Status fStatus;
 
-        public ThreadData(ThreadStatusDataProvider dataProvider, List<ThreadEntryModel> threadTree, Status status) {
+        public ThreadData(ThreadStatusDataProvider dataProvider, List<TimeGraphEntryModel> threadTree, Status status) {
             fThreadDataProvider = dataProvider;
-            fThreadTree = threadTree;
+            for (TimeGraphEntryModel model : threadTree) {
+                if (model instanceof ThreadEntryModel) {
+                    fThreadTree.add((ThreadEntryModel) model);
+                }
+            }
             fStatus = status;
         }
 
@@ -466,8 +471,8 @@
             ThreadStatusDataProvider dataProvider = DataProviderManager.getInstance().getDataProvider(trace, ThreadStatusDataProvider.ID, ThreadStatusDataProvider.class);
             if (dataProvider != null) {
                 // Get the tree for the trace's current range
-                TmfModelResponse<TmfTreeModel<ThreadEntryModel>> threadTreeResp = dataProvider.fetchTree(FetchParametersUtils.timeQueryToMap(new TimeQueryFilter(start, Long.MAX_VALUE, 2)), monitor);
-                TmfTreeModel<ThreadEntryModel> threadTree = threadTreeResp.getModel();
+                TmfModelResponse<TmfTreeModel<TimeGraphEntryModel>> threadTreeResp = dataProvider.fetchTree(FetchParametersUtils.timeQueryToMap(new TimeQueryFilter(start, Long.MAX_VALUE, 2)), monitor);
+                TmfTreeModel<TimeGraphEntryModel> threadTree = threadTreeResp.getModel();
                 if (threadTree != null) {
                     fThreadData = new ThreadData(dataProvider, threadTree.getEntries(), threadTreeResp.getStatus());
                     break;