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 static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.checkNotNull
;
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
.TmfContentFieldAspect
;
24 import com
.google
.common
.collect
.ImmutableList
;
27 * Event table column definition for GDB traces.
29 * @author Alexandre Montplaisir
31 public final class GdbEventAspects
{
33 private GdbEventAspects() {}
35 private static final @NonNull Iterable
<ITmfEventAspect
> GDB_ASPECTS
=
36 checkNotNull(ImmutableList
.of(
37 new TmfContentFieldAspect(GdbTraceEventContent
.TRACE_FRAME
, GdbTraceEventContent
.TRACE_FRAME
),
38 new TmfContentFieldAspect(GdbTraceEventContent
.TRACEPOINT
, GdbTraceEventContent
.TRACEPOINT
),
42 private static class GdbFileAspect
implements ITmfEventAspect
{
45 public String
getName() {
46 return "File"; //$NON-NLS-1$
50 public String
getHelpText() {
55 public String
resolve(ITmfEvent event
) {
56 if (!(event
instanceof GdbTraceEvent
)) {
59 String ret
= ((GdbTraceEvent
) event
).getReference();
60 return (ret
== null ? EMPTY_STRING
: ret
);
65 * Get the event aspects specific to GDB traces.
67 * @return The set of aspects
69 public static @NonNull Iterable
<ITmfEventAspect
> getAspects() {
This page took 0.032587 seconds and 5 git commands to generate.