Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355118 - [Compatibility] 'Git Staging' view has hijacked Ctrl+1
Summary: [Compatibility] 'Git Staging' view has hijacked Ctrl+1
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.1.1   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
: 355576 (view as bug list)
Depends on:
Blocks: 331240
  Show dependency tree
 
Reported: 2011-08-18 12:38 EDT by Remy Suen CLA
Modified: 2011-08-23 17:16 EDT (History)
5 users (show)

See Also:
emoffatt: review+
ob1.eclipse: review+


Attachments
Part site services patch v1 (1.26 KB, patch)
2011-08-22 10:43 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***