Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 243740 - [KeyBindings] Commit keybinding gradually fails
Summary: [KeyBindings] Commit keybinding gradually fails
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 3.6   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 08:23 EDT by Paul Webster CLA
Modified: 2010-04-12 09:39 EDT (History)
3 users (show)

See Also:


Attachments
Trace file for commands (671.76 KB, text/plain)
2008-08-19 18:30 EDT, Joe Thomas-Kerr CLA
no flags Details
A better trace file (272.56 KB, application/octet-stream)
2008-08-27 22:58 EDT, Joe Thomas-Kerr CLA
no flags Details
Log file with occurrences marked (190.79 KB, text/plain)
2009-03-03 23:56 EST, Joe Thomas-Kerr CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2008-08-11 08:23:20 EDT
from bug 228717

- From Joe Thomas-Kerr  2008-08-03 20:26:31 -0400  [reply] -------

I am still having issues with this in the 3.4 release. I am finding that the
Team/commit keyboard shortcut works intermittently. In my most recent test
using the C/C++ projects view:

- selecting one file with changes and pressing the commit shortcut works.
- selecting its parent folder and pressing the shortcut gives a "the selected
resources do not contain any changes"
- selecting a second file with pending changes in a different folder gives the
same error message (even though the file does contain changes and is annotated
as such).
- pressing the commit shortcut of the parent folder of this file also gives the
same error message.
- Using the commit shortcut on these same 4 resources in the Package Explorer
view opens the commit dialog as expected. However, I have previously
experienced the same problems using Project Explorer.

Joe.
Comment 1 Paul Webster CLA 2008-08-14 10:25:25 EDT
I'll see if we can do anything for 3.4.1 but it might need to be deferred to 3.5
PW
Comment 2 Paul Webster CLA 2008-08-19 10:37:04 EDT
I can't reproduce this on my maintenance build using the project explorer.  Could I get you to do some tracing when the problem asserts itself:

http://wiki.eclipse.org/Platform_Command_Framework#Tracing_Option

org.eclipse.ui/debug=true
org.eclipse.ui/trace/keyBindings=true
#org.eclipse.ui/trace/keyBindings.verbose=true
org.eclipse.ui/trace/sources=true
org.eclipse.ui/trace/handlers=true
org.eclipse.ui/trace/handlers.verbose=true
#org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.ui.edit.copy
org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.team.cvs.ui.commit
org.eclipse.ui/trace/contexts=true
#org.eclipse.ui/trace/contexts.verbose=true

if you run from the command line with the debug file (contents above) you should see output when trying to execute the Commit keybinding.  Capture the output in a log file please.

We only have this week and next week (more or less) to get fixes into 3.4.1.

PW
Comment 3 Joe Thomas-Kerr CLA 2008-08-19 18:30:19 EDT
Created attachment 110400 [details]
Trace file for commands

Here's some tracing logs. I tried it first with C++ projects view:

1. Press ctrl+shift+c. Message box opens to say "Nothing to commit".
2. Right-click the same folder, select Team and then Commit. Commit dialog opens happily.

I then did other things for a bit, then repeated the process using project explorer with the same result. 

I suspect that the issue is that the key binding fails to pass on some sort of parameter (perhaps the selection?), since the shortcut trace looks like this:

WorkbenchKeyboard.executeCommand(commandId = 'org.eclipse.team.cvs.ui.commit', parameters = {})

The logs didn't say anything about the context menu command other than the fact that the commit dialog  opened.

Hope this helps.
Comment 4 Paul Webster CLA 2008-08-26 13:19:16 EDT
(In reply to comment #3)
> Created an attachment (id=110400) [details]
> Trace file for commands


Joe, thanx for the tracing.  With the tracing I suggested it should include some lines like:

HANDLERS >>> Command('org.eclipse.jdt.ui.navigate.open.type') has changed to 'ActionDelegateHandlerProxy(null,org.eclipse.jdt.internal.ui.actions.OpenTypeAction)' as its handler

for the org.eclipse.team.cvs.ui.commit command (if that's the one you are tracking).

Are these lines in your options file?
org.eclipse.ui/trace/handlers=true
org.eclipse.ui/trace/handlers.verbose=true
org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.team.cvs.ui.commit

PW
Comment 5 Paul Webster CLA 2008-08-27 12:28:08 EDT
We might be able to look at this in 3.4.2 if we can track down the cause.

PW
Comment 6 Joe Thomas-Kerr CLA 2008-08-27 22:58:22 EDT
Created attachment 111150 [details]
A better trace file

My bad - I think I copied the debug statements from the wiki page without comparing them to the ones in your comment.

In any case, here is a debug file that hopefully contains the data you need.

Regards,
Joe
Comment 7 Paul Webster CLA 2008-11-26 13:05:47 EST
I wasn't able to reproduce this on 3.4.1.  I worked with Commit and the Project Explorer (and the Package explorer was never open in that session) and followed the usecase in the description.

Is there any more information that you have.  Is the CDT commit simply the Team Commit...?

PW
Comment 8 Paul Webster CLA 2009-01-25 11:07:49 EST
Hi Joe, I've been over the log and there's nothing suspicious there (like an out-and-out commit conflict).

I think we need a new log, marked up with the "here is where it worked" and "here is where it failed".

PW
Comment 9 Joe Thomas-Kerr CLA 2009-03-03 23:55:08 EST
I've done another trace and marked the successful and failed instances with #####. That is, I executed the action, then opened the log and found the last instance of 'commit'. Hopefully, if the log messages aren't cached, that will be the instance that we are interested in.

So the process was:

1. Activate project explorer.
2. Select a dirty file
3. press 'ctrl+shift+c'. (Commit dialog opens correctly). 
4. Press cancel.
5. Open debug.log. Find the last commit action and mark it with '####'.
6. Activate 'C/C++ Projects'.
7. Select the same dirty file.
8. press 'ctrl+shift+c'. (Dialog with 'selected resources do not contain any changes' incorrectly appears).
9. Press OK.
10. Open debug.log. Find the last commit action and mark it with '####'.

Comment 10 Joe Thomas-Kerr CLA 2009-03-03 23:56:37 EST
Created attachment 127424 [details]
Log file with occurrences marked
Comment 11 Paul Webster CLA 2009-04-23 14:16:21 EDT
Joe, thank you for your patience, but I just haven't been able to reproduce the problem (I've been going over it on 3.5).  There have been some changes to update the selection of the ActionDelegateHandlerProxy more consistently, but nothing traumatic (and the 3.4.2 code should be identical to the 3.5 code).

If you can reproduce it easily in a self-hosted scenario (launching eclipse from within eclipse), the only other thing I can think of is to start adding conditional breakpoints.  I can supply a stash of breakpoints and then we can look at the output.

PW
Comment 12 Paul Webster CLA 2009-09-09 13:07:07 EDT
I still cannot reproduce ... should we look into this again?

PW
Comment 13 Paul Webster CLA 2010-04-12 09:39:34 EDT
There have been changes to the Team commit action/keybinding in 3.6 and it works consistently for me now.

Please re-open if the problem persists in 3.6 M7 or builds greater than I20100406-1034

PW