Bug 120523 [Commands] parameters: support serializing and deserializing of ParameterizedCommands
UA wants to be able to store a ParameterizedCommand as a String in documents like Help, Cheatsheets and Intro parts. The stored commands will be shown as links and when the user clicks the link we will deserialize from String back to ParameterizedCommand and execute it. The informational content of a ParameterizedCommand amounts to the command id and the ids and values of each of the parameters. We'd like to propose a standard serialization format and offer API for (de)serializing so that others can use it as well as us. The serialization format we have looks like this: commandId?param1Id=value1&param2Id=value2 Breaking it up, looks like this: commandId '?' param1Id '=' value1 '&' param2Id '=' value2 ... The commandId, paramIds and values are UTF-8 encoded to allow arbitrary characters to appear in them. I'm going to attach 2 patches for this. The first patch implements this functionality. It has changes to org.eclipse.core.commands and org.eclipse.ui.workbench The second patch is some JUnit tests to add to org.eclipse.ui.tests.
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandManager.java
* The identifier of the category in which all auto-generated commands will
	 * appear. This value must never be <code>null</code>.
	 */
	public static final String AUTOGENERATED_CATEGORY_ID = "org.eclipse.core.commands.categories.autogenerated"; 
	/**
	 * The map of category identifiers (<code>String</code>) to categories (
	 * <code>Category</code>). This collection may be empty, but it is never
	 * <code>null</code>.
	 */
	private final Map categoriesById = new HashMap();
	/**
	 * The set of identifiers for those categories that are defined. This value
	 * may be empty, but it is never <code>null</code>.
	 */
	private final Set definedCategoryIds = new HashSet();
	/**
	 * The execution listener for this command manager. This just forwards
	 * events from commands controlled by this manager to listeners on this
	 * manager.
	 */
	private IExecutionListener executionListener = null;
	/**
	 * The collection of execution listeners. This collection is
	 * <code>null</code> if there are no listeners.
	 */
	private ListenerList executionListeners = null;
	/**
	 * Adds a listener to this command manager. The listener will be notified
	 * when the set of defined commands changes. This can be used to track the
	 * global appearance and disappearance of commands.