Search in sources :

Example 1 with UIComponentMemberCall

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

the class DefaultListScreenModuleFileCompiler method compileConfiguration.

public CharSequence compileConfiguration(final UIComponentMemberConfiguration it) {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("cell.");
    UIComponentMemberCall _type = it.getType();
    UIComponentMemberDeclaration _component = _type.getComponent();
    String _name = _component.getName();
    _builder.append(_name, "");
    _builder.append(".");
    UIComponentMemberCall _type_1 = it.getType();
    UIComponentMemberDeclaration _member = _type_1.getMember();
    String _name_1 = _member.getName();
    _builder.append(_name_1, "");
    _builder.append(" = item.");
    Expression _value = it.getValue();
    String _evaluateExpression = this._expressionExtensions.evaluateExpression(_value);
    _builder.append(_evaluateExpression, "");
    _builder.append(";");
    _builder.newLineIfNotEmpty();
    return _builder;
}
Also used : Expression(org.applause.lang.applauseDsl.Expression) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) UIComponentMemberCall(org.applause.lang.applauseDsl.UIComponentMemberCall) UIComponentMemberDeclaration(org.applause.lang.applauseDsl.UIComponentMemberDeclaration)

Example 2 with UIComponentMemberCall

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

the class DefaultDetailsScreenModuleFileCompiler method labelConfig.

public UIComponentMemberConfiguration labelConfig(final ScreenListItemCell it) {
    EList<UIComponentMemberConfiguration> _configurations = it.getConfigurations();
    final Function1<UIComponentMemberConfiguration, Boolean> _function = new Function1<UIComponentMemberConfiguration, Boolean>() {

        public Boolean apply(final UIComponentMemberConfiguration it) {
            UIComponentMemberCall _type = it.getType();
            UIComponentMemberDeclaration _component = _type.getComponent();
            String _name = _component.getName();
            boolean _equals = Objects.equal(_name, "label");
            return Boolean.valueOf(_equals);
        }
    };
    UIComponentMemberConfiguration _findFirst = IterableExtensions.<UIComponentMemberConfiguration>findFirst(_configurations, _function);
    return _findFirst;
}
Also used : Function1(org.eclipse.xtext.xbase.lib.Functions.Function1) UIComponentMemberConfiguration(org.applause.lang.applauseDsl.UIComponentMemberConfiguration) UIComponentMemberCall(org.applause.lang.applauseDsl.UIComponentMemberCall) UIComponentMemberDeclaration(org.applause.lang.applauseDsl.UIComponentMemberDeclaration)

Example 3 with UIComponentMemberCall

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

the class DefaultDetailsScreenModuleFileCompiler method detailsConfig.

public UIComponentMemberConfiguration detailsConfig(final ScreenListItemCell it) {
    EList<UIComponentMemberConfiguration> _configurations = it.getConfigurations();
    final Function1<UIComponentMemberConfiguration, Boolean> _function = new Function1<UIComponentMemberConfiguration, Boolean>() {

        public Boolean apply(final UIComponentMemberConfiguration it) {
            UIComponentMemberCall _type = it.getType();
            UIComponentMemberDeclaration _component = _type.getComponent();
            String _name = _component.getName();
            boolean _equals = Objects.equal(_name, "details");
            return Boolean.valueOf(_equals);
        }
    };
    UIComponentMemberConfiguration _findFirst = IterableExtensions.<UIComponentMemberConfiguration>findFirst(_configurations, _function);
    return _findFirst;
}
Also used : Function1(org.eclipse.xtext.xbase.lib.Functions.Function1) UIComponentMemberConfiguration(org.applause.lang.applauseDsl.UIComponentMemberConfiguration) UIComponentMemberCall(org.applause.lang.applauseDsl.UIComponentMemberCall) UIComponentMemberDeclaration(org.applause.lang.applauseDsl.UIComponentMemberDeclaration)

Example 4 with UIComponentMemberCall

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

the class UIComponentMemberConfigurationImpl method basicSetType.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public NotificationChain basicSetType(UIComponentMemberCall newType, NotificationChain msgs) {
    UIComponentMemberCall oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.UI_COMPONENT_MEMBER_CONFIGURATION__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) UIComponentMemberCall(org.applause.lang.applauseDsl.UIComponentMemberCall)

Aggregations

UIComponentMemberCall (org.applause.lang.applauseDsl.UIComponentMemberCall)4 UIComponentMemberDeclaration (org.applause.lang.applauseDsl.UIComponentMemberDeclaration)3 UIComponentMemberConfiguration (org.applause.lang.applauseDsl.UIComponentMemberConfiguration)2 Function1 (org.eclipse.xtext.xbase.lib.Functions.Function1)2 Expression (org.applause.lang.applauseDsl.Expression)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1