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
* @param bindings
	 *            The bindings from which the deleted items should be removed.
	 *            This array should not be <code>null</code>, but may be
	 *            empty.
	 * @return The array of bindings with the deletions removed; never
	 *         <code>null</code>, but may be empty. Contains only instances
	 *         of <code>Binding</code>.
	 */
	private final Binding[] removeDeletions(final Binding[] bindings) {
		final Map deletions = new HashMap();
		final Binding[] bindingsCopy = new Binding[bindingCount];
		System.arraycopy(bindings, 0, bindingsCopy, 0, bindingCount);
		int deletedCount = 0;
		
		for (int i = 0; i < bindingCount; i++) {
			final Binding binding = bindingsCopy[i];
			if ((binding.getParameterizedCommand() == null)
					&& (localeMatches(binding)) && (platformMatches(binding))) {
				final TriggerSequence sequence = binding.getTriggerSequence();
				final Object currentValue = deletions.get(sequence);
				if (currentValue instanceof Binding) {
					final Collection collection = new ArrayList(2);
					collection.add(currentValue);
					collection.add(binding);
					deletions.put(sequence, collection);
				} else if (currentValue instanceof Collection) {
					final Collection collection = (Collection) currentValue;
					collection.add(binding);
				} else {
					deletions.put(sequence, binding);