Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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();
}

Expand Down
Loading