diff --git a/bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/filteredtree/FilteredTree.java b/bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/filteredtree/FilteredTree.java index dab531baaaf..0fbff270da2 100644 --- a/bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/filteredtree/FilteredTree.java +++ b/bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/filteredtree/FilteredTree.java @@ -259,10 +259,15 @@ public IStatus runInUIThread(IProgressMonitor monitor) { int treeHeight = getViewer().getTree().getBounds().height; int numVisibleItems = treeHeight / getViewer().getTree().getItemHeight(); long stopTime = SOFT_MAX_EXPAND_TIME + System.currentTimeMillis(); + + updateToolbar(true); + if (items.length > 0 && recursiveExpand(items, monitor, stopTime, new int[] { numVisibleItems })) { return Status.CANCEL_STATUS; } + } else { + updateToolbar(false); } } finally { // done updating the tree - set redraw back to true @@ -310,10 +315,6 @@ private boolean recursiveExpand(TreeItem[] items, IProgressMonitor monitor, long }; } - /** - * @deprecated As of 4.13 not used anymore - */ - @Deprecated(since = "2025-03", forRemoval = true) protected void updateToolbar(boolean visible) { // nothing to do } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/FilteredTree.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/FilteredTree.java index f41a283ee63..092fb0f038b 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/FilteredTree.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/FilteredTree.java @@ -430,10 +430,15 @@ public IStatus runInUIThread(IProgressMonitor monitor) { int treeHeight = getViewer().getTree().getBounds().height; int numVisibleItems = treeHeight / getViewer().getTree().getItemHeight(); long stopTime = SOFT_MAX_EXPAND_TIME + System.currentTimeMillis(); + + updateToolbar(true); + if (items.length > 0 && recursiveExpand(items, monitor, stopTime, new int[] { numVisibleItems })) { return Status.CANCEL_STATUS; } + } else { + updateToolbar(false); } } finally { // done updating the tree - set redraw back to true @@ -488,9 +493,7 @@ private boolean recursiveExpand(TreeItem[] items, IProgressMonitor monitor, long * override. * * @param visible boolean - * @deprecated As of 4.13 not used anymore */ - @Deprecated(since = "2025-03", forRemoval = true) protected void updateToolbar(boolean visible) { // nothing to do }