Fix for bug 366089.
authorPatrick Tasse <patrick.tasse@gmail.com>
Thu, 8 Dec 2011 19:10:09 +0000 (14:10 -0500)
committerPatrick Tasse <patrick.tasse@gmail.com>
Thu, 8 Dec 2011 19:27:50 +0000 (14:27 -0500)
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java

index 0def3397e0001a870ec0c87cd12832ae1aa8aa4a..ccca6df36a05105e13abbe51a7e9270bff28ccdb 100644 (file)
@@ -100,6 +100,10 @@ public class TmfExperiment<T extends TmfEvent> extends TmfEventProvider<T> imple
     public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException {
     }
 
+    @Override
+    public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace, String name) throws FileNotFoundException {
+    }
+
     /**
      * @param type
      * @param id
index ce589ec2c122cad2a5b50fc5831bf650bc83ae77..920bf75a3b782caa1383d7ef446436ca70926eea 100644 (file)
@@ -35,6 +35,8 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
 
     public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException;
 
+    public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace, String name) throws FileNotFoundException;
+
     // Trace type validation
     public boolean validate(IProject project, String path);
 
index 80f670b01c17878435c6bebbd2a548a1ec4bcff6..a81b9c37cfb2eebaa1c34724d18e34ded22d6404 100644 (file)
@@ -93,26 +93,34 @@ public abstract class TmfTrace<T extends TmfEvent> extends TmfEventProvider<T> i
 
     @Override
     public void initTrace(String path, Class<T> eventType) throws FileNotFoundException {
-        initTmfTrace(path, eventType, DEFAULT_INDEX_PAGE_SIZE, false);
+        initTmfTrace(path, eventType, DEFAULT_INDEX_PAGE_SIZE, false, null);
     }
 
     @Override
     public void initTrace(String path, Class<T> eventType, int cacheSize) throws FileNotFoundException {
-        initTmfTrace(path, eventType, cacheSize, false);
+        initTmfTrace(path, eventType, cacheSize, false, null);
     }
 
     @Override
     public void initTrace(String path, Class<T> eventType, boolean indexTrace) throws FileNotFoundException {
-        initTmfTrace(path, eventType, DEFAULT_INDEX_PAGE_SIZE, indexTrace);
+        initTmfTrace(path, eventType, DEFAULT_INDEX_PAGE_SIZE, indexTrace, null);
     }
 
     @Override
     public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException {
-        initTmfTrace(path, eventType, cacheSize, indexTrace);
+        initTmfTrace(path, eventType, cacheSize, indexTrace, null);
     }
 
-    private void initTmfTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException {
+    @Override
+    public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace, String name) throws FileNotFoundException {
+        initTmfTrace(path, eventType, cacheSize, indexTrace, name);
+    }
+
+    private void initTmfTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace, String name) throws FileNotFoundException {
         fPath = path;
+        if (name != null) {
+            fTraceName = name;
+        }
         if (fTraceName == null) {
             fTraceName = ""; //$NON-NLS-1$
             if (path != null) {
This page took 0.030343 seconds and 5 git commands to generate.