diff --git a/bundles/org.eclipse.ui.navigator/plugin.xml b/bundles/org.eclipse.ui.navigator/plugin.xml index af55b54c8108..f99ac6e37865 100644 --- a/bundles/org.eclipse.ui.navigator/plugin.xml +++ b/bundles/org.eclipse.ui.navigator/plugin.xml @@ -13,5 +13,16 @@ id="org.eclipse.ui.navigator.PluginDropAction"> - + + + + + + + + + diff --git a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorSelectAllHandler.java b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorSelectAllHandler.java new file mode 100644 index 000000000000..a103fb881d2d --- /dev/null +++ b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorSelectAllHandler.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2003, 2026 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.ui.navigator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * CommonNavigatorSelectAllHandler is the handler for the select all action. + * + * @since 3.14 + * + */ +public class CommonNavigatorSelectAllHandler extends AbstractHandler { + @Override + public Object execute(ExecutionEvent event) { + IWorkbenchPart part = HandlerUtil.getActivePart(event); + if (part instanceof CommonNavigator navigator) { + navigator.getCommonViewer().getTree().selectAll(); + } + return null; + } +}