Change type of event source from TmfEventSource to String
authorfrancois <fchouinard@gmail.com>
Wed, 8 Feb 2012 21:58:39 +0000 (16:58 -0500)
committerFrancois Chouinard <fchouinard@gmail.com>
Thu, 9 Feb 2012 18:58:43 +0000 (13:58 -0500)
32 files changed:
org.eclipse.linuxtools.lttng.core.tests/src/org/eclipse/linuxtools/lttng/core/tests/event/LttngEventTest.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/control/LttngSyntheticEventProvider.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngEvent.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngEventContent.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngEventSource.java [deleted file]
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngSyntheticEvent.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTextTrace.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/trace/LTTngTrace.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventContentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventSourceTest.java [deleted file]
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/stubs/trace/TmfEventParserStub.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfDataEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventContent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventSource.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfTraceEvent.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfBaseColumnDataProviderTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfBaseStatisticsDataTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTreeNodeTest.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfTreeContentProviderTest.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/tests/uml2sd/trace/TmfUml2SDTestTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomTxtTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/parsers/custom/CustomXmlTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java

index 4d90b3ba278158f353e00aaae4b7b786d593ba28..058c7c86a54e2f6aced293818fec833668435cd0 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.linuxtools.lttng.core.tests.LTTngCoreTestPlugin;
 import org.eclipse.linuxtools.lttng.core.trace.LTTngTextTrace;
 import org.eclipse.linuxtools.lttng.core.trace.LTTngTrace;
 import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
 import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
 
@@ -96,7 +95,7 @@ public class LttngEventTest extends TestCase {
                @SuppressWarnings("unused")
                LttngEvent                      testAnotherEvent = null;
         LttngTimestamp         testTime                = null;
-        TmfEventSource                 testSource              = null;
+        String                 testSource              = null;
         LttngEventType         testType                = null;
         LttngEventContent      testContent             = null;
         LttngEventReference testReference      = null;
@@ -110,7 +109,7 @@ public class LttngEventTest extends TestCase {
                        testMarkerFields = new String[1];
                 testEvent      = null;
                 testTime       = new LttngTimestamp(0L);
-                testSource     = new TmfEventSource("test");
+                testSource     = "test";
                 testType       = new LttngEventType("test", 0L, "test", 0, testMarkerFields);
                 testContent    = new LttngEventContent(testEvent);
                 testReference = new LttngEventReference("test", "test");
@@ -152,7 +151,7 @@ public class LttngEventTest extends TestCase {
        
        // These will test TMF functions but since we are expecting it to work...
        assertEquals("Timestamp not what expected!",eventTimestamp,testEvent.getTimestamp().getValue());
-       assertEquals("Source not what expected!",eventSource,testEvent.getSource().getSourceId());
+       assertEquals("Source not what expected!",eventSource,testEvent.getSource());
        assertEquals("Reference not what expected!",eventReference,((String)testEvent.getReference().toString()) );
        
        // These should be overridden functions
index 1ef07d10ee9b1c01e7615d35dd176377e4bb23ed..e5d495104b8487bc14fe0a60db8c20a5905db09e 100644 (file)
@@ -23,8 +23,8 @@ import org.eclipse.linuxtools.lttng.core.TraceDebug;
 import org.eclipse.linuxtools.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventType;
 import org.eclipse.linuxtools.lttng.core.event.LttngSyntheticEvent;
-import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.core.event.LttngSyntheticEvent.SequenceInd;
+import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.core.model.LTTngTreeNode;
 import org.eclipse.linuxtools.lttng.core.request.LttngBaseEventRequest;
 import org.eclipse.linuxtools.lttng.core.state.evProcessor.ITransEventProcessor;
@@ -32,7 +32,6 @@ import org.eclipse.linuxtools.lttng.core.state.evProcessor.state.StateEventToHan
 import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
 import org.eclipse.linuxtools.lttng.core.state.trace.IStateTraceManager;
 import org.eclipse.linuxtools.tmf.core.component.TmfEventProvider;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.experiment.TmfExperiment;
@@ -89,7 +88,7 @@ public class LttngSyntheticEventProvider extends TmfEventProvider<LttngSynthetic
 
                // prepare empty instance status indicators and allow them to travel via
                // the framework
-               TmfEventSource source = new TmfEventSource(this);
+               String source = this.toString();
                LttngEventType dtype = new LttngEventType();
                LttngTimestamp statusTimeStamp = new LttngTimestamp(
                                TmfTimestamp.Zero);
index 6967769f626cda43d90c15ab9039f6740939f285..4bac8608c5c78f1580bb23c2c84d04168bc18958 100644 (file)
@@ -2,7 +2,6 @@ package org.eclipse.linuxtools.lttng.core.event;
 
 import org.eclipse.linuxtools.lttng.jni.JniEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 
 /**
@@ -44,7 +43,7 @@ public class LttngEvent extends TmfEvent {
      * @see org.eclipse.linuxtools.lttng.core.event.LttngEventReference
      * @see org.eclipse.linuxtools.org.eclipse.linuxtools.lttng.jni.JniEvent
      */
-    public LttngEvent(TmfTrace<LttngEvent> parent, LttngTimestamp timestamp, TmfEventSource source, LttngEventType type, LttngEventContent content,
+    public LttngEvent(TmfTrace<LttngEvent> parent, LttngTimestamp timestamp, String source, LttngEventType type, LttngEventContent content,
             LttngEventReference reference, JniEvent lttEvent) {
         super(timestamp, source, type, reference);
 
@@ -64,7 +63,7 @@ public class LttngEvent extends TmfEvent {
         this(  
                        (TmfTrace<LttngEvent>) oldEvent.getTrace(),
                        (LttngTimestamp)oldEvent.getTimestamp(), 
-                       (TmfEventSource)oldEvent.getSource(), 
+                       oldEvent.getSource(), 
                        (LttngEventType)oldEvent.getType(), 
                        (LttngEventContent)oldEvent.getContent(), 
                        (LttngEventReference)oldEvent.getReference(), 
index a5cc04bca99c7f0d2a046babf74bca53f5d71bbb..3a38541928a664cf1067f582aa2f78cc3122bc0b 100644 (file)
@@ -226,7 +226,7 @@ public class LttngEventContent extends TmfEventContent {
         } else if (name.equals(LttngEventType.TIMESTAMP_LABEL) || name.equals(FIELD_ID_TIMESTAMP)) {
             return new Long(fParentEvent.getTimestamp().getValue()).toString();
         } else if (name.equals(FIELD_ID_SOURCE)) {
-            return fParentEvent.getSource().getSourceId().toString();
+            return fParentEvent.getSource();
         }
 
        // *** VERIFY ***
diff --git a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngEventSource.java b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/lttng/core/event/LttngEventSource.java
deleted file mode 100644 (file)
index dc04bb6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng.core.event;
-
-import org.eclipse.linuxtools.tmf.core.event.*;
-
-/**
- * <b><u>LttngEventSource</u></b><p>
- * 
- * Lttng specific implementation of the TmfEventSource
- */
-public class LttngEventSource extends TmfEventSource {
-    
-    /**
-     * Default Constructor.<p>
-     * 
-     */
-    public LttngEventSource() {
-        super();
-    }
-    
-    /**
-     * Copy Constructor.<p>
-     * 
-     * @param newSource  Source of the event as string.
-     */
-    public LttngEventSource(String newSource) {
-        super(newSource);
-    }
-    
-    
-    /**
-     * Copy Constructor.<p>
-     * 
-     * @param oldSource  LttngEventSource to copy from.
-     */
-    public LttngEventSource(LttngEventSource oldSource) {
-        this( (String)oldSource.getSourceId() );
-    }
-    
-    
-    @Override
-       public String getSourceId() {
-        return (String)fSourceId;
-    }
-    
-    public void setSourceId(String newSource) {
-        fSourceId = newSource;
-    }
-    
-    @Override
-       public String toString() {
-        return fSourceId.toString();
-    }
-
-       @Override
-       public LttngEventSource clone() {
-               LttngEventSource clone = (LttngEventSource) super.clone();
-               clone.fSourceId = new String((String) fSourceId);
-               return clone;
-       }
-}
index b68fc16c1037d4c2a5dfd1406646bd4d03bb140a..645549b0cffa4f5778cb14e719f688eb54fe17cd 100644 (file)
@@ -13,7 +13,6 @@ package org.eclipse.linuxtools.lttng.core.event;
 
 import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
 import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 
 /**
@@ -69,7 +68,7 @@ public class LttngSyntheticEvent extends LttngEvent {
         * @param lttEvent
         */
        public LttngSyntheticEvent(TmfTrace<LttngEvent> parent,
-                       LttngTimestamp timestamp, TmfEventSource source,
+                       LttngTimestamp timestamp, String source,
                        LttngEventType type, LttngEventContent content,
                        LttngEventReference reference, JniEvent lttEvent) {
                super(parent, timestamp, source, type, content, reference, lttEvent);
index 13e1a133d725a74eee0b0c06e7b4e827c46c1e4c..23fd49602b2dcff06df0b579ad75140b2a75327e 100644 (file)
@@ -21,7 +21,6 @@ import org.eclipse.linuxtools.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventContent;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventField;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventReference;
-import org.eclipse.linuxtools.lttng.core.event.LttngEventSource;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventType;
 import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.jni.JniEvent;
@@ -35,7 +34,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 
 public class LTTngTextTrace extends TmfTrace<LttngEvent> {
        private LttngTimestamp                  eventTimestamp   = null;
-    private LttngEventSource                eventSource      = null;
+    private String                          eventSource      = null;
     private LttngEventType                  eventType        = null;
     private TextLttngEventContent           eventContent     = null;
     private LttngEventReference             eventReference   = null;
@@ -64,7 +63,7 @@ public class LTTngTextTrace extends TmfTrace<LttngEvent> {
         traceTypes      = new HashMap<String, LttngEventType>();
         
         eventTimestamp        = new LttngTimestamp();
-        eventSource           = new LttngEventSource();
+        eventSource           = "";
         eventType             = new LttngEventType();
         eventContent          = new TextLttngEventContent(currentLttngEvent);
         eventReference        = new LttngEventReference(this.getName());
@@ -238,7 +237,7 @@ public class LTTngTextTrace extends TmfTrace<LttngEvent> {
                        }
                        
                        // EventSource is always the same for now :
-                       eventSource.setSourceId("Kernel Core"); //$NON-NLS-1$
+                       currentLttngEvent.setSource("Kernel Core"); //$NON-NLS-1$
                        
                        
                        // Tracefile and marker are first in the file
@@ -452,7 +451,7 @@ class TextLttngEvent extends LttngEvent {
        
        public TextLttngEvent(  TmfTrace<LttngEvent> parent,
                                                        LttngTimestamp timestamp, 
-                                                       LttngEventSource source, 
+                                                       String source, 
                                                        LttngEventType type, 
                                                        LttngEventContent content, 
                                                        LttngEventReference reference) 
@@ -465,7 +464,7 @@ class TextLttngEvent extends LttngEvent {
                this(
                        (TmfTrace<LttngEvent>) oldEvent.getTrace(),
                                (LttngTimestamp)oldEvent.getTimestamp(), 
-                               (LttngEventSource)oldEvent.getSource(), 
+                               oldEvent.getSource(), 
                                (LttngEventType)oldEvent.getType(), 
                                (LttngEventContent)oldEvent.getContent(), 
                                (LttngEventReference)oldEvent.getReference()
index 9fdf11281aa5a8e506f45f28f36e0e9ccabc2392..64390332c70873d273d3ce1320e59934a39630b5 100644 (file)
@@ -23,7 +23,6 @@ import org.eclipse.linuxtools.lttng.core.TraceHelper;
 import org.eclipse.linuxtools.lttng.core.event.LttngEvent;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventContent;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventReference;
-import org.eclipse.linuxtools.lttng.core.event.LttngEventSource;
 import org.eclipse.linuxtools.lttng.core.event.LttngEventType;
 import org.eclipse.linuxtools.lttng.core.event.LttngLocation;
 import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
@@ -71,7 +70,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
     private JniTrace currentJniTrace;
 
     LttngTimestamp eventTimestamp;
-    LttngEventSource eventSource;
+    String eventSource;
     LttngEventContent eventContent;
     LttngEventReference eventReference;
 
@@ -137,7 +136,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
 
         // Build the re-used event structure
         eventTimestamp = new LttngTimestamp();
-        eventSource = new LttngEventSource();
+        eventSource = "";
         this.eventType = new LttngEventType();
         eventContent = new LttngEventContent(currentLttngEvent);
         eventReference = new LttngEventReference(this.getName());
@@ -263,7 +262,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
 
             // Verify that all those "default constructor" are safe to use
             clone.eventTimestamp = new LttngTimestamp();
-            clone.eventSource = new LttngEventSource();
+            clone.eventSource = "";
             clone.eventType = new LttngEventType();
             clone.eventContent = new LttngEventContent(clone.currentLttngEvent);
             clone.eventReference = new LttngEventReference(this.getName());
@@ -844,7 +843,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
             // all allocation done in the LttngTrace constructor
             // ***
             eventTimestamp.setValue(jniEvent.getEventTime().getTime());
-            eventSource.setSourceId(jniEvent.requestEventSource());
+            eventSource = jniEvent.requestEventSource();
 
             eventType = traceTypes.get(EventTypeKey.getEventTypeHash(jniEvent));
 
@@ -884,7 +883,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
         // Allocating new memory is slow.
         // Parsing every events is very slow.
         eventTimestamp = new LttngTimestamp(jniEvent.getEventTime().getTime());
-        eventSource = new LttngEventSource(jniEvent.requestEventSource());
+        eventSource = jniEvent.requestEventSource();
         eventReference = new LttngEventReference(jniEvent.getParentTracefile().getTracefilePath(), this.getName());
         eventType = new LttngEventType(traceTypes.get(EventTypeKey.getEventTypeHash(jniEvent)));
         eventContent = new LttngEventContent(currentLttngEvent);
index c0401bf42a66a6a477968e29a844db47c9ff344c..95a935dd2a84e79ec185d4dfeb7edf74cdc23c21 100644 (file)
@@ -14,7 +14,6 @@ public class AllTests {
                suite.addTestSuite(TmfEventFieldTest.class);
                suite.addTestSuite(TmfEventContentTest.class);
                suite.addTestSuite(TmfEventTypeTest.class);
-               suite.addTestSuite(TmfEventSourceTest.class);
                suite.addTestSuite(TmfEventReferenceTest.class);
                suite.addTestSuite(TmfTimestampTest.class);
                suite.addTestSuite(TmfTimeRangeTest.class);
index 2253f0c377b47973490e2ab79a3fb95baa0f967f..1a5f07eb37ec415bccaad5f48b21ea01d8e736ce 100644 (file)
@@ -17,7 +17,6 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfNoSuchFieldException;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
@@ -37,7 +36,7 @@ public class TmfEventContentTest extends TestCase {
        // ------------------------------------------------------------------------
 
        private final TmfTimestamp      fTimestamp;
-       private final TmfEventSource    fEventSource;
+       private final String            fEventSource;
        private final TmfEventType      fEventType;
        private final TmfEventTypeStub  fEventTypeStub;
        private final TmfEventReference fReference;
@@ -62,7 +61,7 @@ public class TmfEventContentTest extends TestCase {
        public TmfEventContentTest(String name) {
                super(name);
                fTimestamp     = new TmfTimestamp();
-               fEventSource   = new TmfEventSource(new Object());
+               fEventSource   = "";
                fEventType     = new TmfEventType();
                fEventTypeStub = new TmfEventTypeStub();
                fReference     = new TmfEventReference();
index b746475743eab71a2d031331860f1024623596ea..b3f121e00b1473d22d7487baa76ba66c58d10216 100644 (file)
@@ -18,7 +18,6 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.stubs.event.TmfEventTypeStub;
@@ -55,7 +54,7 @@ public class TmfEventFieldTest extends TestCase {
        public TmfEventFieldTest(String name) {
                super(name);
                TmfTimestamp      fTimestamp   = new TmfTimestamp();
-               TmfEventSource    fEventSource = new TmfEventSource();
+               String            fEventSource = "";
                TmfEventType      fEventType   = new TmfEventTypeStub();
                TmfEventReference fReference   = new TmfEventReference();
                TmfEvent          fEvent       = new TmfEvent(fTimestamp, fEventSource, fEventType, fReference);
diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventSourceTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventSourceTest.java
deleted file mode 100644 (file)
index 341e2b9..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.tests.event;
-
-import junit.framework.TestCase;
-
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
-
-/**
- * <b><u>TmfEventSourceTest</u></b>
- * <p>
- * Test suite for the TmfEventSource class.
- */
-@SuppressWarnings("nls")
-public class TmfEventSourceTest extends TestCase {
-
-       // ------------------------------------------------------------------------
-       // Variables
-       // ------------------------------------------------------------------------
-
-       private final Object source1 = new String("Some source");
-       private final Object source2 = new String("Some other source");
-
-       private final TmfEventSource fSource0 = new TmfEventSource(source1);
-       private final TmfEventSource fSource1 = new TmfEventSource(source1);
-       private final TmfEventSource fSource2 = new TmfEventSource(source1);
-       private final TmfEventSource fSource3 = new TmfEventSource(source2);
-       
-       // ------------------------------------------------------------------------
-       // Housekeeping
-       // ------------------------------------------------------------------------
-
-       /**
-        * @param name the test name
-        */
-       public TmfEventSourceTest(String name) {
-               super(name);
-       }
-
-       @Override
-       protected void setUp() throws Exception {
-               super.setUp();
-       }
-
-       @Override
-       protected void tearDown() throws Exception {
-               super.tearDown();
-       }
-
-       // ------------------------------------------------------------------------
-       // Constructors
-       // ------------------------------------------------------------------------
-
-       public void testTmfEventSourceDefault() {
-               TmfEventSource source = new TmfEventSource();
-               assertEquals("getSourceId", null, source.getSourceId());
-       }
-
-       public void testTmfEventSource() {
-               TmfEventSource source = new TmfEventSource(source1);
-               assertSame("getSourceId", source1, source.getSourceId());
-       }
-
-       public void testTmfEventSourceCopy() {
-               TmfEventSource original = new TmfEventSource(source1);
-               TmfEventSource source = new TmfEventSource(original);
-               assertSame("getSourceId", source1, source.getSourceId());
-       }
-
-       public void testTmfEventSourceCopy2() {
-               try {
-                       @SuppressWarnings("unused")
-                       TmfEventSource source = new TmfEventSource(null);
-                       fail("null copy");
-               }
-               catch (IllegalArgumentException e) {
-                       // Success
-               }
-       }
-
-       // ------------------------------------------------------------------------
-       // equals
-       // ------------------------------------------------------------------------
-
-       public void testEqualsReflexivity() throws Exception {
-               assertTrue("equals", fSource0.equals(fSource0));
-               assertTrue("equals", fSource3.equals(fSource3));
-
-               assertTrue("equals", !fSource0.equals(fSource3));
-               assertTrue("equals", !fSource3.equals(fSource0));
-       }
-       
-       public void testEqualsSymmetry() throws Exception {
-               assertTrue("equals", fSource0.equals(fSource2));
-               assertTrue("equals", fSource2.equals(fSource0));
-
-               assertTrue("equals", !fSource0.equals(fSource3));
-               assertTrue("equals", !fSource3.equals(fSource0));
-       }
-       
-       public void testEqualsTransivity() throws Exception {
-               assertTrue("equals", fSource0.equals(fSource1));
-               assertTrue("equals", fSource1.equals(fSource2));
-               assertTrue("equals", fSource0.equals(fSource2));
-       }
-       
-       public void testEqualsNull() throws Exception {
-               assertTrue("equals", !fSource0.equals(null));
-               assertTrue("equals", !fSource3.equals(null));
-       }
-       
-       // ------------------------------------------------------------------------
-       // hashCode
-       // ------------------------------------------------------------------------
-
-       public void testHashCode() throws Exception {
-               assertTrue("hashCode", fSource0.hashCode() == fSource1.hashCode());
-               assertTrue("hashCode", fSource0.hashCode() != fSource3.hashCode());
-       }
-       
-       // ------------------------------------------------------------------------
-       // toString
-       // ------------------------------------------------------------------------
-
-       public void testToString() {
-               String expected1 = "[TmfEventSource(" + "null" + ")]";
-               TmfEventSource nullSource = new TmfEventSource();
-               assertEquals("toString", expected1, nullSource.toString());
-
-               String expected2 = "[TmfEventSource(" + source1.toString() + ")]";
-               TmfEventSource source = new TmfEventSource(source1);
-               assertEquals("toString", expected2, source.toString());
-       }
-
-}
index f1cbcf021d49c81e6d3905d576f3a3d847476a77..50892eff555a5501ef688c4e06a3cdb8c8ec82dc 100644 (file)
@@ -17,7 +17,6 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 
@@ -40,7 +39,7 @@ public class TmfEventTest extends TestCase {
 
        private final TmfTimestamp      fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
        private final TmfTimestamp      fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
-       private final TmfEventSource    fSource     = new TmfEventSource("Source");
+       private final String            fSource     = "Source";
        private final TmfEventType      fType       = new TmfEventType(fTypeId, fLabels);
        private final TmfEventReference fReference  = new TmfEventReference("Some reference");
 
index 5f5a00452c90592dd2fb299b377b4044dc9093d4..71cd969c9bf5606ddc530517a6bbdeec98db5944 100644 (file)
@@ -16,7 +16,6 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfAsyncSequenceDiagramEvent;
@@ -31,7 +30,7 @@ public class TmfAsyncSequenceDiagramEventTest extends TestCase {
 
     private final TmfTimestamp      fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
     private final TmfTimestamp      fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
-    private final TmfEventSource    fSource     = new TmfEventSource("Source");
+    private final String            fSource     = "Source";
     private final TmfEventType      fType       = new TmfEventType(fTypeId, fLabels);
     private final TmfEventReference fReference  = new TmfEventReference("Some reference");
 
index 8b2557081e1a44672509f05e30eaffd01d331e0d..f89f7e41961a549cc202565d54c4bb6af8c2edb2 100644 (file)
@@ -16,7 +16,6 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent;
@@ -30,7 +29,7 @@ public class TmfSyncSequenceDiagramEventTest extends TestCase {
     private final String[] fLabels = new String[] { fLabel0, fLabel1 };
 
     private final TmfTimestamp      fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
-    private final TmfEventSource    fSource     = new TmfEventSource("Source");
+    private final String            fSource     = "Source";
     private final TmfEventType      fType       = new TmfEventType(fTypeId, fLabels);
     private final TmfEventReference fReference  = new TmfEventReference("Some reference");
 
index ac9d95bbcc06b1cfa7c8473f449afbc3d115c35e..450e0d564cf251a7b58b218ffe9c61e5d631b799 100644 (file)
@@ -20,7 +20,6 @@ import java.util.Vector;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.parser.ITmfEventParser;
@@ -107,7 +106,7 @@ public class TmfEventParserStub implements ITmfEventParser {
 
                    TmfEvent event = new TmfEvent(
                            new TmfTimestamp(ts, (byte) -3, 0),     // millisecs
-                           new TmfEventSource(source),
+                           source,
                            fTypes[typeIndex],
                            new TmfEventReference(name));
                    TmfEventContent cnt = new TmfEventContent(event, content);
index 4c7026ee17204c54f0ed448074f687816cdaa78f..25af5652f8078d9b437fc2c1016d3fb8331f9e4f 100644 (file)
@@ -42,7 +42,7 @@ public class TmfDataEvent implements Cloneable {
 
     protected ITmfTrace<? extends TmfDataEvent> fTrace;
     protected long fRank;
-    protected TmfEventSource fSource;
+    protected String fSource;
     protected TmfEventType fType;
     protected TmfEventContent fContent;
     protected TmfEventReference fReference;
@@ -67,7 +67,7 @@ public class TmfDataEvent implements Cloneable {
      * @param reference the event reference
      */
     public TmfDataEvent(ITmfTrace<? extends TmfDataEvent> trace, long rank,
-            TmfEventSource source, TmfEventType type, TmfEventContent content,
+            String source, TmfEventType type, TmfEventContent content,
             TmfEventReference reference)
     {
         fTrace = trace;
@@ -112,10 +112,17 @@ public class TmfDataEvent implements Cloneable {
         return fRank;
     }
 
+    /**
+     * @param source the event source
+     */
+    public void setSource(String source) {
+        fSource = source;
+    }
+
     /**
      * @return the event source
      */
-    public TmfEventSource getSource() {
+    public String getSource() {
         return fSource;
     }
 
index bbc1695ee16121fbc2688081ac460a33fa5a0d41..50970a1b6c1007ae69fba6fc47a0664dab810ebe 100644 (file)
@@ -59,7 +59,7 @@ public class TmfEvent extends TmfDataEvent implements Cloneable {
      * @param type the event type
      * @param reference the event reference
      */
-    public TmfEvent(ITmfTrace<?> trace, long rank, TmfTimestamp timestamp, TmfEventSource source,
+    public TmfEvent(ITmfTrace<?> trace, long rank, TmfTimestamp timestamp, String source,
                     TmfEventType type, TmfEventReference reference) {
         super(trace, rank, source, type, null, reference);
         fTimestamp = timestamp;
@@ -68,7 +68,7 @@ public class TmfEvent extends TmfDataEvent implements Cloneable {
     /**
      * Constructor - no rank
      */
-    public TmfEvent(ITmfTrace<?> parentTrace, TmfTimestamp timestamp, TmfEventSource source,
+    public TmfEvent(ITmfTrace<?> parentTrace, TmfTimestamp timestamp, String source,
                     TmfEventType type, TmfEventReference reference) {
         this(parentTrace, -1, timestamp, source, type, reference);
     }
@@ -76,7 +76,7 @@ public class TmfEvent extends TmfDataEvent implements Cloneable {
     /**
      * Constructor - no trace, no rank
      */
-    public TmfEvent(TmfTimestamp timestamp, TmfEventSource source, TmfEventType type,
+    public TmfEvent(TmfTimestamp timestamp, String source, TmfEventType type,
                     TmfEventReference reference) {
         this(null, -1, timestamp, source, type, reference);
     }
index be5c808102d0d30158c34a672f3c8f52690c2860..9bebce7535377b7210b4792c6f7f6f2704b514c9 100644 (file)
@@ -118,7 +118,7 @@ public class TmfEventContent implements Cloneable {
             } else if (id.equals(FIELD_ID_TIMESTAMP)) {
                 return new Long(fParentEvent.getTimestamp().getValue()).toString();
             } else if (id.equals(FIELD_ID_SOURCE)) {
-                return fParentEvent.getSource().getSourceId().toString();
+                return fParentEvent.getSource();
             } else if (id.equals(FIELD_ID_TYPE)) {
                 return fParentEvent.getType().getTypeId().toString();
             } else if (id.equals(FIELD_ID_REFERENCE)) {
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventSource.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventSource.java
deleted file mode 100644 (file)
index b3bc04a..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.event;
-
-/**
- * <b><u>TmfEventSource</u></b>
- * <p>
- * The event source.
- */
-public class TmfEventSource implements Cloneable {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-       protected Object fSourceId;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The default constructor
-     */
-    public TmfEventSource() {
-       fSourceId = null;
-    }
-
-       /**
-        * @param sourceId
-        */
-       public TmfEventSource(Object sourceId) {
-               fSourceId = sourceId;
-       }
-
-       /**
-        * Copy constructor
-        * @param other
-        */
-       public TmfEventSource(TmfEventSource other) {
-       if (other == null)
-               throw new IllegalArgumentException();
-       TmfEventSource o = (TmfEventSource) other;
-       fSourceId = o.fSourceId;
-       }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-       /**
-        * @return
-        */
-       public Object getSourceId() {
-               return fSourceId;
-       }
-
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-       @Override
-    public int hashCode() {
-        return (fSourceId != null) ? fSourceId.hashCode() : 0;
-    }
-
-       @Override
-    public boolean equals(Object other) {
-               if (!(other instanceof TmfEventSource))
-                       return false;
-               TmfEventSource o = (TmfEventSource) other;
-               if (fSourceId == null) {
-                   return o.fSourceId == null;
-               }
-        return fSourceId.equals(o.fSourceId);
-    }
-
-       @Override
-    @SuppressWarnings("nls")
-    public String toString() {
-        return "[TmfEventSource(" + ((fSourceId != null) ? fSourceId.toString() : "null") + ")]";
-    }
-
-       @Override
-       public TmfEventSource clone() {
-               TmfEventSource clone = null;
-               try {
-                       clone = (TmfEventSource) super.clone();
-                       clone.fSourceId = fSourceId;
-               }
-               catch (CloneNotSupportedException e) {
-                       e.printStackTrace();
-               }
-               return clone;
-       }
-}
index 86722c8e72cce598b21ab0bce38f88093518838d..1cf82407b29a0bc76d1bdf1e5eb6e2ee09116fb3 100644 (file)
@@ -47,7 +47,7 @@ public class TmfTraceEvent extends TmfEvent {
         * @param file
         * @param line
         */
-       public TmfTraceEvent(TmfTimestamp timestamp, TmfEventSource source, TmfEventType type,
+       public TmfTraceEvent(TmfTimestamp timestamp, String source, TmfEventType type,
                        TmfEventReference reference, String path, String file, int line)
        {
                super(timestamp, source, type, reference);
index b74eafb653831f02f29d13134e6857abebafa493..34f6b5b5bd753f451c1cff435070c0547f2ae769 100644 (file)
@@ -21,7 +21,6 @@ import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
@@ -57,7 +56,7 @@ public class TmfBaseColumnDataProviderTest extends TestCase {
     private final TmfTimestamp fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
     private final TmfTimestamp fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
 
-    private final TmfEventSource fSource = new TmfEventSource("Source");
+    private final String       fSource = "Source";
 
     private final TmfEventType fType1 = new TmfEventType(fTypeId1, fLabels);
     private final TmfEventType fType2 = new TmfEventType(fTypeId1, fLabels);
index fb27aea834b6c624ca3aaaa844907b5522a4727e..249d7b20eeb61570e84f19af2cdf600f39c7bfb1 100755 (executable)
@@ -22,14 +22,13 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseStatisticsTree;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfStatisticsTreeNode;
 
 @SuppressWarnings("nls")
@@ -52,7 +51,7 @@ public class TmfBaseStatisticsDataTest extends TestCase {
     private final TmfTimestamp      fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
     private final TmfTimestamp      fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
     
-    private final TmfEventSource    fSource     = new TmfEventSource("Source");
+    private final String            fSource     = "Source";
     
     private final TmfEventType      fType1      = new TmfEventType(fTypeId1, fLabels);
     private final TmfEventType      fType2      = new TmfEventType(fTypeId1, fLabels);
index ecc642067273438fe097b2dc494719a39cfafd53..5a370f4817aa1af43af730bef009a8d621b3b3fc 100755 (executable)
@@ -22,14 +22,13 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseStatisticsTree;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfStatisticsTreeNode;
 
 @SuppressWarnings("nls")
@@ -53,7 +52,7 @@ public class TmfStatisticsTreeNodeTest extends TestCase {
     private final TmfTimestamp      fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
     private final TmfTimestamp      fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
     
-    private final TmfEventSource    fSource     = new TmfEventSource("Source");
+    private final String            fSource     = "Source";
     
     private final TmfEventType      fType1      = new TmfEventType(fTypeId1, fLabels);
     private final TmfEventType      fType2      = new TmfEventType(fTypeId1, fLabels);
index af3be1b301125dc273f0e3f650a76a717a313e71..6e4208435c63ee99ace9496cf7bedcdd75fce4f7 100755 (executable)
@@ -22,14 +22,13 @@ import junit.framework.TestCase;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.Messages;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseStatisticsTree;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.model.AbsTmfStatisticsTree;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfStatisticsTreeNode;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfTreeContentProvider;
 
@@ -52,7 +51,7 @@ public class TmfTreeContentProviderTest extends TestCase {
     private final TmfTimestamp fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
     private final TmfTimestamp fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
 
-    private final TmfEventSource fSource = new TmfEventSource("Source");
+    private final String fSource = "Source";
 
     private final TmfEventType fType1 = new TmfEventType(fTypeId1, fLabels);
     private final TmfEventType fType2 = new TmfEventType(fTypeId2, fLabels);
index 4d6286719b881df2845d8aad7c404a555510c33e..968140f8637e58f17e4f5b869e5d9fc8010f0579 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventContent;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.parser.ITmfEventParser;
@@ -58,7 +57,7 @@ public class TmfUml2SDTestTrace implements ITmfEventParser {
             String signal = stream.readUTF();
 
             TmfEventReference tmfReference = new TmfEventReference(reference);
-            TmfEventSource tmfSource = new TmfEventSource(source);
+            String tmfSource = source;
             String[] labels = {"sender", "receiver", "signal"};
 
             TmfEventType tmfEventType = new TmfEventType(type, labels);
index 0e991f3826a38422aab434513f41165b26d2025a..970d04daacd206abb7b3f4874ac8fa989a90926e 100644 (file)
@@ -20,7 +20,6 @@ import java.util.Map;
 \r
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;\r
@@ -47,7 +46,7 @@ public class CustomEvent extends TmfEvent {
         fData = new HashMap<String, String>();\r
     }\r
 \r
-    public CustomEvent(CustomTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, TmfEventSource source, TmfEventType type, TmfEventReference reference) {\r
+    public CustomEvent(CustomTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, String source, TmfEventType type, TmfEventReference reference) {\r
         super(parentTrace, timestamp, source, type, reference);\r
         fDefinition = definition;\r
         fData = new HashMap<String, String>();\r
index 263cb265dce75adc738f81b345f6ccb4414728ae..d5ac625e9b47930fd6089d9da2afe1963c0725dc 100644 (file)
@@ -16,7 +16,6 @@ import java.util.regex.Matcher;
 \r
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;\r
@@ -34,7 +33,7 @@ public class CustomTxtEvent extends CustomEvent {
         super(definition, other);\r
     }\r
 \r
-    public CustomTxtEvent(CustomTxtTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, TmfEventSource source, TmfEventType type, TmfEventReference reference) {\r
+    public CustomTxtEvent(CustomTxtTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, String source, TmfEventType type, TmfEventReference reference) {\r
         super(definition, parentTrace, timestamp, source, type, reference);\r
     }\r
 \r
index e4bd564c76402c8d5b40253b35ed420c2010c6bd..2a82e0b8540506dd3c4d83af9e2cc92dd6b7ec1a 100644 (file)
@@ -23,7 +23,6 @@ import java.util.regex.Matcher;
 \r
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;\r
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;\r
@@ -308,7 +307,7 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> {
     }\r
     \r
     public CustomTxtEvent parseFirstLine(CustomTxtTraceContext context) {\r
-        CustomTxtEvent event = new CustomTxtEvent(fDefinition, this, TmfTimestamp.Zero, new TmfEventSource(""), fEventType, new TmfEventReference("")); //$NON-NLS-1$ //$NON-NLS-2$\r
+        CustomTxtEvent event = new CustomTxtEvent(fDefinition, this, TmfTimestamp.Zero, "", fEventType, new TmfEventReference("")); //$NON-NLS-1$ //$NON-NLS-2$\r
         event.processGroups(context.inputLine, context.firstLineMatcher);\r
         event.setContent(new CustomEventContent(event, new StringBuffer(context.firstLine)));\r
         return event;\r
index fd94a2f313c691aebfacd78eeeed0ba915220d5b..cb980aadcce77eefa7cddd9be6cd91e8f0698ff1 100644 (file)
@@ -14,7 +14,6 @@ package org.eclipse.linuxtools.tmf.ui.parsers.custom;
 \r
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;\r
@@ -30,7 +29,7 @@ public class CustomXmlEvent extends CustomEvent {
         super(definition, other);\r
     }\r
 \r
-    public CustomXmlEvent(CustomXmlTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, TmfEventSource source, TmfEventType type, TmfEventReference reference) {\r
+    public CustomXmlEvent(CustomXmlTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, String source, TmfEventType type, TmfEventReference reference) {\r
         super(definition, parentTrace, timestamp, source, type, reference);\r
     }\r
 \r
index 9f8f2931a982463e299b9dc22a033e11d99fe645..ec80fbb561a62929a3b8478495e96e247bb82703 100644 (file)
@@ -24,7 +24,6 @@ import javax.xml.parsers.ParserConfigurationException;
 \r
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfEventReference;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfEventSource;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;\r
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;\r
@@ -364,7 +363,7 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
     }\r
     \r
     public CustomXmlEvent extractEvent(Element element, InputElement inputElement) {\r
-        CustomXmlEvent event = new CustomXmlEvent(fDefinition, this, TmfTimestamp.Zero, new TmfEventSource(""), fEventType, new TmfEventReference("")); //$NON-NLS-1$ //$NON-NLS-2$\r
+        CustomXmlEvent event = new CustomXmlEvent(fDefinition, this, TmfTimestamp.Zero, "", fEventType, new TmfEventReference("")); //$NON-NLS-1$ //$NON-NLS-2$\r
         event.setContent(new CustomEventContent(event, new StringBuffer()));\r
         parseElement(element, event, inputElement);\r
         return event;\r
index 30a4f6ca8c4dd2779b57fca8ba26c4f0b6d3e872..ccc32651723c75692aa3883155eff1f70eff7fe9 100644 (file)
@@ -1291,7 +1291,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
         String[] fields = new String[0];\r
         if (event != null) {\r
             fields = new String[] { new Long(event.getTimestamp().getValue()).toString(),\r
-                    event.getSource().getSourceId().toString(), event.getType().getTypeId().toString(),\r
+                    event.getSource(), event.getType().getTypeId().toString(),\r
                     event.getReference().getReference().toString(), event.getContent().toString() };\r
         }\r
         return fields;\r
This page took 0.067414 seconds and 5 git commands to generate.