Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 148450 Details for
Bug 225036
[GlobalActions] Expand All / Collapse All global retargetable actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch v01
ExpandAll 01.txt (text/plain), 6.48 KB, created by
Prakash Rangaraj
on 2009-09-30 13:33:56 EDT
(
hide
)
Description:
Patch v01
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2009-09-30 13:33:56 EDT
Size:
6.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui/plugin.properties,v >retrieving revision 1.221 >diff -u -r1.221 plugin.properties >--- plugin.properties 8 Sep 2009 18:56:22 -0000 1.221 >+++ plugin.properties 30 Sep 2009 17:29:39 -0000 >@@ -336,6 +336,8 @@ > > command.collapseAll.description = Collapse the current tree > command.collapseAll.name = Collapse All >+command.expandAll.description = Expand the current tree >+command.expandAll.name = Expand All > command.quickMenu.name = Open Quick Menu > command.quickMenu.uri.name = Location URI > command.showIn.name = Show In >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui/plugin.xml,v >retrieving revision 1.446 >diff -u -r1.446 plugin.xml >--- plugin.xml 8 Sep 2009 18:56:22 -0000 1.446 >+++ plugin.xml 30 Sep 2009 17:29:42 -0000 >@@ -636,6 +636,12 @@ > sequence="M1+M2+NUMPAD_DIVIDE"> > </key> > <key >+ commandId="org.eclipse.ui.navigate.expandAll" >+ contextId="org.eclipse.ui.contexts.window" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" >+ sequence="M1+M2+NUMPAD_MULTIPLY"> >+ </key> >+ <key > commandId="org.eclipse.ui.navigate.nextSubTab" > contextId="org.eclipse.ui.contexts.dialogAndWindow" > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" >@@ -1205,6 +1211,12 @@ > values="org.eclipse.ui.internal.registry.ViewParameterValues"> > </commandParameter> > </command> >+ <command >+ categoryId="org.eclipse.ui.category.navigate" >+ description="%command.expandAll.description" >+ id="org.eclipse.ui.navigate.expandAll" >+ name="%command.expandAll.name"> >+ </command> > </extension> > > <extension >@@ -1269,6 +1281,11 @@ > icon="$nl$/icons/full/elcl16/collapseall.gif"> > </image> > <image >+ commandId="org.eclipse.ui.navigate.expandAll" >+ disabledIcon="$nl$/icons/full/dlcl16/expandall.gif" >+ icon="$nl$/icons/full/elcl16/expandall.gif"> >+ </image> >+ <image > commandId="org.eclipse.ui.newWizard" > disabledIcon="$nl$/icons/full/dtool16/new_wiz.gif" > icon="$nl$/icons/full/etool16/new_wiz.gif"> >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java,v >retrieving revision 1.9 >diff -u -r1.9 IWorkbenchCommandConstants.java >--- Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 1 Apr 2009 16:14:54 -0000 1.9 >+++ Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 30 Sep 2009 17:29:46 -0000 >@@ -272,10 +272,18 @@ > */ > public static final String NAVIGATE_COLLAPSE_ALL = "org.eclipse.ui.navigate.collapseAll"; //$NON-NLS-1$ > >- /** >- * Id for command "Show In" in category "Navigate" >- * (value is <code>"org.eclipse.ui.navigate.showIn"</code>). >- */ >+ /** >+ * Id for command "Expand All" in category "Navigate" (value is >+ * <code>"org.eclipse.ui.navigate.expandAll"</code>). >+ * >+ * @since 3.6 >+ */ >+ public static final String NAVIGATE_EXPAND_ALL = "org.eclipse.ui.navigate.expandAll"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Show In" in category "Navigate" (value is >+ * <code>"org.eclipse.ui.navigate.showIn"</code>). >+ */ > public static final String NAVIGATE_SHOW_IN = "org.eclipse.ui.navigate.showIn"; //$NON-NLS-1$ > > /** >Index: Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java >=================================================================== >RCS file: Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java >diff -N Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,80 @@ >+/******************************************************************************* >+ * Copyright (c) 2008, 2009 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ * >+ * @author Prakash G. R. >+ ******************************************************************************/ >+ >+package org.eclipse.ui.handlers; >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.runtime.Assert; >+import org.eclipse.jface.viewers.AbstractTreeViewer; >+import org.eclipse.ui.IWorkbenchCommandConstants; >+ >+/** >+ * Expand a tree viewer. >+ * <p> >+ * It can be used in a part's createPartControl(Composite) method: >+ * >+ * <pre> >+ * IHandlerService handlerService = (IHandlerService) getSite().getService( >+ * IHandlerService.class); >+ * expandHandler = new ExpandAllHandler(myViewer); >+ * handlerService.activateHandler(ExpandAllHandler.COMMAND_ID, expandHandler); >+ * </pre> >+ * >+ * The part should dispose the handler in its own dispose() method. The part can >+ * provide its own expand all handler if desired, or if it needs to delegate to >+ * multiple tree viewers. >+ * </p> >+ * <p> >+ * <b>Note</b>: This class can be instantiated. It should not be subclasses. >+ * </p> >+ * >+ * @since 3.6 >+ */ >+public class ExpandAllHandler extends AbstractHandler { >+ /** >+ * The command id for collapse all. >+ */ >+ public static final String COMMAND_ID = IWorkbenchCommandConstants.NAVIGATE_EXPAND_ALL; >+ >+ private AbstractTreeViewer treeViewer; >+ >+ /** >+ * Create the handler for this tree viewer. >+ * >+ * @param viewer >+ * The viewer to expand. Must not be <code>null</code>. >+ */ >+ public ExpandAllHandler(AbstractTreeViewer viewer) { >+ Assert.isNotNull(viewer); >+ treeViewer = viewer; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) >+ */ >+ public Object execute(ExecutionEvent event) { >+ treeViewer.expandAll(); >+ return null; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.core.commands.AbstractHandler#dispose() >+ */ >+ public void dispose() { >+ treeViewer = null; >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225036
: 148450