blob: a9c45971cc9aef073c52dd7378f2ec44c816ad77 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*******************************************************************************
* Copyright (c) 2014 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexandre Montplaisir - Initial API and implementation
******************************************************************************/
package org.eclipse.tracecompass.internal.tmf.ui.viewers.events.columns;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.internal.tmf.ui.Messages;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.ui.viewers.events.columns.TmfEventTableColumn;
/**
* Column for the event contents (fields)
*
* @author Alexandre Montplaisir
*/
public final class TmfContentsColumn extends TmfEventTableColumn {
@SuppressWarnings("null")
private static final @NonNull String HEADER = Messages.TmfEventsTable_ContentColumnHeader;
/**
* Constructor
*/
public TmfContentsColumn() {
super(HEADER);
}
@Override
public String getItemString(ITmfEvent event) {
String ret = event.getContent().toString();
return (ret == null ? EMPTY_STRING : ret);
}
@Override
public String getFilterFieldId() {
return ITmfEvent.EVENT_FIELD_CONTENT;
}
}
|