Search in sources :

Example 6 with UIActionSpecification

use of org.applause.lang.applauseDsl.UIActionSpecification 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)

Aggregations

UIActionSpecification (org.applause.lang.applauseDsl.UIActionSpecification)6 Screen (org.applause.lang.applauseDsl.Screen)3 ScreenListItemCell (org.applause.lang.applauseDsl.ScreenListItemCell)3 UIAction (org.applause.lang.applauseDsl.UIAction)3 UIActionNavigateAction (org.applause.lang.applauseDsl.UIActionNavigateAction)3 Function1 (org.eclipse.xtext.xbase.lib.Functions.Function1)3 ActionVerb (org.applause.lang.applauseDsl.ActionVerb)2 UIActionDeleteAction (org.applause.lang.applauseDsl.UIActionDeleteAction)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1