tmf: Remove the ITmfEventTableColumns extension point
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.pcap.core / src / org / eclipse / tracecompass / internal / tmf / pcap / core / event / aspect / PcapReferenceAspect.java
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Vincent Perot - Initial API and implementation
11 * Alexandre Montplaisir - Update to new ITmfEventAspect API
12 *******************************************************************************/
13
14 package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
15
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
18 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
19 import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
20
21 /**
22 * The "packet reference" aspect for pcap events
23 *
24 * @author Alexandre Montplaisir
25 */
26 public class PcapReferenceAspect implements ITmfEventAspect {
27
28 @Override
29 public String getName() {
30 return Messages.getMessage(Messages.PcapAspectName_Reference);
31 }
32
33 @Override
34 public String getHelpText() {
35 return EMPTY_STRING;
36 }
37
38 @Override
39 public String resolve(ITmfEvent event) {
40 if (!(event instanceof PcapEvent)) {
41 return EMPTY_STRING;
42 }
43 return ((PcapEvent) event).getReference();
44 }
45
46 @Override
47 public @Nullable String getFilterId() {
48 return ITmfEvent.EVENT_FIELD_REFERENCE;
49 }
50 }
This page took 0.042571 seconds and 5 git commands to generate.