tmf: Replace TmfFilterEventTypeNode with TmfFilterTraceTypeNode
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / project / model / TraceTypeHelper.java
index 3ba07e4b46c47d08b7cce75db238f188f1eb38b0..ecd49eac50e8aab5a739083b02a0dd6ec6cc236d 100644 (file)
@@ -30,6 +30,8 @@ import org.eclipse.tracecompass.tmf.core.trace.TraceValidationStatus;
  */
 public class TraceTypeHelper {
 
+    private static final String SEP = " : "; //$NON-NLS-1$
+
     private final String fName;
     private final String fCategoryName;
     private final String fTraceTypeId;
@@ -83,6 +85,18 @@ public class TraceTypeHelper {
         return fCategoryName;
     }
 
+    /**
+     * Get the trace type label "category : name".
+     *
+     * @return the trace type label
+     */
+    public String getLabel() {
+        if (fCategoryName.isEmpty()) {
+            return fName;
+        }
+        return fCategoryName + SEP + fName;
+    }
+
     /**
      * Get the trace type id
      *
This page took 0.025267 seconds and 5 git commands to generate.