Fix to extract trace name from path
authorFrancois Chouinard <fchouinard@gmail.com>
Fri, 1 Apr 2011 19:14:27 +0000 (15:14 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Fri, 1 Apr 2011 19:14:27 +0000 (15:14 -0400)
org.eclipse.linuxtools.tmf/src/org/eclipse/linuxtools/tmf/trace/TmfTrace.java

index f190c964f8277100e8ccca38469e1d360bd96315..6dcf6aedc5d4cbac67143b405772fc4800e5fbbe 100644 (file)
@@ -12,6 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.trace;
 
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.util.Collections;
 import java.util.Vector;
@@ -119,11 +120,11 @@ public abstract class TmfTrace<T extends TmfEvent> extends TmfEventProvider<T> i
      */
     protected TmfTrace(String name, Class<T> type, String path, int cacheSize, boolean indexTrace) throws FileNotFoundException {
        super(name, type);
-//     if (path != null) {
-//             int sep = path.lastIndexOf(File.separator);
-//             String simpleName = (sep >= 0) ? path.substring(sep + 1) : path;
-//             setName(simpleName);
-//     }
+       if (path != null) {
+               int sep = path.lastIndexOf(File.separator);
+               String simpleName = (sep >= 0) ? path.substring(sep + 1) : path;
+               setName(simpleName);
+       }
        fPath = path;
         fIndexPageSize = (cacheSize > 0) ? cacheSize : DEFAULT_INDEX_PAGE_SIZE;
         if (indexTrace) {
This page took 0.040757 seconds and 5 git commands to generate.