use of org.whole.lang.actions.model.TemplateAction in project whole by wholeplatform.
the class ActionsUIContentAssistVisitor method createReplaceTemplateAction.
protected TemplateAction createReplaceTemplateAction(IEntity prototype, String label, ImageDescriptor icon) {
ActionsEntityFactory aef = ActionsEntityFactory.instance;
TemplateAction action = aef.createTemplateAction();
action.getKind().setValue(ActionKindEnum.REPLACE);
action.getText().setValue(label);
if (icon != null)
action.getIcon().setValue(icon);
action.setEnablerPredicate(createStageUpFragment(Predicate, createNotEqualsQuery(prototype)));
action.setTransformation(createStageUpFragment(Transformation, EntityUtils.clone(prototype)));
return action;
}
use of org.whole.lang.actions.model.TemplateAction in project whole by wholeplatform.
the class ActionsUIEntityFactory method createTemplateAction.
public TemplateAction createTemplateAction(ActionKindEnum.Value kind, IEntity prototype, String label, ImageDescriptor icon, boolean differentPredicate) {
ActionsEntityFactory aef = ActionsEntityFactory.instance;
TemplateAction action = aef.createTemplateAction();
action.getKind().setValue(kind);
action.getText().setValue(label);
if (icon != null)
action.getIcon().setValue(icon);
if (differentPredicate && kind == ActionKindEnum.REPLACE)
action.setEnablerPredicate(createStageUpFragment(Predicate, createNotEqualsPredicate(prototype)));
action.setTransformation(createStageUpFragment(Transformation, EntityUtils.cloneIfParented(prototype)));
return action;
}
Aggregations