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
* Notifies all of the listeners to this manager that the set of defined
	 * command identifiers has changed.
	 * 
	 * @param event
	 *            The event to send to all of the listeners; must not be
	 *            <code>null</code>.
	 */
	private final void fireCommandManagerChanged(final CommandManagerEvent event) {
		if (event == null)
			throw new NullPointerException();
		final Object[] listeners = getListeners();
		for (int i = 0; i < listeners.length; i++) {
			final ICommandManagerListener listener = (ICommandManagerListener) listeners[i];
			listener.commandManagerChanged(event);
		}
	}
	/**
	 * Gets the category with the given identifier. If no such category
	 * currently exists, then the category will be created (but be undefined).
	 * 
	 * @param categoryId
	 *            The identifier to find; must not be <code>null</code>. If
	 *            the category is <code>null</code>, then a category suitable
	 *            for uncategorized items is defined and returned.
	 * @return The category with the given identifier; this value will never be
	 *         <code>null</code>, but it might be undefined.
	 * @see Category
	 */
	public final Category getCategory(final String categoryId) {
		if (categoryId == null) {