ToolbarBaseAction toolbarAction = ToolbarRegistry.getToolbarAction(tool.getId(), mapWidget);
if (toolbarAction != null) {
ButtonAction action = null;
if (toolbarAction instanceof ToolbarAction) {
action = new ToolbarButtonAction((ToolbarAction) toolbarAction);
} else if (toolbarAction instanceof ToolbarModalAction) {
action = new ToolbarRadioAction((ToolbarModalAction) toolbarAction, "map-controller-group");
}
if (action != null) {
for (Parameter parameter : tool.getParameters()) {