Skip to content

Commit

Permalink
Remove special flattening-behavior for Wizard content providers
Browse files Browse the repository at this point in the history
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 eclipse-platform#2602
for context.
  • Loading branch information
ptziegler authored and vogella committed Dec 10, 2024
1 parent 5c65cbc commit d58c50e
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public Object[] getChildren(Object parentElement) {
handleChild(childWizard, list);
}

// flatten lists with only one category
if (list.size() == 1 && list.get(0) instanceof WizardCollectionElement) {
return getChildren(list.get(0));
}

return list.toArray();
} else if (parentElement instanceof AdaptableList) {
AdaptableList aList = (AdaptableList) parentElement;
Expand All @@ -59,10 +54,6 @@ public Object[] getChildren(Object parentElement) {
for (Object element : children) {
handleChild(element, list);
}
// if there is only one category, return it's children directly (flatten list)
if (list.size() == 1 && list.get(0) instanceof WizardCollectionElement) {
return getChildren(list.get(0));
}

return list.toArray();
} else {
Expand Down

0 comments on commit d58c50e

Please sign in to comment.