diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java index 2484ce4dbfa..e8e5d4a4ed5 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2021 IBM Corporation and others. + * Copyright (c) 2000, 2026 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -92,6 +92,7 @@ import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.program.Program; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Tree; @@ -107,6 +108,8 @@ import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.actions.ContributionItemFactory; +import org.eclipse.ui.dialogs.FilteredTree; +import org.eclipse.ui.dialogs.PatternFilter; import org.eclipse.ui.ide.FileStoreEditorInput; import org.eclipse.ui.keys.IBindingService; import org.eclipse.ui.part.DrillDownAdapter; @@ -125,6 +128,7 @@ public class PluginsView extends ViewPart implements IPluginModelListener { private static final String HIDE_WRKSPC = "hideWorkspace"; //$NON-NLS-1$ private static final String HIDE_EXENABLED = "hideEnabledExternal"; //$NON-NLS-1$ private static final String SHOW_EXDISABLED = "showDisabledExternal"; //$NON-NLS-1$ + private FilteredTree fFilteredTree; private TreeViewer fTreeViewer; private DrillDownAdapter fDrillDownAdapter; private final IPropertyChangeListener fPropertyListener; @@ -228,7 +232,8 @@ public void dispose() { @Override public void createPartControl(Composite parent) { - fTreeViewer = new TreeViewer(parent, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); + fFilteredTree = new FilteredTree(parent, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL, new PatternFilter(), true, true); + fTreeViewer = fFilteredTree.getViewer(); fTreeViewer.setUseHashlookup(true); fDrillDownAdapter = new DrillDownAdapter(fTreeViewer); fTreeViewer.setContentProvider(new PluginsContentProvider(this)); @@ -834,6 +839,13 @@ private void hookDoubleClickAction() { @Override public void setFocus() { + if (fFilteredTree != null) { + Control c = fFilteredTree.getFilterControl(); + if (c != null && !c.isFocusControl()) { + c.setFocus(); + return; + } + } fTreeViewer.getTree().setFocus(); }