Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2013-06-03 12:59:18 +0000
committerBernd Hufmann2013-06-03 15:50:36 +0000
commit23ca29a2fdbd533b89e84d8b6e1b0af08a2e4b37 (patch)
tree26d91c0c142326381bf7d60b20a66b04bd014ea4
parent17f3627c49b1c8f5a2fdacfdc044fd6e8320399d (diff)
downloadorg.eclipse.linuxtools-23ca29a2fdbd533b89e84d8b6e1b0af08a2e4b37.tar.gz
org.eclipse.linuxtools-23ca29a2fdbd533b89e84d8b6e1b0af08a2e4b37.tar.xz
org.eclipse.linuxtools-23ca29a2fdbd533b89e84d8b6e1b0af08a2e4b37.zip
tmf: Fix orignal trace import wizard (bug 409721)
The import used to fail at finish when no trace type was selected. This commit fixes this bug. cherry-picked from ac757ff5c408631906f5d0cdbeedcb86a9596818 Change-Id: I489e78f980d3d2f7eac96ede6ae931f30f9c893c Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com> Reviewed-on: https://git.eclipse.org/r/13494 Tested-by: Hudson CI IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPage.java41
1 files changed, 22 insertions, 19 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 7fe8714184..fe1ba34482 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
@@ -751,29 +751,32 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
}
}
} else {
- String temp[] = traceType.split(":", 2); //$NON-NLS-1$
- if (temp.length < 2) {
- Activator.getDefault().logError("Error with trace type " + traceType); //$NON-NLS-1$
- return false;
- }
- final String traceId = TmfTraceType.getInstance().getTraceTypeId(temp[0], temp[1]);
- if (traceId != null) {
- if (!TmfTraceType.getInstance().validateTrace(traceId, getSelectedResources())) {
+ if (!traceType.equals("")) { //$NON-NLS-1$
+ // Trace type was selected
+ String temp[] = traceType.split(":", 2); //$NON-NLS-1$
+ if (temp.length < 2) {
+ Activator.getDefault().logError("Error with trace type " + traceType); //$NON-NLS-1$
+ return false;
+ }
+ final String traceId = TmfTraceType.getInstance().getTraceTypeId(temp[0], temp[1]);
+ if (traceId != null) {
+ if (!TmfTraceType.getInstance().validateTrace(traceId, getSelectedResources())) {
+ setMessage(null);
+ setErrorMessage(Messages.ImportTraceWizard_TraceValidationFailed);
+ return false;
+ }
+ } else {
setMessage(null);
setErrorMessage(Messages.ImportTraceWizard_TraceValidationFailed);
return false;
}
- } else {
- setMessage(null);
- setErrorMessage(Messages.ImportTraceWizard_TraceValidationFailed);
- return false;
- }
- IConfigurationElement ce = TmfTraceType.getInstance().getTraceAttributes(traceId);
- if (ce != null) {
- traceTypeOK = true;
- traceBundle = ce.getContributor().getName();
- traceTypeId = ce.getAttribute(TmfTraceType.ID_ATTR);
- traceIcon = ce.getAttribute(TmfTraceType.ICON_ATTR);
+ IConfigurationElement ce = TmfTraceType.getInstance().getTraceAttributes(traceId);
+ if (ce != null) {
+ traceTypeOK = true;
+ traceBundle = ce.getContributor().getName();
+ traceTypeId = ce.getAttribute(TmfTraceType.ID_ATTR);
+ traceIcon = ce.getAttribute(TmfTraceType.ICON_ATTR);
+ }
}
}
if (ok && traceTypeOK && !traceType.equals("")) { //$NON-NLS-1$

Back to the top