catch up with branch daily
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/org.eclipse.osbp.xtext.action/META-INF/MANIFEST.MF b/org.eclipse.osbp.xtext.action/META-INF/MANIFEST.MF
index b3d9d7b..08212c3 100644
--- a/org.eclipse.osbp.xtext.action/META-INF/MANIFEST.MF
+++ b/org.eclipse.osbp.xtext.action/META-INF/MANIFEST.MF
@@ -29,7 +29,7 @@
org.eclipse.emf.mwe.utils;resolution:=optional,
org.eclipse.emf.mwe2.launch;bundle-version="[2.9.0,2.10.0)";resolution:=optional,
org.antlr.runtime,
- mondrian.osgi;bundle-version="[3.5.0,3.5.1)",
+ mondrian.osgi;bundle-version="[3.5.0,4.0.0)",
org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional,
com.vaadin.shared;bundle-version="[7.7.6,7.8.0)",
com.vaadin.server;bundle-version="[7.7.6,7.8.0)",
diff --git a/org.eclipse.osbp.xtext.action/emf-gen/org/eclipse/osbp/xtext/action/ActionDSLPackage.java b/org.eclipse.osbp.xtext.action/emf-gen/org/eclipse/osbp/xtext/action/ActionDSLPackage.java
index 0761e05..666cd6f 100644
--- a/org.eclipse.osbp.xtext.action/emf-gen/org/eclipse/osbp/xtext/action/ActionDSLPackage.java
+++ b/org.eclipse.osbp.xtext.action/emf-gen/org/eclipse/osbp/xtext/action/ActionDSLPackage.java
@@ -222,7 +222,7 @@
* @generated
* @ordered
*/
- int ACTION_PACKAGE___ERESOLVE_PROXY__INTERNALEOBJECT = OSBPTypesPackage.LPACKAGE___ERESOLVE_PROXY__INTERNALEOBJECT;
+ int ACTION_PACKAGE___ERESOLVE_PROXY__OBJECT = OSBPTypesPackage.LPACKAGE___ERESOLVE_PROXY__INTERNALEOBJECT;
/**
* The number of operations of the '<em>Action Package</em>' class.
diff --git a/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/common/IToolbarAction.java b/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/common/IToolbarAction.java
index 3c75e46..7400fef 100644
--- a/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/common/IToolbarAction.java
+++ b/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/common/IToolbarAction.java
@@ -23,7 +23,7 @@
public interface IToolbarAction {
static final String TOOLBAR_UUID = "TOOLBAR_UUID";
- void createToolbar(IEclipseContext eclipseContext, IPresentationEngine renderingEngine, IThemeResourceService themeResourceService);
+ void createToolbar(IEclipseContext eclipseContext, IPresentationEngine renderingEngine, IThemeResourceService themeResourceService, String uuid);
MToolBar getToolBar();
diff --git a/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.xtend b/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.xtend
index 4e85a41..f7d2fc4 100644
--- a/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.xtend
+++ b/org.eclipse.osbp.xtext.action/src/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.xtend
@@ -65,6 +65,7 @@
import org.eclipse.osbp.xtext.action.UIActionEnum
import org.eclipse.osbp.xtext.action.common.IToolbarAction
import org.eclipse.osbp.xtext.datainterchange.DataInterchange
+import org.eclipse.osbp.xtext.datainterchange.DataInterchangeGroup
import org.eclipse.osbp.xtext.datainterchange.jvmmodel.DataDSLJvmModelInferrer
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryPackage
import org.eclipse.osbp.xtext.messagedsl.MessagePackage
@@ -185,19 +186,13 @@
}
/**
- * <p>build the constructors including the uuid.</p>
+ * <p>build the constructors.</p>
*
*/
def void toToolbarConstructor(JvmGenericType type, ActionToolbar toolbar) {
type.members += toolbar.toConstructor(
[
- parameters += toolbar.toParameter("uuid", _typeReferenceBuilder.typeRef(String))
- body = [
- append(
- '''
- super();
- this.uuid = uuid;''')
- ]
+ body = [append('''super();''')]
])
}
@@ -218,6 +213,7 @@
parameters += toolbar.toParameter("renderingEngine", _typeReferenceBuilder.typeRef(IPresentationEngine))
parameters +=
toolbar.toParameter("themeResourceService", _typeReferenceBuilder.typeRef(IThemeResourceService))
+ parameters += toolbar.toParameter("uuid", _typeReferenceBuilder.typeRef(String))
visibility = JvmVisibility.PUBLIC
annotations += _annotationTypesBuilder.annotationRef(Override)
body = [append('''«toolbar.createToolbar»''')]
@@ -256,6 +252,7 @@
var body = ""
body = '''
«body»
+ this.uuid = uuid;
MenuFactoryImpl factory = MenuFactoryImpl.eINSTANCE;
MHandledToolItem toolItem = null;
MToolBarSeparator separator = null;
@@ -541,7 +538,7 @@
}
def doInterchange(DataInterchange dataInterchange, ActionCommand action) '''
- «dataInterchange.getConfigFileURL»
+ «getConfigFileURL((dataInterchange.eContainer as DataInterchangeGroup).name)»
«data.getBasicRunConfiguration(dataInterchange, true, (action.actionType as ActionDatainterchange).action.literal, null)»
«dataInterchange.getDefaultVariableName()».setDirection(WorkerThreadRunnable.Direction.«(action.actionType as ActionDatainterchange).action.literal.toUpperCase»);
«dataInterchange.getDefaultVariableName()».setEventDispatcher(eventDispatcher);
@@ -665,6 +662,9 @@
return false;
}
Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (dto == null) {
+ return false;
+ }
boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);
boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);
boolean result3 = true;
@@ -687,6 +687,9 @@
return false;
}
Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (dto == null) {
+ return false;
+ }
boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);
boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);
boolean result3 = true;
@@ -719,6 +722,9 @@
return false;
}
Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (dto == null) {
+ return false;
+ }
boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);
boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);
boolean result3 = true;
@@ -740,6 +746,9 @@
return false;
}
Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (dto == null) {
+ return false;
+ }
boolean result = !(boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);
boolean result2 = true;
if( result ) {
@@ -761,6 +770,9 @@
return false;
}
Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);
+ if (dto == null) {
+ return false;
+ }
boolean result1 = !(boolean) ContextInjectionFactory.invoke(dialog, IsNew.class, eclipseContext);
boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsPositioned.class, eclipseContext);
boolean result3 = true;
diff --git a/org.eclipse.osbp.xtext.action/xtend-gen/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.java b/org.eclipse.osbp.xtext.action/xtend-gen/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.java
index c16c255..3cec832 100644
--- a/org.eclipse.osbp.xtext.action/xtend-gen/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.java
+++ b/org.eclipse.osbp.xtext.action/xtend-gen/org/eclipse/osbp/xtext/action/jvmmodel/ActionDSLJvmModelInferrer.java
@@ -67,6 +67,7 @@
import org.eclipse.osbp.xtext.action.UIActionEnum;
import org.eclipse.osbp.xtext.action.common.IToolbarAction;
import org.eclipse.osbp.xtext.datainterchange.DataInterchange;
+import org.eclipse.osbp.xtext.datainterchange.DataInterchangeGroup;
import org.eclipse.osbp.xtext.datainterchange.jvmmodel.DataDSLJvmModelInferrer;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryPackage;
import org.eclipse.osbp.xtext.messagedsl.MessagePackage;
@@ -326,19 +327,14 @@
}
/**
- * <p>build the constructors including the uuid.</p>
+ * <p>build the constructors.</p>
*/
public void toToolbarConstructor(final JvmGenericType type, final ActionToolbar toolbar) {
EList<JvmMember> _members = type.getMembers();
final Procedure1<JvmConstructor> _function = (JvmConstructor it) -> {
- EList<JvmFormalParameter> _parameters = it.getParameters();
- JvmFormalParameter _parameter = this._jvmTypesBuilder.toParameter(toolbar, "uuid", this._typeReferenceBuilder.typeRef(String.class));
- this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
final Procedure1<ITreeAppendable> _function_1 = (ITreeAppendable it_1) -> {
StringConcatenation _builder = new StringConcatenation();
_builder.append("super();");
- _builder.newLine();
- _builder.append("this.uuid = uuid;");
it_1.append(_builder);
};
this._jvmTypesBuilder.setBody(it, _function_1);
@@ -371,6 +367,9 @@
EList<JvmFormalParameter> _parameters_2 = it.getParameters();
JvmFormalParameter _parameter_2 = this._jvmTypesBuilder.toParameter(toolbar, "themeResourceService", this._typeReferenceBuilder.typeRef(IThemeResourceService.class));
this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_2, _parameter_2);
+ EList<JvmFormalParameter> _parameters_3 = it.getParameters();
+ JvmFormalParameter _parameter_3 = this._jvmTypesBuilder.toParameter(toolbar, "uuid", this._typeReferenceBuilder.typeRef(String.class));
+ this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_3, _parameter_3);
it.setVisibility(JvmVisibility.PUBLIC);
EList<JvmAnnotationReference> _annotations = it.getAnnotations();
JvmAnnotationReference _annotationRef = this._annotationTypesBuilder.annotationRef(Override.class);
@@ -456,6 +455,8 @@
StringConcatenation _builder = new StringConcatenation();
_builder.append(body);
_builder.newLineIfNotEmpty();
+ _builder.append("this.uuid = uuid;");
+ _builder.newLine();
_builder.append("MenuFactoryImpl factory = MenuFactoryImpl.eINSTANCE;");
_builder.newLine();
_builder.append("MHandledToolItem toolItem = null;");
@@ -1099,7 +1100,8 @@
public CharSequence doInterchange(final DataInterchange dataInterchange, final ActionCommand action) {
StringConcatenation _builder = new StringConcatenation();
- String _configFileURL = this.data.getConfigFileURL(dataInterchange);
+ EObject _eContainer = dataInterchange.eContainer();
+ String _configFileURL = this.data.getConfigFileURL(((DataInterchangeGroup) _eContainer).getName());
_builder.append(_configFileURL);
_builder.newLineIfNotEmpty();
ActionType _actionType = action.getActionType();
@@ -1461,6 +1463,13 @@
_builder.newLine();
_builder.append("Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);");
_builder.newLine();
+ _builder.append("if (dto == null) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("return false;");
+ _builder.newLine();
+ _builder.append("}");
+ _builder.newLine();
_builder.append("boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);");
_builder.newLine();
_builder.append("boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);");
@@ -1514,6 +1523,13 @@
_builder_1.newLine();
_builder_1.append("Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);");
_builder_1.newLine();
+ _builder_1.append("if (dto == null) {");
+ _builder_1.newLine();
+ _builder_1.append("\t");
+ _builder_1.append("return false;");
+ _builder_1.newLine();
+ _builder_1.append("}");
+ _builder_1.newLine();
_builder_1.append("boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);");
_builder_1.newLine();
_builder_1.append("boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);");
@@ -1596,6 +1612,13 @@
_builder_2.newLine();
_builder_2.append("Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);");
_builder_2.newLine();
+ _builder_2.append("if (dto == null) {");
+ _builder_2.newLine();
+ _builder_2.append("\t");
+ _builder_2.append("return false;");
+ _builder_2.newLine();
+ _builder_2.append("}");
+ _builder_2.newLine();
_builder_2.append("boolean result1 = (boolean) ContextInjectionFactory.invoke(dialog, IsValid.class, eclipseContext);");
_builder_2.newLine();
_builder_2.append("boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);");
@@ -1649,6 +1672,13 @@
_builder_3.newLine();
_builder_3.append("Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);");
_builder_3.newLine();
+ _builder_3.append("if (dto == null) {");
+ _builder_3.newLine();
+ _builder_3.append("\t");
+ _builder_3.append("return false;");
+ _builder_3.newLine();
+ _builder_3.append("}");
+ _builder_3.newLine();
_builder_3.append("boolean result = !(boolean) ContextInjectionFactory.invoke(dialog, IsDirty.class, eclipseContext);");
_builder_3.newLine();
_builder_3.append("boolean result2 = true;");
@@ -1700,6 +1730,13 @@
_builder_4.newLine();
_builder_4.append("Object dto = viewContext.getBean(IViewContext.MAIN_BEAN_SLOT);");
_builder_4.newLine();
+ _builder_4.append("if (dto == null) {");
+ _builder_4.newLine();
+ _builder_4.append("\t");
+ _builder_4.append("return false;");
+ _builder_4.newLine();
+ _builder_4.append("}");
+ _builder_4.newLine();
_builder_4.append("boolean result1 = !(boolean) ContextInjectionFactory.invoke(dialog, IsNew.class, eclipseContext);");
_builder_4.newLine();
_builder_4.append("boolean result2 = (boolean) ContextInjectionFactory.invoke(dialog, IsPositioned.class, eclipseContext);");