tmf: Fix empty trace properties when trace name has regex special chars
authorPatrick Tasse <patrick.tasse@gmail.com>
Thu, 27 Mar 2014 20:38:25 +0000 (16:38 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 1 Apr 2014 12:43:07 +0000 (08:43 -0400)
The trace properties (e.g. CTF environment variables) are empty when the
trace name contains regex special characters such as '(' ')' because
this causes failure of a replace of the trace name in the prefix of the
property descriptor key.

Change-Id: Ie682ee91f14249d32b26dd60d8c9511004c1ab1f
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/24027
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>

org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceElement.java

index 8ef4854ce3f4914cb907394362878ac57a3da03e..f5b1a65c5b35386169c494879c9924ac37d58c8a 100644 (file)
@@ -466,7 +466,7 @@ public class TmfTraceElement extends TmfCommonProjectElement implements IActionF
         Map<String, String> traceProperties = getTraceProperties();
         if (id != null && !traceProperties.isEmpty()) {
             String key = (String) id;
-            key = key.replaceFirst(this.getName() + "_", ""); //$NON-NLS-1$ //$NON-NLS-2$
+            key = key.substring(this.getName().length() + 1); // remove name_
             String value = traceProperties.get(key);
             return value;
         }
This page took 0.027706 seconds and 5 git commands to generate.