Skip to content

Commit d58c50e

Browse files
ptzieglervogella
authored andcommitted
Remove special flattening-behavior for Wizard content providers
This removes the feature from the "New" and "Import/Export" wizards, where container for wizard elements would be flattened, if it only contains a single, other container. There are two reasons for this change: - it is not consistent with the other viewers, that always show the complete tree path (e.g. the preference dialog). - it doesn't work properly, as it is still possible to produce the undesirable behavior in the "New" wizard (for e.g. Java/JUnit/...) See #2602 for context.
1 parent 5c65cbc commit d58c50e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/WizardContentProvider.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ public Object[] getChildren(Object parentElement) {
4646
handleChild(childWizard, list);
4747
}
4848

49-
// flatten lists with only one category
50-
if (list.size() == 1 && list.get(0) instanceof WizardCollectionElement) {
51-
return getChildren(list.get(0));
52-
}
53-
5449
return list.toArray();
5550
} else if (parentElement instanceof AdaptableList) {
5651
AdaptableList aList = (AdaptableList) parentElement;
@@ -59,10 +54,6 @@ public Object[] getChildren(Object parentElement) {
5954
for (Object element : children) {
6055
handleChild(element, list);
6156
}
62-
// if there is only one category, return it's children directly (flatten list)
63-
if (list.size() == 1 && list.get(0) instanceof WizardCollectionElement) {
64-
return getChildren(list.get(0));
65-
}
6657

6758
return list.toArray();
6859
} else {

0 commit comments

Comments
 (0)