tmf: Make TmfEventFieldAspect independent of event content
[deliverable/tracecompass.git] / org.eclipse.tracecompass.gdbtrace.core / src / org / eclipse / tracecompass / internal / gdbtrace / core / trace / GdbEventAspects.java
index c9cb799b9757459f6adcc1331023bc4adb833e22..a61ecee77406c50745653b2cc610b94ea57d1a8a 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.tracecompass.internal.gdbtrace.core.event.GdbTraceEvent;
 import org.eclipse.tracecompass.internal.gdbtrace.core.event.GdbTraceEventContent;
 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
 import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.event.aspect.TmfEventFieldAspect;
+import org.eclipse.tracecompass.tmf.core.event.aspect.TmfContentFieldAspect;
 
 import com.google.common.collect.ImmutableList;
 
@@ -34,25 +34,11 @@ public final class GdbEventAspects {
 
     private static final @NonNull Iterable<ITmfEventAspect> GDB_ASPECTS =
             checkNotNull(ImmutableList.of(
-                    new GdbTraceFrameAspect(),
-                    new GdbTracepointAspect(),
+                    new TmfContentFieldAspect(GdbTraceEventContent.TRACE_FRAME, GdbTraceEventContent.TRACE_FRAME),
+                    new TmfContentFieldAspect(GdbTraceEventContent.TRACEPOINT, GdbTraceEventContent.TRACEPOINT),
                     new GdbFileAspect()
                     ));
 
-    private static class GdbTraceFrameAspect extends TmfEventFieldAspect {
-        public GdbTraceFrameAspect() {
-            super(GdbTraceEventContent.TRACE_FRAME,
-                    GdbTraceEventContent.TRACE_FRAME);
-        }
-    }
-
-    private static class GdbTracepointAspect extends TmfEventFieldAspect {
-        public GdbTracepointAspect() {
-            super(GdbTraceEventContent.TRACEPOINT,
-                    GdbTraceEventContent.TRACEPOINT);
-        }
-    }
-
     private static class GdbFileAspect implements ITmfEventAspect {
 
         @Override
This page took 0.024287 seconds and 5 git commands to generate.