tmf: Introduce the core concept of event aspects
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.kernel.ui / src / org / eclipse / tracecompass / internal / lttng2 / kernel / ui / viewers / events / LttngEventTableColumns.java
index 2528b87b8110eb5766abf7fcf7e9b94d99caca3f..f9e016823b52475d22adfa9db86e98e080df88cc 100644 (file)
@@ -16,6 +16,7 @@ import java.util.Collection;
 
 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;
@@ -37,19 +38,25 @@ public class LttngEventTableColumns implements ITmfEventTableColumns {
     @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;
             }
@@ -58,7 +65,7 @@ public class LttngEventTableColumns implements ITmfEventTableColumns {
         }
 
         @Override
-        public String getFilterFieldId() {
+        public String getFilterId() {
             return ITmfEvent.EVENT_FIELD_REFERENCE;
         }
     }
This page took 0.025668 seconds and 5 git commands to generate.