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 148513 Details for
Bug 291016
[Sync View] Replace sync mode buttons with a drop-down
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v01
clipboard.txt (text/plain), 4.45 KB, created by
Tomasz Zarna
on 2009-10-01 06:39:43 EDT
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2009-10-01 06:39:43 EDT
Size:
4.45 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >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 1 Oct 2009 10:37:27 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * Copyright (c) 2000, 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 >@@ -10,25 +10,24 @@ > *******************************************************************************/ > package org.eclipse.team.internal.ui.synchronize.actions; > >-import java.util.ArrayList; >-import java.util.Iterator; >-import java.util.List; >+import java.util.*; > > import org.eclipse.jface.action.*; > import org.eclipse.jface.util.IPropertyChangeListener; > import org.eclipse.jface.util.PropertyChangeEvent; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Menu; > import org.eclipse.team.internal.ui.Utils; > import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; >-import org.eclipse.ui.IActionBars; >-import org.eclipse.ui.actions.ActionGroup; > > /** > * This action group provides radio buttons for each possible direction of synchronization information. The > * modes created by this action group can be configured. The actions directly set the mode of an > * {@link ISynchronizePageConfiguration}. >+ * TODO: no longer an ActionGroup, rename compilation unit > new class > * @since 3.0 > */ >-public class DirectionFilterActionGroup extends ActionGroup implements IPropertyChangeListener { >+public class DirectionFilterActionGroup extends Action/*Group*/ implements IPropertyChangeListener, IMenuCreator { > > // The list of created actions > private List actions = new ArrayList(3); >@@ -74,6 +73,7 @@ > createActions(); > configuration.addPropertyChangeListener(this); > checkMode(configuration.getMode()); >+ setMenuCreator(this); > } > > /** >@@ -134,27 +134,8 @@ > return 0; > } > >- /* (non-Javadoc) >- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars) >- */ >- public void fillActionBars(IActionBars actionBars, String group) { >- super.fillActionBars(actionBars); >- IToolBarManager toolBar = actionBars.getToolBarManager(); >- for (Iterator it = actions.iterator(); it.hasNext();) { >- DirectionFilterAction action = (DirectionFilterAction) it.next(); >- if(group != null) { >- toolBar.appendToGroup(group, action); >- } else { >- toolBar.add(action); >- } >- } >- } >- > public void fillToolBar(String groupId, IToolBarManager toolBar) { >- for (Iterator it = actions.iterator(); it.hasNext();) { >- DirectionFilterAction action = (DirectionFilterAction) it.next(); >- toolBar.appendToGroup(groupId, action); >- } >+ toolBar.appendToGroup(groupId, this); > } > > public void fillMenu(IContributionManager manager) { >@@ -169,6 +150,9 @@ > DirectionFilterAction action = (DirectionFilterAction)it.next(); > if(action.getModeId() == mode) { > action.setChecked(true); >+ setText(action.getText()); >+ setImageDescriptor(action.getImageDescriptor()); >+ setToolTipText(action.getToolTipText()); > } else { > action.setChecked(false); > } >@@ -186,9 +170,23 @@ > } > > /* (non-Javadoc) >- * @see org.eclipse.ui.actions.ActionGroup#dispose() >+ * @see org.eclipse.jface.action.IMenuCreator#dispose() > */ > public void dispose() { >- super.dispose(); >+ // nothing to do >+ } >+ >+ public Menu getMenu(Control parent) { >+ Menu menu= new Menu(parent); >+ for (Iterator iterator = actions.iterator(); iterator.hasNext();) { >+ Action action = (Action) iterator.next(); >+ ActionContributionItem item= new ActionContributionItem(action); >+ item.fill(menu, -1); >+ } >+ return menu; >+ } >+ >+ public Menu getMenu(Menu parent) { >+ return 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 291016
: 148513