Returns a
String containing the command id, parameter ids and
parameter values for this
ParameterizedCommand. The returned
String can be stored by a client and later used to reconstruct an
equivalent
ParameterizedCommand using the
CommandManager#deserialize(String) method.
The syntax of the returned
String is as follows:
serialization = commandId [ '(' parameters ')' ]
parameters = parameter [ ',' parameters ]
parameter = parameterId [ '=' parameterValue ]
In the syntax above, sections inside square-brackets are optional. The
characters in single quotes ((
, )
,
,
and =
) indicate literal characters.
commandId
represents the command id encoded with
separator characters escaped. parameterId
and
parameterValue
represent the parameter ids and
values encoded with separator characters escaped. The separator
characters (
, )
, ,
and
=
are escaped by prepending a %
. This
requires %
to be escaped, which is also done by prepending
a %
.
The order of the parameters is not defined (and not important). A missing
parameterValue
indicates that the value of the
parameter is null
.
For example, the string shown below represents a serialized parameterized
command that can be used to show the Resource perspective:
org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.ui.resourcePerspective)
This example shows the more general form with multiple parameters,
null
value parameters, and escaped =
in the
third parameter value.
command.id(param1.id=value1,param2.id,param3.id=esc%=val3)