Bug 507691: [codegen] ignore ParameterProperties for protocol message
parameters
Change-Id: I00f8f59878dc21ad0c6da73eaaddcace79801319
Signed-off-by: Ernesto Posse <eposse@gmail.com>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/TypesUtil.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/TypesUtil.java
index dd55991..b28b8a8 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/TypesUtil.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/TypesUtil.java
@@ -26,6 +26,7 @@
import org.eclipse.papyrusrt.xtumlrt.common.Enumeration;
import org.eclipse.papyrusrt.xtumlrt.common.NamedElement;
import org.eclipse.papyrusrt.xtumlrt.common.Operation;
+import org.eclipse.papyrusrt.xtumlrt.common.OperationSignature;
import org.eclipse.papyrusrt.xtumlrt.common.Parameter;
import org.eclipse.papyrusrt.xtumlrt.common.TypedMultiplicityElement;
import org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames;
@@ -73,8 +74,9 @@
if (modelType == null) {
type = UMLRTRuntime.UMLRTObject.UMLRTTypedValue.getType();
}
- if (RTCppGenerationProperties.getParameterProperties(element) != null) {
- type = applyParameterProperties(type, (org.eclipse.papyrusrt.xtumlrt.common.Parameter) element);
+ org.eclipse.papyrusrt.xtumlrt.common.Parameter param = (org.eclipse.papyrusrt.xtumlrt.common.Parameter) element;
+ if (param.eContainer() instanceof OperationSignature && RTCppGenerationProperties.getParameterProperties(param) != null) {
+ type = applyParameterProperties(type, param);
}
} else if (element instanceof Operation
&& RTCppGenerationProperties.getParameterProperties(((Operation) element).getReturnType()) != null) {
diff --git a/tests/junit/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.test/pom.xml b/tests/junit/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.test/pom.xml
index 9433fc7..d6e207a 100644
--- a/tests/junit/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.test/pom.xml
+++ b/tests/junit/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.test/pom.xml
@@ -28,9 +28,6 @@
<copy todir="${project.basedir}/models/tests/">
<fileset dir="${project.basedir}/../../../../../models/tests/"/>
</copy>
- <copy todir="${project.basedir}/models/ComputerSystem">
- <fileset dir="${project.basedir}/../../../../../models/samples/ComputerSystem"/>
- </copy>
</target>
</configuration>
</execution>