DESCRIPTION

Lookup keybinding used to trigger content assist

EGit hardcoded the keybinding for content assist to "CTRL+Space".
Instead it should lookup the configured keybinding for this command
dynamically.

Bug: 415133
Change-Id: I7ea30a5e162d6e7e63e8d220ed514f3af4366e27
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Danika Greer
date: 2013-08-16 12:35:30.000000000

Patch Set 1: Code-Review-1

(4 comments)

The following methods should also be fixed, they also hardcode the keybinding:

* UIUtils.addPreviousValuesContentProposalToText
* UIUtils.addRefContentProposalToText

Line:766, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> Document that it can return null.

Line:768, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> commandId is not used in the method. Either the string below should be replaced or we should remove the parameter and rename it to "getContentAssistKeystroke".

Line:781, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> In which case is there more than one trigger? Is it for a binding like "Shift+Alt+X T"? In that case we should probably not return "Shift+Alt+X", as it will be more confusing than helpful. So something likes this maybe?:

    if (triggers.length == 1 && triggers[0] instanceof KeyStroke)
        return (KeyStroke) triggers[0];

Line:687, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchGerritChangePage.java -> Use IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST here (also in other places).

-------------------------------------
author: Douglas Trujillo
date: 2013-08-16 21:37:18.000000000

Patch Set 1:

(4 comments)

Line:766, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> Done

Line:768, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> Done

Line:781, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> Done

Line:687, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchGerritChangePage.java -> done, thanks I couldn't find that constant

-------------------------------------
