import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent;
import org.eclipse.tracecompass.tmf.ui.viewers.events.columns.ITmfEventTableColumns;
import org.eclipse.tracecompass.tmf.ui.viewers.events.columns.TmfEventTableColumn;
@SuppressWarnings("null")
private static final @NonNull Collection<TmfEventTableColumn> LTTNG_COLUMNS =
ImmutableList.<TmfEventTableColumn> of(
- TmfEventTableColumn.BaseColumns.TIMESTAMP,
- new LttngChannelColumn(),
- TmfEventTableColumn.BaseColumns.EVENT_TYPE,
- TmfEventTableColumn.BaseColumns.CONTENTS);
+ new TmfEventTableColumn(ITmfEventAspect.BaseAspects.TIMESTAMP),
+ new TmfEventTableColumn(new LttngChannelAspect()),
+ new TmfEventTableColumn(ITmfEventAspect.BaseAspects.EVENT_TYPE),
+ new TmfEventTableColumn(ITmfEventAspect.BaseAspects.CONTENTS));
- private static class LttngChannelColumn extends TmfEventTableColumn {
+ private static class LttngChannelAspect implements ITmfEventAspect {
- public LttngChannelColumn() {
- super(CHANNEL_HEADER);
+ @Override
+ public String getName() {
+ return CHANNEL_HEADER;
+ }
+
+ @Override
+ public String getHelpText() {
+ return EMPTY_STRING;
}
@Override
- public String getItemString(ITmfEvent event) {
+ public String resolve(ITmfEvent event) {
if (!(event instanceof CtfTmfEvent)) {
return EMPTY_STRING;
}
}
@Override
- public String getFilterFieldId() {
+ public String getFilterId() {
return ITmfEvent.EVENT_FIELD_REFERENCE;
}
}