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
.core
.trace
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEvent
;
17 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEventContent
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
.ITmfEventAspect
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
.TmfEventFieldAspect
;
22 import com
.google
.common
.collect
.ImmutableList
;
25 * Event table column definition for GDB traces.
27 * @author Alexandre Montplaisir
29 public final class GdbEventAspects
{
31 private GdbEventAspects() {}
33 @SuppressWarnings("null")
34 private static final @NonNull Iterable
<ITmfEventAspect
> GDB_ASPECTS
= ImmutableList
.of(
35 new GdbTraceFrameAspect(),
36 new GdbTracepointAspect(),
40 private static class GdbTraceFrameAspect
extends TmfEventFieldAspect
{
41 public GdbTraceFrameAspect() {
42 super(GdbTraceEventContent
.TRACE_FRAME
,
43 GdbTraceEventContent
.TRACE_FRAME
);
47 private static class GdbTracepointAspect
extends TmfEventFieldAspect
{
48 public GdbTracepointAspect() {
49 super(GdbTraceEventContent
.TRACEPOINT
,
50 GdbTraceEventContent
.TRACEPOINT
);
54 private static class GdbFileAspect
implements ITmfEventAspect
{
57 public String
getName() {
58 return "File"; //$NON-NLS-1$
62 public String
getHelpText() {
67 public String
resolve(ITmfEvent event
) {
68 if (!(event
instanceof GdbTraceEvent
)) {
71 String ret
= ((GdbTraceEvent
) event
).getReference();
72 return (ret
== null ? EMPTY_STRING
: ret
);
76 public String
getFilterId() {
77 return ITmfEvent
.EVENT_FIELD_REFERENCE
;
82 * Get the event aspects specific to GDB traces.
84 * @return The set of aspects
86 public static Iterable
<ITmfEventAspect
> getAspects() {
This page took 0.034446 seconds and 5 git commands to generate.