catch up with development Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/org.eclipse.osbp.xtext.dialogdsl/src/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.xtend b/org.eclipse.osbp.xtext.dialogdsl/src/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.xtend index 84f3c7a..cfb5cbe 100644 --- a/org.eclipse.osbp.xtext.dialogdsl/src/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.xtend +++ b/org.eclipse.osbp.xtext.dialogdsl/src/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.xtend
@@ -675,10 +675,19 @@ public void afterBind(IContext context) { ''' for(slot:slots) { + if((slot.jvmType.type.containsSuperType(typeof(IStateMachine).name))) { + body = ''' + «body» + String hostName = ((IStateMachine)context.getBeanSlot("«slot.name»").getValue()).getHostName(); + int port = ((IStateMachine)context.getBeanSlot("«slot.name»").getValue()).getRemotePort(); + ''' + } + } + for(slot:slots) { if((slot.jvmType.type.containsSuperType(typeof(IStateMachineParticipant).name))) { body = ''' «body» - ((IStateMachineParticipant)context.getBeanSlot("«slot.name»").getValue()).init(); + ((IStateMachineParticipant)context.getBeanSlot("«slot.name»").getValue()).init(hostName, port); ''' if((slot.jvmType.type.containsSuperType(typeof(IDataProvider).name))) { for(innerslot:slots) {
diff --git a/org.eclipse.osbp.xtext.dialogdsl/xtend-gen/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.java b/org.eclipse.osbp.xtext.dialogdsl/xtend-gen/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.java index a5acdf5..0f46fdd 100644 --- a/org.eclipse.osbp.xtext.dialogdsl/xtend-gen/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.java +++ b/org.eclipse.osbp.xtext.dialogdsl/xtend-gen/org/eclipse/osbp/xtext/dialogdsl/jvmmodel/DialogDslMobileViewCreator.java
@@ -1141,108 +1141,129 @@ _builder_6.newLine(); body = _builder_6.toString(); for (final UiBeanSlot slot_1 : slots) { - boolean _containsSuperType_1 = this.containsSuperType(slot_1.getJvmType().getType(), IStateMachineParticipant.class.getName()); + boolean _containsSuperType_1 = this.containsSuperType(slot_1.getJvmType().getType(), IStateMachine.class.getName()); if (_containsSuperType_1) { StringConcatenation _builder_7 = new StringConcatenation(); _builder_7.append(body); _builder_7.newLineIfNotEmpty(); _builder_7.append("\t\t"); - _builder_7.append("((IStateMachineParticipant)context.getBeanSlot(\""); + _builder_7.append("String hostName = ((IStateMachine)context.getBeanSlot(\""); String _name_13 = slot_1.getName(); _builder_7.append(_name_13, "\t\t"); - _builder_7.append("\").getValue()).init();"); + _builder_7.append("\").getValue()).getHostName();"); + _builder_7.newLineIfNotEmpty(); + _builder_7.append("\t\t"); + _builder_7.append("int port = ((IStateMachine)context.getBeanSlot(\""); + String _name_14 = slot_1.getName(); + _builder_7.append(_name_14, "\t\t"); + _builder_7.append("\").getValue()).getRemotePort();"); _builder_7.newLineIfNotEmpty(); body = _builder_7.toString(); - boolean _containsSuperType_2 = this.containsSuperType(slot_1.getJvmType().getType(), IDataProvider.class.getName()); - if (_containsSuperType_2) { + } + } + for (final UiBeanSlot slot_2 : slots) { + boolean _containsSuperType_2 = this.containsSuperType(slot_2.getJvmType().getType(), IStateMachineParticipant.class.getName()); + if (_containsSuperType_2) { + StringConcatenation _builder_8 = new StringConcatenation(); + _builder_8.append(body); + _builder_8.newLineIfNotEmpty(); + _builder_8.append("\t\t"); + _builder_8.append("((IStateMachineParticipant)context.getBeanSlot(\""); + String _name_15 = slot_2.getName(); + _builder_8.append(_name_15, "\t\t"); + _builder_8.append("\").getValue()).init(hostName, port);"); + _builder_8.newLineIfNotEmpty(); + body = _builder_8.toString(); + boolean _containsSuperType_3 = this.containsSuperType(slot_2.getJvmType().getType(), IDataProvider.class.getName()); + if (_containsSuperType_3) { for (final UiBeanSlot innerslot : slots) { - boolean _containsSuperType_3 = this.containsSuperType(innerslot.getJvmType().getType(), IDto.class.getName()); - if (_containsSuperType_3) { - StringConcatenation _builder_8 = new StringConcatenation(); - _builder_8.append(body); - _builder_8.newLineIfNotEmpty(); - _builder_8.append("\t\t"); - _builder_8.append("if (context.getBeanSlot(\""); - String _name_14 = innerslot.getName(); - _builder_8.append(_name_14, "\t\t"); - _builder_8.append("\") != null) {"); - _builder_8.newLineIfNotEmpty(); - _builder_8.append("\t\t\t"); - _builder_8.append("((IDataProvider)context.getBeanSlot(\""); - String _name_15 = slot_1.getName(); - _builder_8.append(_name_15, "\t\t\t"); - _builder_8.append("\").getValue()).addDatasource(\""); + boolean _containsSuperType_4 = this.containsSuperType(innerslot.getJvmType().getType(), IDto.class.getName()); + if (_containsSuperType_4) { + StringConcatenation _builder_9 = new StringConcatenation(); + _builder_9.append(body); + _builder_9.newLineIfNotEmpty(); + _builder_9.append("\t\t"); + _builder_9.append("if (context.getBeanSlot(\""); String _name_16 = innerslot.getName(); - _builder_8.append(_name_16, "\t\t\t"); - _builder_8.append("\", context.getBeanSlot(\""); - String _name_17 = innerslot.getName(); - _builder_8.append(_name_17, "\t\t\t"); - _builder_8.append("\").getValueType());"); - _builder_8.newLineIfNotEmpty(); - _builder_8.append("\t\t"); - _builder_8.append("}"); - _builder_8.newLine(); - body = _builder_8.toString(); + _builder_9.append(_name_16, "\t\t"); + _builder_9.append("\") != null) {"); + _builder_9.newLineIfNotEmpty(); + _builder_9.append("\t\t\t"); + _builder_9.append("((IDataProvider)context.getBeanSlot(\""); + String _name_17 = slot_2.getName(); + _builder_9.append(_name_17, "\t\t\t"); + _builder_9.append("\").getValue()).addDatasource(\""); + String _name_18 = innerslot.getName(); + _builder_9.append(_name_18, "\t\t\t"); + _builder_9.append("\", context.getBeanSlot(\""); + String _name_19 = innerslot.getName(); + _builder_9.append(_name_19, "\t\t\t"); + _builder_9.append("\").getValueType());"); + _builder_9.newLineIfNotEmpty(); + _builder_9.append("\t\t"); + _builder_9.append("}"); + _builder_9.newLine(); + body = _builder_9.toString(); } } } } } - for (final UiBeanSlot slot_2 : slots) { - boolean _containsSuperType_4 = this.containsSuperType(slot_2.getJvmType().getType(), IStateMachine.class.getName()); - if (_containsSuperType_4) { - StringConcatenation _builder_9 = new StringConcatenation(); - _builder_9.append(body); - _builder_9.newLineIfNotEmpty(); - _builder_9.append("\t\t"); - _builder_9.append("((IStateMachine)context.getBeanSlot(\""); - String _name_18 = slot_2.getName(); - _builder_9.append(_name_18, "\t\t"); - _builder_9.append("\").getValue()).start();"); - _builder_9.newLineIfNotEmpty(); - body = _builder_9.toString(); + for (final UiBeanSlot slot_3 : slots) { + boolean _containsSuperType_5 = this.containsSuperType(slot_3.getJvmType().getType(), IStateMachine.class.getName()); + if (_containsSuperType_5) { + StringConcatenation _builder_10 = new StringConcatenation(); + _builder_10.append(body); + _builder_10.newLineIfNotEmpty(); + _builder_10.append("\t\t"); + _builder_10.append("((IStateMachine)context.getBeanSlot(\""); + String _name_20 = slot_3.getName(); + _builder_10.append(_name_20, "\t\t"); + _builder_10.append("\").getValue()).start();"); + _builder_10.newLineIfNotEmpty(); + body = _builder_10.toString(); } } - StringConcatenation _builder_10 = new StringConcatenation(); - _builder_10.append(body); - _builder_10.newLineIfNotEmpty(); - _builder_10.append("\t"); - _builder_10.append("}"); - _builder_10.newLine(); - _builder_10.append("};"); - _builder_10.newLine(); - _builder_10.append("params.put(IViewContext.PARAM_CONFIGURATION, config);"); - _builder_10.newLine(); - _builder_10.append("return params;"); - _builder_10.newLine(); - body = _builder_10.toString(); - } else { StringConcatenation _builder_11 = new StringConcatenation(); _builder_11.append(body); _builder_11.newLineIfNotEmpty(); - _builder_11.append("Map<String, Object> services = new HashMap<String, Object>();"); + _builder_11.append("\t"); + _builder_11.append("}"); _builder_11.newLine(); - _builder_11.append("params.put(IViewContext.PARAM_SERVICES, services);"); + _builder_11.append("};"); _builder_11.newLine(); - _builder_11.append("org.eclipse.osbp.vaaclipse.addons.softwarefactory.service.OSBPI18nService i18nService = new org.eclipse.osbp.vaaclipse.addons.softwarefactory.service.OSBPI18nService();"); + _builder_11.append("params.put(IViewContext.PARAM_CONFIGURATION, config);"); _builder_11.newLine(); - _builder_11.append("i18nService.setDSLMetadataService("); - _builder_11.append(binderClassName); - _builder_11.append(".getDSLMetadataService());"); - _builder_11.newLineIfNotEmpty(); - _builder_11.append("services.put(II18nService.class.getName(), i18nService); "); - _builder_11.newLine(); - _builder_11.append("services.put(IThemeResourceService.class.getName(), "); - _builder_11.append(binderClassName); - _builder_11.append(".getThemeResourceService());"); - _builder_11.newLineIfNotEmpty(); - _builder_11.append("services.put(IDSLMetadataService.class.getName(), "); - _builder_11.append(binderClassName); - _builder_11.append(".getDSLMetadataService());"); - _builder_11.newLineIfNotEmpty(); _builder_11.append("return params;"); _builder_11.newLine(); body = _builder_11.toString(); + } else { + StringConcatenation _builder_12 = new StringConcatenation(); + _builder_12.append(body); + _builder_12.newLineIfNotEmpty(); + _builder_12.append("Map<String, Object> services = new HashMap<String, Object>();"); + _builder_12.newLine(); + _builder_12.append("params.put(IViewContext.PARAM_SERVICES, services);"); + _builder_12.newLine(); + _builder_12.append("org.eclipse.osbp.vaaclipse.addons.softwarefactory.service.OSBPI18nService i18nService = new org.eclipse.osbp.vaaclipse.addons.softwarefactory.service.OSBPI18nService();"); + _builder_12.newLine(); + _builder_12.append("i18nService.setDSLMetadataService("); + _builder_12.append(binderClassName); + _builder_12.append(".getDSLMetadataService());"); + _builder_12.newLineIfNotEmpty(); + _builder_12.append("services.put(II18nService.class.getName(), i18nService); "); + _builder_12.newLine(); + _builder_12.append("services.put(IThemeResourceService.class.getName(), "); + _builder_12.append(binderClassName); + _builder_12.append(".getThemeResourceService());"); + _builder_12.newLineIfNotEmpty(); + _builder_12.append("services.put(IDSLMetadataService.class.getName(), "); + _builder_12.append(binderClassName); + _builder_12.append(".getDSLMetadataService());"); + _builder_12.newLineIfNotEmpty(); + _builder_12.append("return params;"); + _builder_12.newLine(); + body = _builder_12.toString(); } return body; }