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

Bug 303784

Summary: Keybindings for Team > Show Annotation and Show History don't work any more
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: bokowski, daniel_megert, john.arthorne, Mike_Wilson, pwebster, Szymon.Brandys, tomasz.zarna
Version: 3.6   
Target Milestone: 3.6 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Show Annotation and Show History v01
none
Show Annotation and Show History v02
none
Show Annotation and Show History v03 none

Description Markus Keller CLA 2010-02-24 11:46:17 EST
I20100223-0800, was OK in I20100217-1031

The keybindings for Team > Show Annotation and Show History don't work any more. E.g. assign Alt+Shift+H to one of them. The binding shows up in the menu, but pressing the keys does not work. It instead opens the Help menu (the OS behavior for an unhandled Alt+H).
Comment 1 Markus Keller CLA 2010-02-24 11:51:59 EST
If nothing changed in Team in that area, please move to Platform/UI.

I had a similar problem before (bug 228405), which was resolved in bug 228717, but some users still saw the problem afterwards, see bug 243740.
Comment 2 Dani Megert CLA 2010-02-24 12:10:17 EST
And probably related: editor ruler > Show Annotation is also no longer working. I used that very often and hence major loss of function to me.
Comment 3 Dani Megert CLA 2010-02-24 12:18:28 EST
Caused by bad fix for bug 300526. I've reverted that code and reopened bug 300526.
Comment 4 Dani Megert CLA 2010-02-25 03:51:52 EST
Verified in I20100224-2242.
Comment 5 Markus Keller CLA 2010-03-07 11:37:14 EST
Paul, since you've released the patch for bug 300526 again, this bug is again broken in N20100306-2000. Please inform the Team team how they can make this work again.
Comment 6 Markus Keller CLA 2010-03-11 06:22:17 EST
Please fix this for M6 or revert bug 300526 again if you don't have a solution that works for both problems.
Comment 7 Szymon Brandys CLA 2010-03-11 07:05:36 EST
(In reply to comment #6)
> Please fix this for M6 or revert bug 300526 again if you don't have a solution
> that works for both problems.

Regarding that the time is tight for M6, reverting the change looks like a good idea. We will wait for Paul's hand on the issue and if it is a trivial change, we can commit it today.
Comment 8 Paul Webster CLA 2010-03-11 07:47:39 EST
(In reply to comment #6)
> Please fix this for M6 or revert bug 300526 again if you don't have a solution
> that works for both problems.

I am looking at something for team, but I disagree ... CTRL+C doesn't randomly work is much more important than Show Annotations doesn't work in the java perspective (especially since the workaround is to add the team actionSet).

PW
Comment 9 Markus Keller CLA 2010-03-11 08:05:39 EST
> CTRL+C doesn't randomly work is much more important than Show Annotations
> doesn't work in the java perspective

Bug 300526 is a problem we've had for ages, and it doesn't show up in the SDK. For M6, we better keep a bug that shows up so rarely that nobody cared to file a bug up to now, than causing a swirl by breaking workflows that used to work before.

> (especially since the workaround is to add the team actionSet).

For those who want to apply the workaround: In the Customize Perspective dialog, it's the Command Group with name 'CVS'.
Comment 10 Paul Webster CLA 2010-03-11 08:12:44 EST
(In reply to comment #9)
> Bug 300526 is a problem we've had for ages, and it doesn't show up in the SDK.

It does show up in the SDK (it's a team contribution for 3.6 M5).  i.e. we are (were) shipping it now.

PW
Comment 11 Paul Webster CLA 2010-03-11 08:30:14 EST
Tomasz, could you point out which classes you use for both the actionSet Show Annotations and the objectContribution Show Annotations?

PW
Comment 12 Paul Webster CLA 2010-03-11 08:32:58 EST
Another option is (sorta) to ignore this problem in the SDK.  I would revert the fix in the LegacyActionPersistence and Team would remove all mentions of cut/copy/paste/selectAll from their objectContribution definitionIds.

I don't believe this is a good solution, we're just making sure we don't hit the problem in the SDK.

PW
Comment 13 Tomasz Zarna CLA 2010-03-11 08:36:45 EST
(In reply to comment #11)
> Tomasz, could you point out which classes you use for both the actionSet Show
> Annotations and the objectContribution Show Annotations?

It's org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction in o.e.team.cvs.ui for both.
Comment 14 Boris Bokowski CLA 2010-03-11 09:16:14 EST
(In reply to comment #10)
> (In reply to comment #9)
> > Bug 300526 is a problem we've had for ages, and it doesn't show up in the SDK.
> 
> It does show up in the SDK (it's a team contribution for 3.6 M5).  i.e. we are
> (were) shipping it now.

Just to make sure everybody is on the same page: Since M5, Ctrl+C was no longer working in certain cases (e.g. in dialogs). Reverting Paul's fix is not an option.
Comment 15 Paul Webster CLA 2010-03-11 10:04:35 EST
Created attachment 161751 [details]
Show Annotation and Show History v01

Work in progress.

All TeamActions are already AbstractHandlers.  By adding the setEnabled(*) we are able to set team action state before execute is called.  This works fine for the Show Annotation command.

But for Show History, it is setting the selection to an IFile (the editor input) and processing it ... but org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction.getSelectedRemoteFiles() looks at the IFile and returns an empty array of remove files (it says the IFile is not an ICVSRemoteFile).  But it's definitely an IFile under CVS control.  Tomasz, any speculation as to why?

PW
Comment 16 Tomasz Zarna CLA 2010-03-11 10:24:48 EST
From what I can see in the code ShowHistoryAction is supposed to operate on remote files only, while ShowResourceInHistoryAction is the one that accepts IFiles.
Comment 17 Paul Webster CLA 2010-03-11 11:18:43 EST
Created attachment 161758 [details]
Show Annotation and Show History v02

Provide default handlers for Show Annotation and Show History.

PW
Comment 18 Paul Webster CLA 2010-03-11 12:04:54 EST
Created attachment 161773 [details]
Show Annotation and Show History v03

Same as before, but there are only localized changes to the 2 actions in question (we don't touch TeamAction, the base action :-)

PW
Comment 19 Tomasz Zarna CLA 2010-03-11 12:11:53 EST
Applied the latest patch to HEAD, thanks Paul!
Comment 20 Paul Webster CLA 2010-03-12 09:29:31 EST
In I20100311-1616 in default Java perspective in new workspace
PW