After experimenting with many different ways of implementing this I found that:
1) The command associated with custom completion proposal computers is org.eclipse.jdt.ui.specific_content_assist.command
, and it is defined in the plugin.xml
of the org.eclipse.jdt.ui
plugin (provided by eclipse).
2) This is a parametrized command, which means it takes a commandParameter with id=org.eclipse.jdt.ui.specific_content_assist.category_id
. The value of this parameter should be the id of the proposalCategory
for your javaCompletionProposalComputer
.
Here's an example of how I defined custom key-binding:
<extension point="org.eclipse.ui.bindings">
<key
sequence="CTRL+ALT+SPACE"
contextId="org.eclipse.ui.contexts.dialogAndWindow"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
commandId="org.eclipse.jdt.ui.specific_content_assist.command">
<parameter
id="org.eclipse.jdt.ui.specific_content_assist.category_id"
value="YOUR_PROPOSAL_CATEGORY_GOES_HERE"/>
</key>
</extension>
No need to define a new command or handler!