1 /*******************************************************************************
2 * Copyright (c) 2014 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
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.gdbtrace
.ui
.views
.events
;
15 import java
.util
.Collection
;
17 import org
.eclipse
.jdt
.annotation
.NonNull
;
18 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEvent
;
19 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEventContent
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
21 import org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
.ITmfEventAspect
;
22 import org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
.TmfEventFieldAspect
;
23 import org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.events
.columns
.ITmfEventTableColumns
;
24 import org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.events
.columns
.TmfEventTableColumn
;
26 import com
.google
.common
.collect
.ImmutableList
;
29 * Event table column definition for GDB traces.
31 * @author Alexandre Montplaisir
33 public class GdbEventTableColumns
implements ITmfEventTableColumns
{
35 // ------------------------------------------------------------------------
37 // ------------------------------------------------------------------------
39 @SuppressWarnings("null")
40 static final @NonNull Collection
<TmfEventTableColumn
> GDB_COLUMNS
= ImmutableList
.of(
41 new TmfEventTableColumn(new GdbTraceFrameAspect()),
42 new TmfEventTableColumn(new GdbTracepointAspect()),
43 new TmfEventTableColumn(new GdbFileAspect())
46 private static class GdbTraceFrameAspect
extends TmfEventFieldAspect
{
47 public GdbTraceFrameAspect() {
48 super(GdbTraceEventContent
.TRACE_FRAME
,
49 GdbTraceEventContent
.TRACE_FRAME
);
53 private static class GdbTracepointAspect
extends TmfEventFieldAspect
{
54 public GdbTracepointAspect() {
55 super(GdbTraceEventContent
.TRACEPOINT
,
56 GdbTraceEventContent
.TRACEPOINT
);
60 private static class GdbFileAspect
implements ITmfEventAspect
{
63 public String
getName() {
64 return "File"; //$NON-NLS-1$
68 public String
getHelpText() {
73 public String
resolve(ITmfEvent event
) {
74 if (!(event
instanceof GdbTraceEvent
)) {
77 String ret
= ((GdbTraceEvent
) event
).getReference();
78 return (ret
== null ? EMPTY_STRING
: ret
);
82 public String
getFilterId() {
83 return ITmfEvent
.EVENT_FIELD_REFERENCE
;
87 // ------------------------------------------------------------------------
88 // ITmfEventTableColumns
89 // ------------------------------------------------------------------------
92 public Collection
<?
extends TmfEventTableColumn
> getEventTableColumns() {
This page took 0.078842 seconds and 5 git commands to generate.