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

Bug 355118

Summary: [Compatibility] 'Git Staging' view has hijacked Ctrl+1
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: major    
Priority: P3 CC: daniel_megert, dj.houghton, emoffatt, ob1.eclipse, pwebster
Version: 4.1Flags: emoffatt: review+
ob1.eclipse: review+
Target Milestone: 4.1.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 331240    
Attachments:
Description Flags
Part site services patch v1 none

Description Remy Suen CLA 2011-08-18 12:38:32 EDT
For reasons that are not yet clear to me, Ctrl+1 gets hijacked by the 'Git Staging' view. Whenever you hit Ctrl+1, you will only ever get 'No suggestions available' and the popup is not where the text caret is at (because it's actually relative to the message area of the 'Git Staging' view).

Eric has also seen this.
Comment 1 Remy Suen CLA 2011-08-18 12:49:57 EDT
In their code, they activate their ActionHandler like so:

IHandlerService handlerService = getHandlerService();
ActionHandler handler = createQuickFixActionHandler(sourceViewer);
ActiveShellExpression expression = new ActiveShellExpression(
    sourceViewer.getTextWidget().getShell());
return handlerService.activateHandler(
    ITextEditorActionDefinitionIds.QUICK_ASSIST, handler,
    expression);

We only have one implementation of IHandlerService and while a part gets its handler service instance scoped to its context, the default expression is one scoped to the workbench window so individual activations like these get leaked up to the window.

The workaround is to close the 'Git Staging' view so that this handler activation gets deactivated.
Comment 2 Remy Suen CLA 2011-08-22 10:43:21 EDT
Created attachment 201924 [details]
Part site services patch v1
Comment 3 Eric Moffatt CLA 2011-08-22 14:49:15 EDT
Added Oleg...

+1, For me the patch looks fine (and works great, this has been bugging me greatly).
Comment 4 Oleg Besedin CLA 2011-08-22 15:07:44 EDT
+1, looks good.
Comment 5 Remy Suen CLA 2011-08-22 15:22:15 EDT
(In reply to comment #2)
> Created attachment 201924 [details]
> Part site services patch v1

Patch released to R4_development.
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=cb265e3b935816c99167c2ec7864f982ad8caf3e

Thank you Eric and Oleg for reviewing the patch!
Comment 6 DJ Houghton CLA 2011-08-23 17:16:44 EDT
*** Bug 355576 has been marked as a duplicate of this bug. ***