1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 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 * Bernd Hufmann - Add Content aspect
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.trace
;
16 import org
.eclipse
.jdt
.annotation
.NonNull
;
17 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEvent
;
18 import org
.eclipse
.tracecompass
.internal
.gdbtrace
.core
.event
.GdbTraceEventContent
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
.TmfBaseAspects
;
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
=
37 new TmfContentFieldAspect(GdbTraceEventContent
.TRACE_FRAME
, GdbTraceEventContent
.TRACE_FRAME
),
38 new TmfContentFieldAspect(GdbTraceEventContent
.TRACEPOINT
, GdbTraceEventContent
.TRACEPOINT
),
40 TmfBaseAspects
.getContentsAspect()
43 private static class GdbFileAspect
implements ITmfEventAspect
<String
> {
46 public String
getName() {
47 return "File"; //$NON-NLS-1$
51 public String
getHelpText() {
56 public String
resolve(ITmfEvent event
) {
57 if (!(event
instanceof GdbTraceEvent
)) {
60 String ret
= ((GdbTraceEvent
) event
).getReference();
61 return (ret
== null ? EMPTY_STRING
: ret
);
66 * Get the event aspects specific to GDB traces.
68 * @return The set of aspects
70 public static @NonNull Iterable
<ITmfEventAspect
<?
>> getAspects() {
This page took 0.031605 seconds and 5 git commands to generate.