1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
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
.analysis
.timing
.ui
.views
.segmentstore
.table
;
12 import org
.eclipse
.jdt
.annotation
.Nullable
;
13 import org
.eclipse
.jface
.viewers
.TableViewer
;
14 import org
.eclipse
.tracecompass
.analysis
.timing
.core
.segmentstore
.ISegmentStoreProvider
;
15 import org
.eclipse
.tracecompass
.tmf
.core
.analysis
.IAnalysisModule
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
19 * Displays the segment store provider data in a column table
21 * @author Geneviève Bastien
24 public class SegmentStoreTableViewer
extends AbstractSegmentStoreTableViewer
{
26 private final String fAnalysisId
;
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
36 * Table viewer of the view
38 * The ID of the analysis this viewer is for
40 public SegmentStoreTableViewer(TableViewer tableViewer
, String analysisId
) {
42 fAnalysisId
= analysisId
;
46 protected @Nullable ISegmentStoreProvider
getSegmentStoreProvider(ITmfTrace trace
) {
47 IAnalysisModule module
= trace
.getAnalysisModule(fAnalysisId
);
48 if (!(module
instanceof ISegmentStoreProvider
)) {
51 return (ISegmentStoreProvider
) module
;