use of org.jowidgets.api.command.IAction in project jo-client-platform by jo-source.
the class CapWorkbenchActionsProviderImpl method refreshLookUpsAction.
@Override
public IAction refreshLookUpsAction() {
IAction result = Toolkit.getValue(REFRESH_LOOKUPS_ACTION_KEY);
if (result == null) {
IRefreshLookUpsActionBuilder builder = actionFactory.refreshLookUpsActionBuilder();
for (final IWorkbenchMenuInterceptorPlugin plugin : PluginProvider.getPlugins(IWorkbenchMenuInterceptorPlugin.ID)) {
builder = plugin.getMenuInterceptor().refreshLookUpsAction(builder);
if (builder == null) {
break;
}
}
if (builder != null) {
result = builder.build();
} else {
result = null;
}
Toolkit.setValue(REFRESH_LOOKUPS_ACTION_KEY, result);
}
return result;
}
use of org.jowidgets.api.command.IAction in project jo-client-platform by jo-source.
the class EntityComponent method getDataModelActions.
private List<IDataModelAction> getDataModelActions(final IComponentNodeModel componentNodeModel) {
final IToolBarModel toolBar = componentNodeModel.getApplication().getWorkbench().getToolBar();
final List<IDataModelAction> result = new LinkedList<IDataModelAction>();
for (final IToolBarItemModel item : toolBar.getItems()) {
if (item instanceof IActionItemModel) {
final IAction action = ((IActionItemModel) item).getAction();
if (action instanceof IDataModelAction) {
result.add((IDataModelAction) action);
}
}
}
return result;
}
use of org.jowidgets.api.command.IAction in project jo-client-platform by jo-source.
the class EntityComponentMasterTableToolBarPlugin method onInitialize.
@Override
public void onInitialize(final IPluginProperties properties, final IViewContext context, final IBeanTable<?> table, final Collection<IAction> linkCreatorActions) {
final IToolBarModel toolBar = context.getToolBar();
if (table.getDefaultCreatorAction() != null) {
toolBar.addAction(table.getDefaultCreatorAction());
}
final IMenuModel toolBarMenu = context.getToolBarMenu();
for (final IAction action : linkCreatorActions) {
toolBarMenu.addAction(action);
}
}
use of org.jowidgets.api.command.IAction in project jo-client-platform by jo-source.
the class EntityComponentRelationTreeToolBarPlugin method onInitialize.
@Override
public void onInitialize(final IPluginProperties properties, final IViewContext context, final IBeanTable<?> rootTable, final IBeanRelationTree<?> relationTree, final Collection<IAction> linkCreatorActions) {
final IToolBarModel toolBar = context.getToolBar();
if (relationTree.getAddAction() != null) {
toolBar.addAction(relationTree.getAddAction());
}
final IMenuModel toolBarMenu = context.getToolBarMenu();
for (final IAction action : linkCreatorActions) {
toolBarMenu.addAction(action);
}
}
Aggregations