if (globalAction instanceof CommandAction) {
final String actionId = globalAction.getId();
if (actionId != null) {
final IActionCommandMappingService mappingService = (IActionCommandMappingService) serviceLocator
.getService(IActionCommandMappingService.class);
mappingService.map(actionId, commandId);
}
} else {
globalActionHandlersByCommandId.put(commandId,
new ActionHandler(globalAction));
}