use of org.applause.lang.applauseDsl.Expression 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;
}
use of org.applause.lang.applauseDsl.Expression in project applause by applause.
the class DefaultDetailsScreenModuleFileCompiler method compileTextCell.
public CharSequence compileTextCell(final ScreenListItemCell it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("QEntryElement *");
String _entryElementName = this.entryElementName(it);
_builder.append(_entryElementName, "");
_builder.append(" = [[QEntryElement alloc] init];");
_builder.newLineIfNotEmpty();
String _entryElementName_1 = this.entryElementName(it);
_builder.append(_entryElementName_1, "");
_builder.append(".title = @\"");
UIComponentMemberConfiguration _labelConfig = this.labelConfig(it);
Expression _value = _labelConfig.getValue();
String _evaluateExpression = this._expressionExtensions.evaluateExpression(_value);
_builder.append(_evaluateExpression, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_2 = this.entryElementName(it);
_builder.append(_entryElementName_2, "");
_builder.append(".key = @\"");
UIComponentMemberConfiguration _detailsConfig = this.detailsConfig(it);
Expression _value_1 = _detailsConfig.getValue();
String _evaluateExpression_1 = this._expressionExtensions.evaluateExpression(_value_1);
_builder.append(_evaluateExpression_1, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_3 = this.entryElementName(it);
_builder.append(_entryElementName_3, "");
_builder.append(".bind = @\"textValue:");
UIComponentMemberConfiguration _detailsConfig_1 = this.detailsConfig(it);
Expression _value_2 = _detailsConfig_1.getValue();
String _evaluateExpression_2 = this._expressionExtensions.evaluateExpression(_value_2);
_builder.append(_evaluateExpression_2, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
_builder.append("[sectionMain addElement:");
String _entryElementName_4 = this.entryElementName(it);
_builder.append(_entryElementName_4, "");
_builder.append("];");
_builder.newLineIfNotEmpty();
return _builder;
}
use of org.applause.lang.applauseDsl.Expression in project applause by applause.
the class DefaultDetailsScreenModuleFileCompiler method compileBooleanCell.
public CharSequence compileBooleanCell(final ScreenListItemCell it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("QBooleanElement *");
String _entryElementName = this.entryElementName(it);
_builder.append(_entryElementName, "");
_builder.append(" = [[QBooleanElement alloc] init];");
_builder.newLineIfNotEmpty();
String _entryElementName_1 = this.entryElementName(it);
_builder.append(_entryElementName_1, "");
_builder.append(".title = @\"");
UIComponentMemberConfiguration _labelConfig = this.labelConfig(it);
Expression _value = _labelConfig.getValue();
String _evaluateExpression = this._expressionExtensions.evaluateExpression(_value);
_builder.append(_evaluateExpression, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_2 = this.entryElementName(it);
_builder.append(_entryElementName_2, "");
_builder.append(".key = @\"");
UIComponentMemberConfiguration _detailsConfig = this.detailsConfig(it);
Expression _value_1 = _detailsConfig.getValue();
String _evaluateExpression_1 = this._expressionExtensions.evaluateExpression(_value_1);
_builder.append(_evaluateExpression_1, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_3 = this.entryElementName(it);
_builder.append(_entryElementName_3, "");
_builder.append(".bind = @\"boolValue:");
UIComponentMemberConfiguration _detailsConfig_1 = this.detailsConfig(it);
Expression _value_2 = _detailsConfig_1.getValue();
String _evaluateExpression_2 = this._expressionExtensions.evaluateExpression(_value_2);
_builder.append(_evaluateExpression_2, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
_builder.append("[sectionMain addElement:");
String _entryElementName_4 = this.entryElementName(it);
_builder.append(_entryElementName_4, "");
_builder.append("];");
_builder.newLineIfNotEmpty();
return _builder;
}
use of org.applause.lang.applauseDsl.Expression in project applause by applause.
the class DefaultDetailsScreenModuleFileCompiler method compileDateCell.
public CharSequence compileDateCell(final ScreenListItemCell it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("QDateTimeInlineElement *");
String _entryElementName = this.entryElementName(it);
_builder.append(_entryElementName, "");
_builder.append(" = [[QDateTimeInlineElement alloc] init];");
_builder.newLineIfNotEmpty();
String _entryElementName_1 = this.entryElementName(it);
_builder.append(_entryElementName_1, "");
_builder.append(".title = @\"");
UIComponentMemberConfiguration _labelConfig = this.labelConfig(it);
Expression _value = _labelConfig.getValue();
String _evaluateExpression = this._expressionExtensions.evaluateExpression(_value);
_builder.append(_evaluateExpression, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_2 = this.entryElementName(it);
_builder.append(_entryElementName_2, "");
_builder.append(".mode = UIDatePickerModeDateAndTime;");
_builder.newLineIfNotEmpty();
String _entryElementName_3 = this.entryElementName(it);
_builder.append(_entryElementName_3, "");
_builder.append(".dateValue = [NSDate date]; ");
_builder.newLineIfNotEmpty();
String _entryElementName_4 = this.entryElementName(it);
_builder.append(_entryElementName_4, "");
_builder.append(".key = @\"");
UIComponentMemberConfiguration _detailsConfig = this.detailsConfig(it);
Expression _value_1 = _detailsConfig.getValue();
String _evaluateExpression_1 = this._expressionExtensions.evaluateExpression(_value_1);
_builder.append(_evaluateExpression_1, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
String _entryElementName_5 = this.entryElementName(it);
_builder.append(_entryElementName_5, "");
_builder.append(".bind = @\"dateValue:");
UIComponentMemberConfiguration _detailsConfig_1 = this.detailsConfig(it);
Expression _value_2 = _detailsConfig_1.getValue();
String _evaluateExpression_2 = this._expressionExtensions.evaluateExpression(_value_2);
_builder.append(_evaluateExpression_2, "");
_builder.append("\";");
_builder.newLineIfNotEmpty();
_builder.append("[sectionMain addElement:");
String _entryElementName_6 = this.entryElementName(it);
_builder.append(_entryElementName_6, "");
_builder.append("];");
_builder.newLineIfNotEmpty();
return _builder;
}
use of org.applause.lang.applauseDsl.Expression in project applause by applause.
the class DefaultDetailsScreenModuleFileCompiler method entryElementName.
public String entryElementName(final ScreenListItemCell it) {
UIComponentMemberConfiguration _detailsConfig = this.detailsConfig(it);
Expression _value = _detailsConfig.getValue();
String _evaluateExpression = this._expressionExtensions.evaluateExpression(_value);
String _firstLower = StringExtensions.toFirstLower(_evaluateExpression);
String _plus = (_firstLower + "Element");
return _plus;
}
Aggregations