tmf: Don't use ITmfEventField in TmfEventsTable
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / parsers / custom / CustomEventsTable.java
index 506badaa853de6916ce82a26a700a7bc983f60a3..6875715a66cc2eb264c69497f3a9cb378c9de12f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 Ericsson
+ * Copyright (c) 2010, 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
@@ -15,9 +15,10 @@ package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom;
 import java.util.LinkedList;
 import java.util.List;
 
-import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
+import org.eclipse.linuxtools.tmf.core.parsers.custom.CustomEvent;
+import org.eclipse.linuxtools.tmf.core.parsers.custom.CustomTraceDefinition;
+import org.eclipse.linuxtools.tmf.core.parsers.custom.CustomTraceDefinition.OutputColumn;
 import org.eclipse.linuxtools.tmf.ui.viewers.events.TmfEventsTable;
 import org.eclipse.linuxtools.tmf.ui.widgets.virtualtable.ColumnData;
 import org.eclipse.swt.SWT;
@@ -55,7 +56,7 @@ public class CustomEventsTable extends TmfEventsTable {
         if (fDefinition == null) {
             return;
         }
-        List<ColumnData> columnData = new LinkedList<ColumnData>();
+        List<ColumnData> columnData = new LinkedList<>();
         for (OutputColumn outputColumn : fDefinition.outputs) {
             ColumnData column = new ColumnData(outputColumn.name, 0, SWT.LEFT);
             columnData.add(column);
@@ -64,15 +65,10 @@ public class CustomEventsTable extends TmfEventsTable {
     }
 
     @Override
-    public TmfEventField[] extractItemFields(ITmfEvent event) {
+    public String[] getItemStrings(ITmfEvent event) {
         if (event instanceof CustomEvent) {
-            TmfEventField[] fields = ((CustomEvent) event).extractItemFields();
-//            String[] labels = new String[fields.length];
-//            for (int i = 0; i < fields.length; i++) {
-//                labels[i] = (String) fields[i].getValue();
-//            }
-            return fields;
+            return ((CustomEvent) event).getEventStrings();
         }
-        return new TmfEventField[0];
+        return EMPTY_STRING_ARRAY;
     }
 }
This page took 0.035575 seconds and 5 git commands to generate.