tmf: Use tabs in statistics view for each traces
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.core.tests / src / org / eclipse / linuxtools / lttng / core / tests / headless / TmfTraceTest.java
index 3adf86480b4bcbc9d2eace56e58f958d0c7755da..a862d076ba6916763d92ca9d9210d9b2fdbaa321 100644 (file)
@@ -1,12 +1,12 @@
 package org.eclipse.linuxtools.lttng.core.tests.headless;
 /*******************************************************************************
  * Copyright (c) 2009 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:
  *   William Bourque (wbourque@gmail.com) - Initial API and implementation
  *******************************************************************************/
@@ -14,6 +14,7 @@ package org.eclipse.linuxtools.lttng.core.tests.headless;
 import org.eclipse.linuxtools.internal.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.internal.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.internal.lttng.core.trace.LTTngTrace;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
@@ -21,11 +22,10 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 
 @SuppressWarnings("nls")
-public class TmfTraceTest extends TmfEventRequest<LttngEvent> {
+public class TmfTraceTest extends TmfEventRequest {
 
-    @SuppressWarnings("unchecked")
     public TmfTraceTest(final Class<? extends TmfEvent> dataType, final TmfTimeRange range, final int nbRequested) {
-        super((Class<LttngEvent>)dataType, range, nbRequested, 1);
+        super(dataType, range, nbRequested, 1);
     }
 
 
@@ -43,19 +43,17 @@ public class TmfTraceTest extends TmfEventRequest<LttngEvent> {
     // Work variables
     public static int nbEvent = 0;
     public static int nbPassDone = 0;
-    public static TmfExperiment<LttngEvent> fExperiment = null;
+    public static TmfExperiment fExperiment = null;
 
 
     public static void main(final String[] args) {
 
         try {
             // OUr experiment will contains ONE trace
-            @SuppressWarnings("unchecked")
-            final
-            ITmfTrace<LttngEvent>[] traces = new ITmfTrace[1];
+            final ITmfTrace[] traces = new ITmfTrace[1];
             traces[0] = new LTTngTrace(null, TRACE_PATH);
             // Create our new experiment
-            fExperiment = new TmfExperiment<LttngEvent>(LttngEvent.class, "Headless", traces);
+            fExperiment = new TmfExperiment(LttngEvent.class, "Headless", traces);
 
 
             // Create a new time range from -infinity to +infinity
@@ -85,7 +83,7 @@ public class TmfTraceTest extends TmfEventRequest<LttngEvent> {
     }
 
     @Override
-    public void handleData(final LttngEvent event) {
+    public void handleData(final ITmfEvent event) {
         super.handleData(event);
         if ( (event != null) && (PARSE_EVENTS) ) {
             event.getContent().getFields();
@@ -102,13 +100,14 @@ public class TmfTraceTest extends TmfEventRequest<LttngEvent> {
 
     @Override
     public void handleCompleted() {
-        if ( nbPassDone >= NB_OF_PASS )
+        if ( nbPassDone >= NB_OF_PASS ) {
             try {
                 System.out.println("Nb events : " + nbEvent);
 
                 fExperiment.sendRequest(null);
             }
         catch (final Exception e) {}
+        }
     }
 
     @Override
This page took 0.027514 seconds and 5 git commands to generate.