Rename xxx.lttng to xxx.lttng.core
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / component / TmfComponent.java
index 4a6082bff81302e26882bd1affb00a27e2ebf780..62d863fc703cd9aaba0caac06693c47099dd6124 100644 (file)
@@ -12,7 +12,6 @@
 
 package org.eclipse.linuxtools.tmf.component;
 
-import org.eclipse.linuxtools.tmf.Tracer;
 import org.eclipse.linuxtools.tmf.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.signal.TmfSignalManager;
 
@@ -25,28 +24,37 @@ import org.eclipse.linuxtools.tmf.signal.TmfSignalManager;
  */
 public abstract class TmfComponent implements ITmfComponent {
 
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
        private String fName;
        
        // ------------------------------------------------------------------------
        // Constructor
        // ------------------------------------------------------------------------
 
+    public TmfComponent() {
+           this(""); //$NON-NLS-1$
+    }
+
+    public void init(String name) {
+        fName = name;
+        TmfSignalManager.register(this);
+    }
+
        public TmfComponent(String name) {
-               fName = name;
-               if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "created");
-               TmfSignalManager.register(this);
+               init(name);
        }
        
-       public TmfComponent(TmfComponent oldComponent) {
-        this.fName = oldComponent.fName;
-
-        // Should we register? Probably not but I'm not quite sure what this does
-        //register();
+       public TmfComponent(TmfComponent other) {
+        init(other.fName);
        }
        
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#getName()
-        */
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
        protected void setName(String name) {
                fName = name;
        }
@@ -55,24 +63,18 @@ public abstract class TmfComponent implements ITmfComponent {
        // ITmfComponent
        // ------------------------------------------------------------------------
 
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#getName()
-        */
+       @Override
        public String getName() {
                return fName;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#dispose()
-        */
+       @Override
        public void dispose() {
                TmfSignalManager.deregister(this);
-               if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "terminated");
+//             if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "terminated");
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal)
-        */
+       @Override
        public void broadcast(TmfSignal signal) {
                TmfSignalManager.dispatchSignal(signal);
        }
This page took 0.024588 seconds and 5 git commands to generate.