diff options
2 files changed, 6 insertions, 21 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java index 17d0410da5..715917352f 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java @@ -86,16 +86,9 @@ public class OprofileEventConfigTab extends AbstractLaunchConfigurationTab { * @param parent the parent composite */ public void createControl(Composite parent) { - Composite top; - - if(parent.getChildren().length > 0){ - top = (Composite) parent.getChildren()[0]; - } else { - top = new Composite(parent, SWT.NONE); - setControl(top); - top.setLayout(new GridLayout()); - } - + Composite top = new Composite(parent, SWT.NONE); + setControl(top); + top.setLayout(new GridLayout()); this.top = top; } /** diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java index 7e54ba515e..8930adeeef 100644 --- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java +++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java @@ -68,18 +68,10 @@ public class PerfEventsTab extends AbstractLaunchConfigurationTab { //Function adapted from org.eclipse.linuxtools.oprofile.launch.configuration.OprofileSetupTab.java @Override public void createControl(Composite parent) { - Composite top; - - if(parent.getChildren().length > 0){ - top = (Composite) parent.getChildren()[0]; - } else { - top = new Composite(parent, SWT.NONE); - setControl(top); - top.setLayout(new GridLayout()); - } - + Composite top = new Composite(parent, SWT.NONE); + setControl(top); + top.setLayout(new GridLayout()); this.top = top; - } private void createEventTabs(Composite top, ILaunchConfiguration config){ |