// Read out the help context identifier.
final String helpContextId = readOptional(configurationElement,
ATT_HELP_CONTEXT_ID);
final Command command = commandService.getCommand(commandId);
final Category category = commandService.getCategory(categoryId);
if (!category.isDefined()) {
addWarning(
warningsToLog,
"Commands should really have a category", //$NON-NLS-1$
configurationElement, commandId,
"categoryId", categoryId); //$NON-NLS-1$
}
final ParameterType returnType;
if (returnTypeId == null) {
returnType = null;
} else {
returnType = commandService.getParameterType(returnTypeId);
}
command.define(name, description, category, parameters, returnType,
helpContextId);
readState(configurationElement, warningsToLog, command);
}
// If there were any warnings, then log them now.