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
/**
	 * <p>
	 * Changes the set of bindings for this binding manager. Changing the set of
	 * bindings all at once ensures that: (1) duplicates are removed; and (2)
	 * avoids unnecessary intermediate computations. This method clears the
	 * existing bindings, but does not trigger a recomputation (other method
	 * calls are required to do that).
	 * </p>
	 * <p>
	 * This method completes in <code>O(n)</code>, where <code>n</code> is
	 * the number of bindings.
	 * </p>
	 * 
	 * @param bindings
	 *            The new array of bindings; may be <code>null</code>. This
	 *            set is copied into a local data structure.
	 */
	public final void setBindings(final Binding[] bindings) {
		if (Arrays.equals(this.bindings, bindings)) {
			return; 
		}
		if ((bindings == null) || (bindings.length == 0)) {
			this.bindings = null;
			bindingCount = 0;
		} else {
			final int bindingsLength = bindings.length;
			this.bindings = new Binding[bindingsLength];
			System.arraycopy(bindings, 0, this.bindings, 0, bindingsLength);
			bindingCount = bindingsLength;
		}