* Get a field decoration appropriate for cueing the user, including a
* description of the active key binding.
*
*/
private FieldDecoration getFieldDecoration() {
FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
// Look for a decoration installed for this particular command id.
String decId = CONTENT_ASSIST_DECORATION_ID + adapter.getCommandId();
FieldDecoration dec = registry.getFieldDecoration(decId);
// If there is not one, base ours on the standard JFace one.
if (dec == null) {
FieldDecoration originalDec = registry
.getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
registry.registerFieldDecoration(decId, null, originalDec
.getImage());
dec = registry.getFieldDecoration(decId);
}
// Always update the decoration text since the key binding may
// have changed since it was last retrieved.
IBindingService bindingService = (IBindingService) PlatformUI
.getWorkbench().getService(IBindingService.class);