summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMarc-Andre Laperle2013-09-11 15:31:47 (EDT)
committer Alexandre Montplaisir2013-09-13 15:08:08 (EDT)
commitc81826411043e43a0c7a4c74466d10d89879b167 (patch)
treedb7106c72f65474d6ab1f5faadaf0bfca042f078
parent7c84714c97937cb45ba3b9843de7ba93ff30f725 (diff)
downloadorg.eclipse.linuxtools-c81826411043e43a0c7a4c74466d10d89879b167.zip
org.eclipse.linuxtools-c81826411043e43a0c7a4c74466d10d89879b167.tar.gz
org.eclipse.linuxtools-c81826411043e43a0c7a4c74466d10d89879b167.tar.bz2
Bug 417036 - [TMF] Legacy import: Trace type is not set after importing custom tracerefs/changes/42/16342/5
Change-Id: I1db889718bf5985b6b0e3ae6395dd958a399ef6e Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/16342 Tested-by: Hudson CI Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java
index fe1ba34..116035d 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java
@@ -143,6 +143,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
// Target import directory ('Traces' folder)
private IFolder fTargetFolder;
+ private static final String SEPARATOR = ":"; //$NON-NLS-1$
// ------------------------------------------------------------------------
// Constructors
@@ -670,7 +671,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
// Perform trace validation
String traceTypeName = fTraceTypes.getText();
- String tokens[] = traceTypeName.split(":", 2); //$NON-NLS-1$
+ String tokens[] = traceTypeName.split(SEPARATOR, 2);
if (tokens.length >= 2) {
String id = TmfTraceType.getInstance().getTraceTypeId(tokens[0], tokens[1]);
if (!TmfTraceType.getInstance().validateTrace(id, getSelectedResources())) {
@@ -732,20 +733,20 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
boolean traceTypeOK = false;
if (traceType.startsWith(TmfTraceType.CUSTOM_TXT_CATEGORY)) {
for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {
- if (traceType.equals(TmfTraceType.CUSTOM_TXT_CATEGORY + " : " + def.definitionName)) { //$NON-NLS-1$
+ if (traceType.equals(TmfTraceType.CUSTOM_TXT_CATEGORY + SEPARATOR + def.definitionName)) {
traceTypeOK = true;
traceBundle = Activator.getDefault().getBundle().getSymbolicName();
- traceTypeId = CustomTxtTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
+ traceTypeId = CustomTxtTrace.class.getCanonicalName() + SEPARATOR + def.definitionName;
traceIcon = DEFAULT_TRACE_ICON_PATH;
break;
}
}
} else if (traceType.startsWith(TmfTraceType.CUSTOM_XML_CATEGORY)) {
for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.loadAll()) {
- if (traceType.equals(TmfTraceType.CUSTOM_XML_CATEGORY + " : " + def.definitionName)) { //$NON-NLS-1$
+ if (traceType.equals(TmfTraceType.CUSTOM_XML_CATEGORY + SEPARATOR + def.definitionName)) {
traceTypeOK = true;
traceBundle = Activator.getDefault().getBundle().getSymbolicName();
- traceTypeId = CustomXmlTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
+ traceTypeId = CustomXmlTrace.class.getCanonicalName() + SEPARATOR + def.definitionName;
traceIcon = DEFAULT_TRACE_ICON_PATH;
break;
}
@@ -753,7 +754,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
} else {
if (!traceType.equals("")) { //$NON-NLS-1$
// Trace type was selected
- String temp[] = traceType.split(":", 2); //$NON-NLS-1$
+ String temp[] = traceType.split(SEPARATOR, 2);
if (temp.length < 2) {
Activator.getDefault().logError("Error with trace type " + traceType); //$NON-NLS-1$
return false;