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 *******************************************************************************/
9 package org
.eclipse
.tracecompass
.internal
.tmf
.analysis
.xml
.ui
.views
.latency
;
11 import org
.eclipse
.jdt
.annotation
.NonNull
;
12 import org
.eclipse
.jdt
.annotation
.Nullable
;
13 import org
.eclipse
.swt
.widgets
.Composite
;
14 import org
.eclipse
.tracecompass
.analysis
.timing
.core
.segmentstore
.ISegmentStoreProvider
;
15 import org
.eclipse
.tracecompass
.analysis
.timing
.ui
.views
.segmentstore
.density
.AbstractSegmentStoreDensityViewer
;
16 import org
.eclipse
.tracecompass
.internal
.tmf
.analysis
.xml
.core
.pattern
.stateprovider
.XmlPatternAnalysis
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.TmfTraceManager
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.TmfTraceUtils
;
22 * Displays the latency analysis data in a density chart
24 * @author Jean-Christian Kouame
26 public class PatternDensityViewer
extends AbstractSegmentStoreDensityViewer
{
28 private String fAnalysisId
;
34 * The parent composite
36 public PatternDensityViewer(@NonNull Composite parent
) {
41 protected @Nullable ISegmentStoreProvider
getSegmentStoreProvider(@NonNull ITmfTrace trace
) {
42 return fAnalysisId
!= null ? TmfTraceUtils
.getAnalysisModuleOfClass(trace
, XmlPatternAnalysis
.class, fAnalysisId
) : null;
46 * Set the analysis ID and update the view
51 public void updateViewer(String analysisId
) {
52 if (analysisId
!= null) {
53 fAnalysisId
= analysisId
;
54 final ITmfTrace trace
= TmfTraceManager
.getInstance().getActiveTrace();