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
.linuxtools
.internal
.gdbtrace
.ui
.views
.events
;
15 import java
.util
.Collection
;
17 import org
.eclipse
.jdt
.annotation
.NonNull
;
18 import org
.eclipse
.linuxtools
.internal
.gdbtrace
.core
.event
.GdbTraceEventContent
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
20 import org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.events
.columns
.ITmfEventTableColumns
;
21 import org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.events
.columns
.TmfEventTableColumn
;
22 import org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.events
.columns
.TmfEventTableFieldColumn
;
24 import com
.google
.common
.collect
.ImmutableList
;
27 * Event table column definition for GDB traces.
29 * @author Alexandre Montplaisir
31 public class GdbEventTableColumns
implements ITmfEventTableColumns
{
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
37 @SuppressWarnings("null")
38 static final @NonNull Collection
<TmfEventTableColumn
> GDB_COLUMNS
= ImmutableList
.of(
39 new GdbTraceFrameColumn(),
40 new GdbTracepointColumn(),
44 private static class GdbTraceFrameColumn
extends TmfEventTableFieldColumn
{
45 public GdbTraceFrameColumn() {
46 super(GdbTraceEventContent
.TRACE_FRAME
);
50 private static class GdbTracepointColumn
extends TmfEventTableFieldColumn
{
51 public GdbTracepointColumn() {
52 super(GdbTraceEventContent
.TRACEPOINT
);
56 private static class GdbFileColumn
extends TmfEventTableColumn
{
58 public GdbFileColumn() {
59 super("File"); //$NON-NLS-1$
63 public String
getItemString(ITmfEvent event
) {
64 String ret
= event
.getReference();
65 return (ret
== null ? EMPTY_STRING
: ret
);
69 public String
getFilterFieldId() {
70 return ITmfEvent
.EVENT_FIELD_REFERENCE
;
74 // ------------------------------------------------------------------------
75 // ITmfEventTableColumns
76 // ------------------------------------------------------------------------
79 public Collection
<?
extends TmfEventTableColumn
> getEventTableColumns() {
This page took 0.033827 seconds and 5 git commands to generate.