Bug 463480 - [Include Browser] Add Expand all, Collapse all
Change-Id: I00d6ca764fa1ecb408d8786f6a49d8d81a735ea7 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Before Width: | Height: | Size: 157 B |
BIN
core/org.eclipse.cdt.ui/icons/dlcl16/collapseall.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
core/org.eclipse.cdt.ui/icons/dlcl16/collapseall@2x.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
core/org.eclipse.cdt.ui/icons/dlcl16/expandall.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
core/org.eclipse.cdt.ui/icons/dlcl16/expandall@2x.png
Normal file
After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 157 B |
BIN
core/org.eclipse.cdt.ui/icons/elcl16/collapseall.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
core/org.eclipse.cdt.ui/icons/elcl16/collapseall@2x.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
core/org.eclipse.cdt.ui/icons/elcl16/expandall.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
core/org.eclipse.cdt.ui/icons/elcl16/expandall@2x.png
Normal file
After Width: | Height: | Size: 422 B |
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2013 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2015 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -14,6 +14,7 @@
|
|||
* Dmitry Kozlov (CodeSourcery)
|
||||
* Tomasz Wesolowski
|
||||
* Andrew Gvozdev (Quoin Inc.) - moved usage involving registry to CDTSharedImages
|
||||
* Marc-Andre Laperle (Ericsson)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui;
|
||||
|
||||
|
@ -298,7 +299,8 @@ public class CPluginImages {
|
|||
public static final String IMG_MENU_GROUP_INCLUDE= NAME_PREFIX + "group_include.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_MENU_SEGMENT_EDIT= NAME_PREFIX + "segment_edit.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_MENU_CODE_ASSIST= NAME_PREFIX + "metharg_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_MENU_COLLAPSE_ALL= NAME_PREFIX + "collapseall.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_MENU_COLLAPSE_ALL= NAME_PREFIX + "collapseall.png"; //$NON-NLS-1$
|
||||
public static final String IMG_MENU_EXPAND_ALL= NAME_PREFIX + "expandall.png"; //$NON-NLS-1$
|
||||
public static final String IMG_CLEAR_CONSOLE= NAME_PREFIX + "clear_co.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_SCROLL_LOCK= NAME_PREFIX + "lock_co.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_ALPHA_SORTING= NAME_PREFIX + "alphab_sort_co.gif"; //$NON-NLS-1$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2015 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -10,6 +10,7 @@
|
|||
* QNX Software System
|
||||
* Anton Leherbauer (Wind River Systems)
|
||||
* Sergey Prigogin (Google)
|
||||
* Marc-Andre Laperle (Ericsson)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui;
|
||||
|
||||
|
@ -104,6 +105,7 @@ public interface ICHelpContextIds {
|
|||
public static final String TOGGLE_TEXTHOVER_ACTION = PREFIX + "toggle_texthover_action_context"; //$NON-NLS-1$
|
||||
|
||||
public static final String COLLAPSE_ALL_ACTION = PREFIX + "collapse_all_action"; //$NON-NLS-1$
|
||||
public static final String EXPAND_ALL_ACTION = PREFIX + "expand_all_action"; //$NON-NLS-1$
|
||||
|
||||
public static final String C_SEARCH_PAGE = PREFIX + "cdt_u_search"; //$NON-NLS-1$
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2001, 2013 IBM Corporation and others.
|
||||
* Copyright (c) 2001, 2015 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -8,6 +8,7 @@
|
|||
* Contributors:
|
||||
* Rational Software - initial implementation
|
||||
* Sergey Prigogin (Google)
|
||||
* Marc-Andre Laperle (Ericsson)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.actions;
|
||||
|
||||
|
@ -95,6 +96,9 @@ public class ActionMessages extends NLS {
|
|||
public static String CollapseAllAction_label;
|
||||
public static String CollapseAllAction_tooltip;
|
||||
public static String CollapseAllAction_description;
|
||||
public static String ExpandAllAction_label;
|
||||
public static String ExpandAllAction_tooltip;
|
||||
public static String ExpandAllAction_description;
|
||||
|
||||
static {
|
||||
// Initialize resource bundle.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2000, 2013 IBM Corporation and others.
|
||||
# Copyright (c) 2000, 2015 IBM Corporation and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
|
@ -10,6 +10,7 @@
|
|||
# Anton Leherbauer (Wind River Systems)
|
||||
# Axel Mueller - [289339] Surround with
|
||||
# Sergey Prigogin (Google)
|
||||
# Marc-Andre Laperle (Ericsson)
|
||||
###############################################################################
|
||||
|
||||
SourceMenu_label=Source
|
||||
|
@ -115,3 +116,7 @@ FormatAllAction_noundo_message='Undo' is not supported by this operation. Do you
|
|||
CollapseAllAction_label=Collapse All
|
||||
CollapseAllAction_tooltip=Collapse All
|
||||
CollapseAllAction_description=Collapse All
|
||||
|
||||
ExpandAllAction_label=Expand All
|
||||
ExpandAllAction_tooltip=Expand All
|
||||
ExpandAllAction_description=Expand All
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Marc-Andre Laperle (Ericsson) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.actions;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
|
||||
/**
|
||||
* Expand all nodes.
|
||||
*/
|
||||
public class ExpandAllAction extends Action {
|
||||
|
||||
private final TreeViewer fViewer;
|
||||
|
||||
public ExpandAllAction(TreeViewer viewer) {
|
||||
super(ActionMessages.ExpandAllAction_label);
|
||||
setDescription(ActionMessages.ExpandAllAction_description);
|
||||
setToolTipText(ActionMessages.ExpandAllAction_tooltip);
|
||||
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_EXPAND_ALL);
|
||||
fViewer = viewer;
|
||||
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.EXPAND_ALL_ACTION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
fViewer.getControl().setRedraw(false);
|
||||
fViewer.expandAll();
|
||||
} finally {
|
||||
fViewer.getControl().setRedraw(true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
* Markus Schorn - initial API and implementation
|
||||
* Ed Swartz (Nokia)
|
||||
* Martin Oberhuber (Wind River) - bug 398195: consider external API in IB
|
||||
* Marc-Andre Laperle (Ericsson)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.includebrowser;
|
||||
|
||||
|
@ -101,7 +102,9 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
|||
|
||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
import org.eclipse.cdt.internal.ui.actions.CollapseAllAction;
|
||||
import org.eclipse.cdt.internal.ui.actions.CopyTreeAction;
|
||||
import org.eclipse.cdt.internal.ui.actions.ExpandAllAction;
|
||||
import org.eclipse.cdt.internal.ui.navigator.OpenCElementAction;
|
||||
import org.eclipse.cdt.internal.ui.util.Messages;
|
||||
import org.eclipse.cdt.internal.ui.viewsupport.EditorOpener;
|
||||
|
@ -627,6 +630,8 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
|
|||
CPluginImages.setImageDescriptors(fRefreshAction, CPluginImages.T_LCL, CPluginImages.IMG_REFRESH);
|
||||
|
||||
fHistoryAction= new IBHistoryDropDownAction(this);
|
||||
ExpandAllAction expandAll = new ExpandAllAction(getTreeViewer());
|
||||
CollapseAllAction collapseAll = new CollapseAllAction(getTreeViewer());
|
||||
|
||||
fCopyAction= new CopyCallHierarchyAction(this, fTreeViewer);
|
||||
fRemoveFromViewAction= new IBRemoveFromView(this);
|
||||
|
@ -647,6 +652,9 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
|
|||
tm.add(fNextAction);
|
||||
tm.add(fPreviousAction);
|
||||
tm.add(new Separator());
|
||||
tm.add(expandAll);
|
||||
tm.add(collapseAll);
|
||||
tm.add(new Separator());
|
||||
tm.add(fFilterSystemAction);
|
||||
tm.add(fFilterInactiveAction);
|
||||
tm.add(new Separator());
|
||||
|
|