use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.
the class CapWorkbenchActionsProviderImpl method saveAction.
@Override
public IDataModelAction saveAction() {
IDataModelAction result = Toolkit.getValue(SAVE_ACTION_KEY);
if (result == null) {
IDataModelActionBuilder builder = actionFactory.dataModelSaveActionBuilder();
for (final IWorkbenchMenuInterceptorPlugin plugin : PluginProvider.getPlugins(IWorkbenchMenuInterceptorPlugin.ID)) {
builder = plugin.getMenuInterceptor().saveAction(builder);
if (builder == null) {
break;
}
}
if (builder != null) {
result = builder.build();
} else {
result = null;
}
Toolkit.setValue(SAVE_ACTION_KEY, result);
}
return result;
}
use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.
the class CapWorkbenchActionsProviderImpl method cancelAction.
@Override
public IDataModelAction cancelAction() {
IDataModelAction result = Toolkit.getValue(CANCEL_ACTION_KEY);
if (result == null) {
IDataModelActionBuilder builder = actionFactory.dataModelCancelActionBuilder();
for (final IWorkbenchMenuInterceptorPlugin plugin : PluginProvider.getPlugins(IWorkbenchMenuInterceptorPlugin.ID)) {
builder = plugin.getMenuInterceptor().cancelAction(builder);
if (builder == null) {
break;
}
}
if (builder != null) {
result = builder.build();
} else {
result = null;
}
Toolkit.setValue(CANCEL_ACTION_KEY, result);
}
return result;
}
use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.
the class CapWorkbenchActionsProviderImpl method loadAction.
@Override
public IDataModelAction loadAction() {
IDataModelAction result = Toolkit.getValue(LOAD_ACTION_KEY);
if (result == null) {
IDataModelActionBuilder builder = actionFactory.dataModelLoadActionBuilder();
for (final IWorkbenchMenuInterceptorPlugin plugin : PluginProvider.getPlugins(IWorkbenchMenuInterceptorPlugin.ID)) {
builder = plugin.getMenuInterceptor().loadAction(builder);
if (builder == null) {
break;
}
}
if (builder != null) {
result = builder.build();
} else {
result = null;
}
Toolkit.setValue(LOAD_ACTION_KEY, result);
}
return result;
}
use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.
the class CapActionFactoryImpl method dataModelCancelActionBuilder.
@Override
public IDataModelActionBuilder dataModelCancelActionBuilder() {
final IDataModelActionBuilder builder = new DataModelActionBuilderImpl(new DataModelCancelCommand());
builder.setText(Messages.getString("CapActionFactoryImpl.cancel"));
builder.setIcon(IconsSmall.CANCEL);
return builder;
}
use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.
the class CapActionFactoryImpl method dataModelUndoActionBuilder.
@Override
public IDataModelActionBuilder dataModelUndoActionBuilder() {
final IDataModelActionBuilder builder = new DataModelActionBuilderImpl(new DataModelUndoCommand());
builder.setText(Messages.getString("CapActionFactoryImpl.undo"));
builder.setAccelerator(VirtualKey.Z, Modifier.CTRL);
builder.setIcon(IconsSmall.UNDO);
return builder;
}
Aggregations