Search in sources :

Example 1 with ActionVerb

use of org.applause.lang.applauseDsl.ActionVerb in project applause by applause.

the class DefaultListScreenActionCompiler method compileActionButton.

private CharSequence compileActionButton(final UIAction it) {
    CharSequence _xifexpression = null;
    UIActionSpecification _action = it.getAction();
    if ((_action instanceof UIActionNavigateAction)) {
        CharSequence _switchResult = null;
        UIActionSpecification _action_1 = it.getAction();
        ActionVerb _actionVerb = ((UIActionNavigateAction) _action_1).getActionVerb();
        final ActionVerb _switchValue = _actionVerb;
        boolean _matched = false;
        if (!_matched) {
            if (Objects.equal(_switchValue, ActionVerb.ADD)) {
                _matched = true;
                Screen _screen = this._defaultListScreenClassExtensions.screen(it);
                CharSequence _compileActionButton_AddItem = this.compileActionButton_AddItem(_screen);
                _switchResult = _compileActionButton_AddItem;
            }
        }
        _xifexpression = _switchResult;
    }
    return _xifexpression;
}
Also used : UIActionNavigateAction(org.applause.lang.applauseDsl.UIActionNavigateAction) ActionVerb(org.applause.lang.applauseDsl.ActionVerb) Screen(org.applause.lang.applauseDsl.Screen) UIActionSpecification(org.applause.lang.applauseDsl.UIActionSpecification)

Example 2 with ActionVerb

use of org.applause.lang.applauseDsl.ActionVerb in project applause by applause.

the class DefaultListScreenActionCompiler method compileActionMethod.

private CharSequence compileActionMethod(final UIAction it) {
    CharSequence _xifexpression = null;
    UIActionSpecification _action = it.getAction();
    if ((_action instanceof UIActionNavigateAction)) {
        CharSequence _switchResult = null;
        UIActionSpecification _action_1 = it.getAction();
        ActionVerb _actionVerb = ((UIActionNavigateAction) _action_1).getActionVerb();
        final ActionVerb _switchValue = _actionVerb;
        boolean _matched = false;
        if (!_matched) {
            if (Objects.equal(_switchValue, ActionVerb.ADD)) {
                _matched = true;
                Screen _screen = this._defaultListScreenClassExtensions.screen(it);
                CharSequence _compileActionMethod_AddItem = this.compileActionMethod_AddItem(_screen);
                _switchResult = _compileActionMethod_AddItem;
            }
        }
        if (!_matched) {
            if (Objects.equal(_switchValue, ActionVerb.EDIT)) {
                _matched = true;
                Screen _screen_1 = this._defaultListScreenClassExtensions.screen(it);
                CharSequence _compileActionMethod_EditItem = this.compileActionMethod_EditItem(_screen_1);
                _switchResult = _compileActionMethod_EditItem;
            }
        }
        _xifexpression = _switchResult;
    }
    return _xifexpression;
}
Also used : UIActionNavigateAction(org.applause.lang.applauseDsl.UIActionNavigateAction) ActionVerb(org.applause.lang.applauseDsl.ActionVerb) Screen(org.applause.lang.applauseDsl.Screen) UIActionSpecification(org.applause.lang.applauseDsl.UIActionSpecification)

Example 3 with ActionVerb

use of org.applause.lang.applauseDsl.ActionVerb in project applause by applause.

the class UIActionNavigateActionImpl method setActionVerb.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void setActionVerb(ActionVerb newActionVerb) {
    ActionVerb oldActionVerb = actionVerb;
    actionVerb = newActionVerb == null ? ACTION_VERB_EDEFAULT : newActionVerb;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.UI_ACTION_NAVIGATE_ACTION__ACTION_VERB, oldActionVerb, actionVerb));
}
Also used : ActionVerb(org.applause.lang.applauseDsl.ActionVerb) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

ActionVerb (org.applause.lang.applauseDsl.ActionVerb)3 Screen (org.applause.lang.applauseDsl.Screen)2 UIActionNavigateAction (org.applause.lang.applauseDsl.UIActionNavigateAction)2 UIActionSpecification (org.applause.lang.applauseDsl.UIActionSpecification)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1