Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 306173

Summary: Commit, Apply Patch and Synchronize no longer take keybindings
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: TeamAssignee: Tomasz Zarna <tomasz.zarna>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse-bugs, heekyu83, hunter, igor.burilo, jacek.pospychala, john.arthorne, markus.kell.r, michael.pellaton, misja.alma, m_zieba, pawel.pogorzelski1, pd, silver.zachara, sloppydrive, steffen.pingel, steven, Szymon.Brandys, techno.scavenger, tomasz.zarna, torok, voidstar, wwu
Version: 3.6   
Target Milestone: 3.7 M1   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 316283, 316875    
Attachments:
Description Flags
Fix v01
none
mylyn/context/zip
none
Fix v02
none
Fix v03 none

Description Paul Webster CLA 2010-03-17 08:05:43 EDT
The fix for bug 300526 means that objectContribution will not execute from keybindings.  We spot-fixed Show Annotations and Show History so they will work without having to activate the actionSet in bug 303784, but other bindings like Commit or Apply Patch don't work.

Other bindings (from attachment (id=161870) ) that probably used to work but no longer do:

org.eclipse.team.ccvs.ui.IFileContributions
  org.eclipse.team.cvs.ui.compareWithRevision
    command: org.eclipse.team.cvs.ui.compareWithRevision
org.eclipse.team.ccvs.ui.IFileContributions
  org.eclipse.team.cvs.ui.replaceWithRevision
    command: org.eclipse.team.cvs.ui.replaceWithRevision
org.eclipse.team.ui.ResourceContributions
  org.eclipse.team.ui.applyPatch
    command: org.eclipse.team.ui.applyPatch


There is also a set under ResourceMappings that may have worked (since the TeamAction does ResourceMapping translations itself), like:

org.eclipse.team.ccvs.ui.ResourceMapperContributions
  org.eclipse.team.ccvs.ui.commit
    command: org.eclipse.team.cvs.ui.commit

If Team wants these actions to be available for keybindings, then the setEnabled(*) and updateSelection(*) methods should be moved down into TeamAction (which extends AbstractHandler, IIRC).  They'll become available to any of the team actions which can then be used as default handlers where appropriate.

PW
Comment 1 Pawel Pogorzelski CLA 2010-03-30 09:28:10 EDT
*** Bug 307521 has been marked as a duplicate of this bug. ***
Comment 2 Tomasz Zarna CLA 2010-05-14 08:26:04 EDT
*** Bug 312235 has been marked as a duplicate of this bug. ***
Comment 3 Tomasz Zarna CLA 2010-05-14 08:28:04 EDT
(In reply to comment #2)
> *** Bug 312235 has been marked as a duplicate of this bug. ***

This bug reports that "Synchronize with Repository" doesn't work.
Comment 4 Tomasz Zarna CLA 2010-05-26 03:39:33 EDT
*** Bug 314214 has been marked as a duplicate of this bug. ***
Comment 5 Michael Pellaton CLA 2010-05-26 05:10:51 EDT
Bug 313621 should be marked as duplicate of this bug too. Unfortunately, I cannot do that...

thx!
Comment 6 Tomasz Zarna CLA 2010-05-26 05:23:42 EDT
*** Bug 313621 has been marked as a duplicate of this bug. ***
Comment 7 Tomasz Zarna CLA 2010-05-26 05:37:15 EDT
I've just added the bug to Workspace 3.7 Development Plan draft[1], which means this can end up in the official 3.7 component plan. From my point of view, it is a good candidate for backporting to 3.6.1.

[1] http://wiki.eclipse.org/Workspace3.7
Comment 8 Steven Dick CLA 2010-06-09 03:52:53 EDT
Since this is breaking existing functionality, won't this be considered for 3.6?  Hearing that it's planned for 3.7 and might be considered for 3.6.1 is disappointing, to say the least.
Comment 9 Tomasz Zarna CLA 2010-06-09 07:12:58 EDT
Created attachment 171507 [details]
Fix v01

Fix for broken actions mentioned on this bug and for other team actions from attachment 161870 [details] (e.g. Update, Merge, Branch...).
Comment 10 Tomasz Zarna CLA 2010-06-09 07:13:02 EDT
Created attachment 171508 [details]
mylyn/context/zip
Comment 11 Tomasz Zarna CLA 2010-06-09 07:33:48 EDT
Created attachment 171512 [details]
Fix v02

Fixed careless use of abstract action classes as default handlers: TagAction and ReplaceWithTagAction.
Comment 12 Pawel Pogorzelski CLA 2010-06-09 08:46:05 EDT
(In reply to comment #11)
> Created an attachment (id=171512) [details]
> Fix v02

I've done some testing. The fix restores state from 3.5 release.
Comment 13 Tomasz Zarna CLA 2010-06-09 08:54:45 EDT
Created attachment 171521 [details]
Fix v03

Removed fix for "Revert to Base" action. There was no way to assign a keybinding to the action, so the fact it doesn't work now is not a regression -- see bug 316283.
Comment 14 Szymon Brandys CLA 2010-06-09 09:30:09 EDT
(In reply to comment #8)
> Since this is breaking existing functionality, won't this be considered for
> 3.6?  Hearing that it's planned for 3.7 and might be considered for 3.6.1 is
> disappointing, to say the least.

Steven, I agree that this is an annoying regression. It is too late to fix the issue in 3.6, however it will be addressed for sure in 3.6.1 to be released in September. I hope that the problem will not be affecting you badly till that time.

Thanks for the reminder and sorry for the inconvenience.
Comment 15 John Arthorne CLA 2010-06-09 09:35:58 EDT
I just wanted to mention a workaround for those using 3.6: for "Apply Patch", if you have the patch in your clipboard, you can just paste (Ctrl+V) into the package explorer. It will recognize the clipboard contains a patch and open the apply path wizard. Very handy for the common case of grabbing patches from bugzilla to apply in your workspace.
Comment 16 Markus Keller CLA 2010-06-11 10:03:59 EDT
Another workaround for 3.6:
- Window > Customize Perspective... > Command Groups Availability
  - for "Apply Patch", check the "Team" group
  - for "Commit", check the "CVS" group

This needs to be done for each perspective you use. It adds actions for these commands to the menu bar, and that makes the shortcuts work again.
Comment 17 Tomasz Zarna CLA 2010-06-15 05:39:36 EDT
I created bug 316876 for backporting fix for this bug to Eclipse 3.6.1.
Comment 18 Tomasz Zarna CLA 2010-06-23 10:53:30 EDT
(In reply to comment #17)
> I created bug 316876 for backporting fix for this bug to Eclipse 3.6.1.

I meant bug 316875, sorry.
Comment 19 Tomasz Zarna CLA 2010-06-28 06:20:44 EDT
The latest patch has been applied to HEAD, available in builds >20100627. Paul, thanks for the tip how to fix this.

As soon as the fix gets verified we will backport it to 3.6.1 (fix bug 316875).
Comment 20 mateu CLA 2010-07-08 15:08:45 EDT
(In reply to comment #16)
> Another workaround for 3.6:
> - Window > Customize Perspective... > Command Groups Availability
>   - for "Apply Patch", check the "Team" group
>   - for "Commit", check the "CVS" group
> 
> This needs to be done for each perspective you use. It adds actions for these
> commands to the menu bar, and that makes the shortcuts work again.


This worked for me and SVN key shortcuts by adding SVN to the perspective.
Comment 21 Piotr Dobrogost CLA 2010-07-16 13:16:13 EDT
(In reply to comment #16)
> Another workaround for 3.6:
> - Window > Customize Perspective... > Command Groups Availability
>   - for "Apply Patch", check the "Team" group
>   - for "Commit", check the "CVS" group
> 
> This needs to be done for each perspective you use. It adds actions for these
> commands to the menu bar, and that makes the shortcuts work again.

I have key bindings for the following cvs tasks;
- Synchronize with Repository
- Commit,
- Update,
- Tag as Version,
- Show Annotation
- Show History

After adding 'CVS' command group to 'Team Synchronizing' perspective all but one of the above started to work. The only one still broker is 'Synchronize with Repository'. I guess its because the one shown in 'CVS' command group is really 'Repeat last synchronization' from 'Team' command group and not 'Synchronize with Repository' from the 'CVS' command group. I found this out by clicking 'No <key bindings>' link in the tooltip in 'Menubar details' in 'Customize Perspective' window.

I think that's a bug.
Comment 22 Tomasz Zarna CLA 2010-07-19 08:38:42 EDT
Please note that starting from builds later than 20100627 the CVS keybindings should work without need to use the workaround suggested in comment 16.

I'm running I20100713-0800 and when I bounded both commands ("Synchronize with Repository" and "Synchronize...") they work fine to me. The first one syncs selected project(s) and the later opens the Synchronize wizard which let me start a new synchronization. I've never used the "Repeat last sync" action before, but when bounded, it seems to be working fine as well. Nevertheless, I must admit that the naming used in "CVS" command group for the sync action is confusing (wrong?), but I guess this is a separate issue not related to keybindings. Please open a bug for it.
Comment 23 Piotr Dobrogost CLA 2010-07-19 12:03:18 EDT
(In reply to comment #22)
> Please note that starting from builds later than 20100627 the CVS keybindings
> should work without need to use the workaround suggested in comment 16.

How can I get the latest build?
 
> before, but when bounded, it seems to be working fine as well. Nevertheless, I
> must admit that the naming used in "CVS" command group for the sync action is
> confusing (wrong?), but I guess this is a separate issue not related to
> keybindings. Please open a bug for it.

I opened bug 320291 for it.
Comment 24 Tomasz Zarna CLA 2010-07-19 12:17:52 EDT
(In reply to comment #23)
> How can I get the latest build?

If you're looking for the Eclipse Classic package, the latest builds can be found here: http://download.eclipse.org/eclipse/downloads/.
Comment 25 Tomasz Zarna CLA 2010-08-11 09:37:06 EDT
*** Bug 321835 has been marked as a duplicate of this bug. ***
Comment 26 Tomasz Zarna CLA 2010-08-12 08:20:19 EDT
Verified in I20100805-1700.
Comment 27 Tomasz Zarna CLA 2010-08-19 07:07:23 EDT
*** Bug 319235 has been marked as a duplicate of this bug. ***
Comment 28 Q.S. Wang CLA 2010-08-19 20:19:38 EDT
*** Bug 320177 has been marked as a duplicate of this bug. ***
Comment 29 Technos CLA 2010-10-03 01:36:04 EDT
I have installed "eclipse-cpp-helios-SR1-win32.zip", which I am hoping that got fix. 

Unfortunately, this is not the case in my system. Shortcuts are not working. 

OS: Windows XP SP3
Java: JRE 6 Update 21
Comment 30 Tomasz Zarna CLA 2010-10-04 08:16:18 EDT
(In reply to comment #29)
> Unfortunately, this is not the case in my system. Shortcuts are not working.

Are you referring to keybindings for CVS operations? btw, this bug is about fixing the issue in HEAD, for SR1 you should comment on bug 316875.
Comment 31 Technos CLA 2010-10-08 00:54:22 EDT
(In reply to comment #30)
> (In reply to comment #29)
> > Unfortunately, this is not the case in my system. Shortcuts are not working.
> 
> Are you referring to keybindings for CVS operations? btw, this bug is about
> fixing the issue in HEAD, for SR1 you should comment on bug 316875.

Thanks for the reply, it seems like I should comment on bug 309074
Comment 32 Ray V. CLA 2011-01-19 13:42:19 EST
I found this bug through comments here:
http://subclipse.tigris.org/issues/show_bug.cgi?id=1159

not sure if the fix to this bug is expected to fix the problem in subclipse as well, but I do still see the issue on subclipse when setting up keybindings to Synchronize with Repository on Indigo M4.
Comment 33 Tomasz Zarna CLA 2011-01-20 04:34:02 EST
(In reply to comment #32)
> I found this bug through comments here:
> http://subclipse.tigris.org/issues/show_bug.cgi?id=1159
> 
> not sure if the fix to this bug is expected to fix the problem in subclipse as
> well

No, this bug and the attached fix is for Team/CVS only. If you were using Subversive I would recommend you to go to bug 309074. For Subclipse, I think the bug you mentioned should be reopened and investigated on the Subclipse side.
Comment 34 misja CLA 2011-06-06 02:41:18 EDT
I'm using EGit as a SCM and I'm having the same problem. (Using the latest 3.6 build)

This issue is not restricted to CVS but it applies for whichever SCM plugin. All Team shortcut keys don't work.
Comment 35 Markus Keller CLA 2011-06-06 09:46:18 EDT
(In reply to comment #34)
> I'm using EGit as a SCM and I'm having the same problem. (Using the latest 3.6
> build)

Please file a bug for EGit and tell them to read topic "5. Object Contributions will not execute from a key binding" here: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/porting/3.6/incompatibilities.html&anchor=objectContribution