1 /*******************************************************************************
2 * Copyright (c) 2016 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.analysis
.timing
.ui
.callgraph
;
12 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
13 import org
.eclipse
.core
.runtime
.IStatus
;
14 import org
.eclipse
.core
.runtime
.Status
;
15 import org
.eclipse
.core
.runtime
.jobs
.Job
;
16 import org
.eclipse
.jdt
.annotation
.NonNull
;
17 import org
.eclipse
.jdt
.annotation
.Nullable
;
18 import org
.eclipse
.jface
.viewers
.TableViewer
;
19 import org
.eclipse
.tracecompass
.analysis
.timing
.core
.segmentstore
.ISegmentStoreProvider
;
20 import org
.eclipse
.tracecompass
.analysis
.timing
.ui
.views
.segmentstore
.table
.AbstractSegmentStoreTableViewer
;
21 import org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
;
22 import org
.eclipse
.tracecompass
.internal
.analysis
.timing
.core
.callgraph
.CallGraphAnalysis
;
23 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
24 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.TmfTraceUtils
;
27 * Displays the Call Stack data in a column table
29 * @author Sonia Farrah
31 public class CallGraphTableViewer
extends AbstractSegmentStoreTableViewer
{
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
43 public CallGraphTableViewer(@NonNull TableViewer tableViewer
) {
47 // ------------------------------------------------------------------------
49 // ------------------------------------------------------------------------
52 protected @Nullable ISegmentStoreProvider
getSegmentStoreProvider(@NonNull ITmfTrace trace
) {
53 CallGraphAnalysis fModule
= TmfTraceUtils
.getAnalysisModuleOfClass(trace
, CallGraphAnalysis
.class, CallGraphAnalysis
.ID
);
54 if (fModule
== null) {
58 Job job
= new Job(Messages
.CallGraphAnalysis
) {
61 protected IStatus
run(IProgressMonitor monitor
) {
62 fModule
.waitForCompletion(NonNullUtils
.checkNotNull(monitor
));
63 if (monitor
.isCanceled()) {
64 return Status
.CANCEL_STATUS
;
66 return Status
.OK_STATUS
;