*/
public final IElementReference registerElementForCommand(
ParameterizedCommand command, UIElement element)
throws NotDefinedException {
if (!command.getCommand().isDefined()) {
throw new NotDefinedException(
"Cannot define a callback for undefined command " //$NON-NLS-1$
+ command.getCommand().getId());
}
if (element == null) {
throw new NotDefinedException("No callback defined for command " //$NON-NLS-1$
+ command.getCommand().getId());
}
ElementReference ref = new ElementReference(command.getId(), element,
command.getParameterMap());