Skip to content

Commit a316e72

Browse files
nburnwal09noopur2507
authored andcommitted
Add button to expand all extension points
1 parent 88552db commit a316e72

File tree

6 files changed

+386
-1
lines changed

6 files changed

+386
-1
lines changed
Lines changed: 334 additions & 0 deletions
Loading

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEPluginImages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ public class PDEPluginImages {
238238
public static final ImageDescriptor DESC_HORIZONTAL = create(PATH_LCL, "th_horizontal.svg"); //$NON-NLS-1$
239239
public static final ImageDescriptor DESC_VERTICAL = create(PATH_LCL, "th_vertical.svg"); //$NON-NLS-1$
240240
public static final ImageDescriptor DESC_COLLAPSE_ALL = create(PATH_LCL, "collapseall.svg"); //$NON-NLS-1$
241+
public static final ImageDescriptor DESC_EXPAND_ALL = create(PATH_LCL, "expandall.svg"); //$NON-NLS-1$
241242
public static final ImageDescriptor DESC_COLLAPSE_ALL_MINI = create(PATH_LCL, "collapse_all_mini.svg"); //$NON-NLS-1$
242243
public static final ImageDescriptor DESC_TOGGLE_EXPAND_STATE = create(PATH_LCL, "toggle_expand_state.svg"); //$NON-NLS-1$
243244
public static final ImageDescriptor DESC_HELP = create(PATH_LCL, "help.svg"); //$NON-NLS-1$

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,7 @@ public class PDEUIMessages extends NLS {
13981398
public static String JavaAttributeWizard_wtitle;
13991399

14001400
public static String ExtensionsPage_collapseAll;
1401+
public static String ExtensionsPage_expandAll;
14011402
public static String ExtensionPointDetails_title;
14021403
public static String ExtensionPointDetails_desc;
14031404
public static String ExtensionPointDetails_id;
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2026 IBM Corporation and others.
3+
*
4+
* This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License 2.0
6+
* which accompanies this distribution, and is available at
7+
* https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*
11+
* Contributors:
12+
* IBM Corporation - initial API and implementation
13+
*******************************************************************************/
14+
package org.eclipse.pde.internal.ui.editor.actions;
15+
16+
import org.eclipse.jface.action.Action;
17+
import org.eclipse.jface.action.IAction;
18+
import org.eclipse.jface.viewers.AbstractTreeViewer;
19+
import org.eclipse.pde.internal.ui.PDEPluginImages;
20+
21+
public class ExpandAllAction extends Action {
22+
private AbstractTreeViewer fTreeViewer;
23+
24+
public ExpandAllAction(AbstractTreeViewer viewer, String tooltipText) {
25+
super(tooltipText, IAction.AS_PUSH_BUTTON);
26+
initialize(viewer, tooltipText);
27+
}
28+
29+
private void initialize(AbstractTreeViewer viewer, String tooltipText) {
30+
setToolTipText(tooltipText);
31+
setImageDescriptor(PDEPluginImages.DESC_EXPAND_ALL);
32+
fTreeViewer = viewer;
33+
}
34+
35+
@Override
36+
public void run() {
37+
38+
if (fTreeViewer == null) {
39+
return;
40+
}
41+
fTreeViewer.expandAll();
42+
}
43+
44+
}

0 commit comments

Comments
 (0)