Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2013-05-23 20:45:18 +0000
committerMatthew Khouzam2013-05-29 18:48:24 +0000
commit6dae671ed85b843461e045dc362f82ed2d7e51ff (patch)
treeda15956b80776b53238e419044aa65d31d2995d2
parentcae48a22e30a260e964a44c89b977417474032ab (diff)
downloadorg.eclipse.linuxtools-6dae671ed85b843461e045dc362f82ed2d7e51ff.tar.gz
org.eclipse.linuxtools-6dae671ed85b843461e045dc362f82ed2d7e51ff.tar.xz
org.eclipse.linuxtools-6dae671ed85b843461e045dc362f82ed2d7e51ff.zip
tmf: fix potential bug when selecting trace types in import wizard
Change-Id: I963b47cf18caba9d0ae215f74bd8861c2ea29175 Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/13347 Tested-by: Hudson CI Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com> IP-Clean: Bernd Hufmann <bernd.hufmann@ericsson.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPageOptions.java1
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TraceTypeContentProvider.java2
3 files changed, 4 insertions, 5 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPageOptions.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPageOptions.java
index 4ccca8069f..ae8a5bdb05 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPageOptions.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardPageOptions.java
@@ -112,5 +112,4 @@ public class ImportTraceWizardPageOptions extends AbstractImportTraceWizardPage
}
this.setTitle(Messages.ImportTraceWizardPageOptionsTitle);
}
-
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
index 754a68025f..23d2f0676e 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
@@ -159,11 +159,11 @@ public class ImportTraceWizardSelectTraceTypePage extends AbstractImportTraceWiz
ITreeContentProvider tcp = (ITreeContentProvider) fTreeView.getContentProvider();
String parentElement = (String) tcp.getParent(element);
if (parentElement != null) {
- String[] siblings = (String[]) tcp.getChildren(parentElement);
- final String first = siblings[0];
+ TraceTypeHelper[] siblings = (TraceTypeHelper[]) tcp.getChildren(parentElement);
+ final TraceTypeHelper first = siblings[0];
final boolean isFirstChecked = fTreeView.getChecked(first);
boolean allSame = true;
- for (String peer : siblings) {
+ for (TraceTypeHelper peer : siblings) {
final boolean peerChecked = fTreeView.getChecked(peer);
if (peerChecked != isFirstChecked) {
allSame = false;
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TraceTypeContentProvider.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TraceTypeContentProvider.java
index a6f99c7012..8303d77c35 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TraceTypeContentProvider.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TraceTypeContentProvider.java
@@ -77,7 +77,7 @@ public class TraceTypeContentProvider implements ITreeContentProvider {
@Override
public Object getParent(Object element) {
- if (element instanceof String) {
+ if (element instanceof TraceTypeHelper) {
for (String key : fTraceCategory) {
List<TraceTypeHelper> traceSet = fTraceType.get(key);
if (traceSet != null) {

Back to the top