Search in sources :

Example 1 with UIComponentMemberDeclaration

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

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

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

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

the class ApplauseDslScopeProvider method scope_UIComponentMemberCall_component.

public IScope scope_UIComponentMemberCall_component(final ScreenListItemCell ctx, final EReference ref) {
    ListItemCellDeclaration _type = ctx.getType();
    EList<UIComponentMemberDeclaration> _members = _type.getMembers();
    IScope _scopeFor = Scopes.scopeFor(_members);
    return _scopeFor;
}
Also used : ListItemCellDeclaration(org.applause.lang.applauseDsl.ListItemCellDeclaration) IScope(org.eclipse.xtext.scoping.IScope) UIComponentMemberDeclaration(org.applause.lang.applauseDsl.UIComponentMemberDeclaration)

Example 5 with UIComponentMemberDeclaration

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

the class ApplauseDslScopeProvider method _membersScope.

private IScope _membersScope(final UIComponentDeclaration type) {
    EList<UIComponentMemberDeclaration> _members = type.getMembers();
    IScope _scopeFor = Scopes.scopeFor(_members);
    return _scopeFor;
}
Also used : IScope(org.eclipse.xtext.scoping.IScope) UIComponentMemberDeclaration(org.applause.lang.applauseDsl.UIComponentMemberDeclaration)

Aggregations

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