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/ParameterizedCommand.java
}
		}
		return combinations;
	}
	/**
	 * The base command which is being parameterized. This value is never
	 * <code>null</code>.
	 */
	private final Command command;
	/**
	 * The hash code for this object. This value is computed lazily, and marked
	 * as invalid when one of the values on which it is based changes.
	 */
	private transient int hashCode = HASH_CODE_NOT_COMPUTED;
	/**
	 * This is an array of parameterization defined for this command. This value
	 * may be <code>null</code> if the command has no parameters.
	 */
	private final Parameterization[] parameterizations;
	/**
	 * Constructs a new instance of <code>ParameterizedCommand</code> with
	 * specific values for zero or more of its parameters.
	 * 
	 * @param command
	 *            The command that is parameterized; must not be
	 *            <code>null</code>.
	 * @param parameterizations
	 *            An array of parameterizations binding parameters to values for
	 *            the command. This value may be <code>null</code>. This
	 *            argument is not copied; if you need to make changes to it