Search in sources :

Example 1 with IRefreshLookUpsActionBuilder

use of org.jowidgets.cap.ui.api.command.IRefreshLookUpsActionBuilder 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;
}
Also used : IAction(org.jowidgets.api.command.IAction) IRefreshLookUpsActionBuilder(org.jowidgets.cap.ui.api.command.IRefreshLookUpsActionBuilder) IWorkbenchMenuInterceptorPlugin(org.jowidgets.cap.ui.api.plugin.IWorkbenchMenuInterceptorPlugin)

Aggregations

IAction (org.jowidgets.api.command.IAction)1 IRefreshLookUpsActionBuilder (org.jowidgets.cap.ui.api.command.IRefreshLookUpsActionBuilder)1 IWorkbenchMenuInterceptorPlugin (org.jowidgets.cap.ui.api.plugin.IWorkbenchMenuInterceptorPlugin)1