Bug 125516 [KeyBindings] misc: API to return a KeySequence string for a command id
The KeyAssistDialog contains code that returns the formatted string for the active key binding for the "show key assist" command. It would be nice if this were generalized to a utility method that returns the string for the active key binding given a command id. Or, if you'd rather put this at the JFace keys level, code that returns the formatted string given the array of TriggerSequences (so that the client has to look up the binding with the right service). Right now I have copied this code into the WorkbenchContentAssistAdapter. There is similar code in JDT that does this (but not as thoroughly as the code in KeyAssistDialog).
bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
* This method completes in <code>O(n)</code>, where <code>n</code> is
	 * the number of bindings.
	 * </p>
	 * 
	 * @param sequence
	 *            The sequence to match; may be <code>null</code>.
	 * @param schemeId
	 *            The scheme id to match; may be <code>null</code>.
	 * @param contextId
	 *            The context id to match; may be <code>null</code>.
	 * @param locale
	 *            The locale to match; may be <code>null</code>.
	 * @param platform
	 *            The platform to match; may be <code>null</code>.
	 * @param windowManager
	 *            The window manager to match; may be <code>null</code>. TODO
	 *            Currently ignored.
	 * @param type
	 *            The type to look for.
	 * 
	 */
	public final void removeBindings(final TriggerSequence sequence,
			final String schemeId, final String contextId, final String locale,
			final String platform, final String windowManager, final int type) {
		if ((bindings == null) || (bindingCount < 1)) {
			return;
		}
		final Binding[] newBindings = new Binding[bindings.length];
		boolean bindingsChanged = false;
		int index = 0;