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 99100 Details for
Bug 169633
[Sync View] Add 'expand all' toolbar icon to the synchronize view
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 resolving the issue
expand_collapse.patch (text/plain), 6.96 KB, created by
Alexei Goncharov
on 2008-05-07 11:20:55 EDT
(
hide
)
Description:
Patch resolving the issue
Filename:
MIME Type:
Creator:
Alexei Goncharov
Created:
2008-05-07 11:20:55 EDT
Size:
6.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui(head) >Index: src/org/eclipse/team/internal/ui/actions/actions.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties,v >retrieving revision 1.14 >diff -u -r1.14 actions.properties >--- src/org/eclipse/team/internal/ui/actions/actions.properties 23 Apr 2007 15:31:17 -0000 1.14 >+++ src/org/eclipse/team/internal/ui/actions/actions.properties 7 May 2008 15:07:56 -0000 >@@ -17,6 +17,11 @@ > action.collapseAll.description=Collapse All > action.collapseAll.image=collapseall.gif > >+action.expandTree.label=E&xpand All >+action.expandTree.tooltip=Expand All >+action.expandTree.description=Expand All >+action.expandTree.image=expandall.gif >+ > action.configureSchedulel.label=&Schedule... > action.configureSchedulel.tooltip=Schedule a Background Synchronization > >Index: src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java,v >retrieving revision 1.11 >diff -u -r1.11 DirectionFilterActionGroup.java >--- src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java 10 Apr 2006 14:03:12 -0000 1.11 >+++ src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java 7 May 2008 15:07:56 -0000 >@@ -17,6 +17,8 @@ > import org.eclipse.jface.action.*; > import org.eclipse.jface.util.IPropertyChangeListener; > import org.eclipse.jface.util.PropertyChangeEvent; >+import org.eclipse.jface.viewers.AbstractTreeViewer; >+import org.eclipse.jface.viewers.Viewer; > import org.eclipse.team.internal.ui.Utils; > import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; > import org.eclipse.ui.IActionBars; >@@ -33,6 +35,9 @@ > // The list of created actions > private List actions = new ArrayList(3); > >+ private Action collapseAll; >+ private Action expandWholeTree; >+ > // The modes > private DirectionFilterAction incomingMode; > private DirectionFilterAction outgoingMode; >@@ -80,6 +85,28 @@ > * Sets up the sync modes and the actions for switching between them. > */ > private void createActions() { >+ final Viewer viewer = configuration.getPage().getViewer(); >+ if (viewer instanceof AbstractTreeViewer) { >+ this.expandWholeTree = new Action() { >+ public void run() { >+ if (viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return; >+ viewer.getControl().setRedraw(false); >+ ((AbstractTreeViewer)viewer).expandAll(); >+ viewer.getControl().setRedraw(true); >+ } >+ }; >+ Utils.initAction(this.expandWholeTree, "action.expandTree."); //$NON-NLS-1$ >+ >+ collapseAll = new Action() { >+ public void run() { >+ if (viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return; >+ viewer.getControl().setRedraw(false); >+ ((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS); >+ viewer.getControl().setRedraw(true); >+ } >+ }; >+ Utils.initAction(collapseAll, "action.collapseAll."); //$NON-NLS-1$ >+ } > // Create the actions > int supportedModes = configuration.getSupportedModes(); > if (supportedModes == 0) return; >@@ -151,6 +178,9 @@ > } > > public void fillToolBar(String groupId, IToolBarManager toolBar) { >+ toolBar.appendToGroup(groupId, this.expandWholeTree); >+ toolBar.appendToGroup(groupId, this.collapseAll); >+ toolBar.appendToGroup(groupId, new Separator()); > for (Iterator it = actions.iterator(); it.hasNext();) { > DirectionFilterAction action = (DirectionFilterAction) it.next(); > toolBar.appendToGroup(groupId, action); >Index: src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java,v >retrieving revision 1.7 >diff -u -r1.7 ExpandAllAction.java >--- src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java 10 May 2006 17:47:28 -0000 1.7 >+++ src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java 7 May 2008 15:07:56 -0000 >@@ -44,6 +44,11 @@ > tree.getControl().setRedraw(true); > } > } >+ else { >+ tree.getControl().setRedraw(false); >+ tree.expandAll(); >+ tree.getControl().setRedraw(true); >+ } > } > /* (non-Javadoc) > * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) >@@ -51,8 +56,6 @@ > public void selectionChanged(SelectionChangedEvent event) { > ISelection selection = event.getSelection(); > if (selection instanceof IStructuredSelection) { >- IStructuredSelection ss = (IStructuredSelection)selection; >- setEnabled(!ss.isEmpty()); > return; > } > setEnabled(false); >Index: src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java,v >retrieving revision 1.5 >diff -u -r1.5 NavigationActionGroup.java >--- src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java 16 Mar 2007 21:03:35 -0000 1.5 >+++ src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java 7 May 2008 15:07:56 -0000 >@@ -26,7 +26,6 @@ > public class NavigationActionGroup extends SynchronizePageActionGroup { > > private ExpandAllAction expandAllAction; >- private Action collapseAll; > private NavigateAction gotoNext; > private NavigateAction gotoPrevious; > >@@ -38,16 +37,6 @@ > expandAllAction = new ExpandAllAction((AbstractTreeViewer) viewer); > Utils.initAction(expandAllAction, "action.expandAll."); //$NON-NLS-1$ > >- collapseAll = new Action() { >- public void run() { >- if (viewer == null || viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return; >- viewer.getControl().setRedraw(false); >- ((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS); >- viewer.getControl().setRedraw(true); >- } >- }; >- Utils.initAction(collapseAll, "action.collapseAll."); //$NON-NLS-1$ >- > ICompareNavigator nav = (ICompareNavigator)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR); > if (nav != null) { > gotoNext = new NavigateAction(configuration, true /*next*/); >@@ -64,6 +53,5 @@ > appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoNext); > if (gotoPrevious != null) > appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoPrevious); >- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, collapseAll); > } > }
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 169633
: 99100 |
99102
|
127827
|
141193