diff options
author | Ansgar Radermacher | 2013-11-14 10:07:11 +0000 |
---|---|---|
committer | Ansgar Radermacher | 2013-11-14 10:08:28 +0000 |
commit | 624cf83edf265bc911d5daf1e6ec938e4a8bf350 (patch) | |
tree | 00b10fac453a51bd1e68e5745f2578734c027c1f /extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo | |
parent | 76440ecf0e5c5feb38a5d7aa945407093d04cb0a (diff) | |
download | org.eclipse.papyrus-624cf83edf265bc911d5daf1e6ec938e4a8bf350.tar.gz org.eclipse.papyrus-624cf83edf265bc911d5daf1e6ec938e4a8bf350.tar.xz org.eclipse.papyrus-624cf83edf265bc911d5daf1e6ec938e4a8bf350.zip |
- bug 420372 - Cannot generate C++ code from new Papyrus model: amended: allow CDT editor opening when C++ nature is not applied
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo')
2 files changed, 107 insertions, 107 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl index be27a66b917..40169465bf1 100644 --- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl +++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl @@ -276,45 +276,45 @@ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation/type"/> </argument> </body> + <body xsi:type="ocl.ecore:IteratorExp" name="collect" eType="/3/Bag(String)"> + <source xsi:type="ocl.ecore:OperationCallExp" eType="/3/Set(Parameter)"> + <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/31"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/> + </source> + <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation/returnResult"/> + </source> + <body xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> + <definition href="platform:/plugin/utils/Modifier.emtl#/0/modPtr"/> + <argument xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppReturnSpec/%/%.2/collect.1/temp2"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + </argument> + </body> + <iterator xsi:type="ocl.ecore:Variable" name="temp2"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + </iterator> + </body> + <body xsi:type="ocl.ecore:IteratorExp" name="collect" eType="/3/Bag(String)"> + <source xsi:type="ocl.ecore:OperationCallExp" eType="/3/Set(Parameter)"> + <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/32"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/> + </source> + <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation/returnResult"/> + </source> + <body xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> + <definition href="platform:/plugin/utils/Modifier.emtl#/0/modRef"/> + <argument xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppReturnSpec/%/%.2/collect.2/temp3"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + </argument> + </body> + <iterator xsi:type="ocl.ecore:Variable" name="temp3"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + </iterator> + </body> <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" "/> </else> </body> - <body xsi:type="ocl.ecore:IteratorExp" name="collect" eType="/3/Bag(String)"> - <source xsi:type="ocl.ecore:OperationCallExp" eType="/3/Set(Parameter)"> - <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/31"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/> - </source> - <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation/returnResult"/> - </source> - <body xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> - <definition href="platform:/plugin/utils/Modifier.emtl#/0/modPtr"/> - <argument xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppReturnSpec/collect/temp2"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - </argument> - </body> - <iterator xsi:type="ocl.ecore:Variable" name="temp2"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - </iterator> - </body> - <body xsi:type="ocl.ecore:IteratorExp" name="collect" eType="/3/Bag(String)"> - <source xsi:type="ocl.ecore:OperationCallExp" eType="/3/Set(Parameter)"> - <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/32"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/> - </source> - <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation/returnResult"/> - </source> - <body xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> - <definition href="platform:/plugin/utils/Modifier.emtl#/0/modRef"/> - <argument xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppReturnSpec/collect.1/temp3"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - </argument> - </body> - <iterator xsi:type="ocl.ecore:Variable" name="temp3"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - </iterator> - </body> <parameter name="operation"> <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/> </parameter> @@ -364,31 +364,31 @@ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TypedElement/type"/> </argument> </body> + <body xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> + <definition href="platform:/plugin/utils/Modifier.emtl#/0/modPtr"/> + <argument xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/returnResult"/> + <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/40"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/> + </argument> + </argument> + </body> + <body xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> + <definition href="platform:/plugin/utils/Modifier.emtl#/0/modRef"/> + <argument xsi:type="mtl:QueryInvocation"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> + <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/returnResult"/> + <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/41"> + <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/> + </argument> + </argument> + </body> <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" "/> </else> </body> - <body xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> - <definition href="platform:/plugin/utils/Modifier.emtl#/0/modPtr"/> - <argument xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/returnResult"/> - <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/40"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/> - </argument> - </argument> - </body> - <body xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/> - <definition href="platform:/plugin/utils/Modifier.emtl#/0/modRef"/> - <argument xsi:type="mtl:QueryInvocation"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/> - <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/returnResult"/> - <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/41"> - <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/> - </argument> - </argument> - </body> <parameter name="behavior"> <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/> </parameter> @@ -2145,7 +2145,7 @@ </eAnnotations> <eAnnotations source="positions.67" references="/0/CppReturnSpec/%"> <details key="start" value="1588"/> - <details key="end" value="1698"/> + <details key="end" value="1750"/> <details key="line" value="50"/> </eAnnotations> <eAnnotations source="positions.68" references="/0/CppReturnSpec/%/%"> @@ -2180,7 +2180,7 @@ </eAnnotations> <eAnnotations source="positions.74" references="/0/CppReturnSpec/%/%.2"> <details key="start" value="1631"/> - <details key="end" value="1693"/> + <details key="end" value="1745"/> <details key="line" value="50"/> </eAnnotations> <eAnnotations source="positions.75" references="/0/CppReturnSpec/%/%.2/collect"> @@ -2233,71 +2233,71 @@ <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.85" references="/0/CppReturnSpec/%/%.2/%.2"> - <details key="start" value="1692"/> - <details key="end" value="1693"/> - <details key="line" value="50"/> - </eAnnotations> - <eAnnotations source="positions.86" references="/0/CppReturnSpec/collect"> - <details key="start" value="1699"/> - <details key="end" value="1722"/> + <eAnnotations source="positions.85" references="/0/CppReturnSpec/%/%.2/collect.1"> + <details key="start" value="1693"/> + <details key="end" value="1716"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.87" references="/0/CppReturnSpec/collect/%"> - <details key="start" value="1699"/> - <details key="end" value="1713"/> + <eAnnotations source="positions.86" references="/0/CppReturnSpec/%/%.2/collect.1/%"> + <details key="start" value="1693"/> + <details key="end" value="1707"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.88" references="/0/CppReturnSpec/collect/%/self"> + <eAnnotations source="positions.87" references="/0/CppReturnSpec/%/%.2/collect.1/%/self"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.89" references="/0/CppReturnSpec/collect/%.1"> + <eAnnotations source="positions.88" references="/0/CppReturnSpec/%/%.2/collect.1/%.1"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.90" references="/0/CppReturnSpec/collect/%.1/temp1"> + <eAnnotations source="positions.89" references="/0/CppReturnSpec/%/%.2/collect.1/%.1/temp1"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.91" references="/0/CppReturnSpec/collect/temp2"> + <eAnnotations source="positions.90" references="/0/CppReturnSpec/%/%.2/collect.1/temp2"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.92" references="/0/CppReturnSpec/collect.1"> - <details key="start" value="1725"/> - <details key="end" value="1748"/> + <eAnnotations source="positions.91" references="/0/CppReturnSpec/%/%.2/collect.2"> + <details key="start" value="1719"/> + <details key="end" value="1742"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.93" references="/0/CppReturnSpec/collect.1/%"> - <details key="start" value="1725"/> - <details key="end" value="1739"/> + <eAnnotations source="positions.92" references="/0/CppReturnSpec/%/%.2/collect.2/%"> + <details key="start" value="1719"/> + <details key="end" value="1733"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.94" references="/0/CppReturnSpec/collect.1/%/self"> + <eAnnotations source="positions.93" references="/0/CppReturnSpec/%/%.2/collect.2/%/self"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.95" references="/0/CppReturnSpec/collect.1/%.1"> + <eAnnotations source="positions.94" references="/0/CppReturnSpec/%/%.2/collect.2/%.1"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.96" references="/0/CppReturnSpec/collect.1/%.1/temp1"> + <eAnnotations source="positions.95" references="/0/CppReturnSpec/%/%.2/collect.2/%.1/temp1"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.97" references="/0/CppReturnSpec/collect.1/temp3"> + <eAnnotations source="positions.96" references="/0/CppReturnSpec/%/%.2/collect.2/temp3"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> + <eAnnotations source="positions.97" references="/0/CppReturnSpec/%/%.2/%.2"> + <details key="start" value="1744"/> + <details key="end" value="1745"/> + <details key="line" value="50"/> + </eAnnotations> <eAnnotations source="positions.98" references="/0/CppReturnSpec/operation"> <details key="start" value="1564"/> <details key="end" value="1585"/> @@ -2310,7 +2310,7 @@ </eAnnotations> <eAnnotations source="positions.100" references="/0/CppReturnSpec.1/%"> <details key="start" value="1818"/> - <details key="end" value="1933"/> + <details key="end" value="1985"/> <details key="line" value="55"/> </eAnnotations> <eAnnotations source="positions.101" references="/0/CppReturnSpec.1/%/%"> @@ -2340,7 +2340,7 @@ </eAnnotations> <eAnnotations source="positions.106" references="/0/CppReturnSpec.1/%/%.2"> <details key="start" value="1851"/> - <details key="end" value="1928"/> + <details key="end" value="1980"/> <details key="line" value="55"/> </eAnnotations> <eAnnotations source="positions.107" references="/0/CppReturnSpec.1/%/%.2/%"> @@ -2384,40 +2384,40 @@ <details key="line" value="0"/> </eAnnotations> <eAnnotations source="positions.115" references="/0/CppReturnSpec.1/%/%.2/%.3"> - <details key="start" value="1927"/> - <details key="end" value="1928"/> - <details key="line" value="55"/> - </eAnnotations> - <eAnnotations source="positions.116" references="/0/CppReturnSpec.1/%.1"> - <details key="start" value="1934"/> - <details key="end" value="1957"/> + <details key="start" value="1928"/> + <details key="end" value="1951"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.117" references="/0/CppReturnSpec.1/%.1/%"> - <details key="start" value="1934"/> - <details key="end" value="1948"/> + <eAnnotations source="positions.116" references="/0/CppReturnSpec.1/%/%.2/%.3/%"> + <details key="start" value="1928"/> + <details key="end" value="1942"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.118" references="/0/CppReturnSpec.1/%.1/%/self"> + <eAnnotations source="positions.117" references="/0/CppReturnSpec.1/%/%.2/%.3/%/self"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.119" references="/0/CppReturnSpec.1/%.2"> - <details key="start" value="1960"/> - <details key="end" value="1983"/> + <eAnnotations source="positions.118" references="/0/CppReturnSpec.1/%/%.2/%.4"> + <details key="start" value="1954"/> + <details key="end" value="1977"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.120" references="/0/CppReturnSpec.1/%.2/%"> - <details key="start" value="1960"/> - <details key="end" value="1974"/> + <eAnnotations source="positions.119" references="/0/CppReturnSpec.1/%/%.2/%.4/%"> + <details key="start" value="1954"/> + <details key="end" value="1968"/> <details key="line" value="0"/> </eAnnotations> - <eAnnotations source="positions.121" references="/0/CppReturnSpec.1/%.2/%/self"> + <eAnnotations source="positions.120" references="/0/CppReturnSpec.1/%/%.2/%.4/%/self"> <details key="start" value="-1"/> <details key="end" value="-1"/> <details key="line" value="0"/> </eAnnotations> + <eAnnotations source="positions.121" references="/0/CppReturnSpec.1/%/%.2/%.5"> + <details key="start" value="1979"/> + <details key="end" value="1980"/> + <details key="line" value="55"/> + </eAnnotations> <eAnnotations source="positions.122" references="/0/CppReturnSpec.1/behavior"> <details key="start" value="1796"/> <details key="end" value="1815"/> diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl index 7769d46e84d..a21d28529ef 100644 --- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl +++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl @@ -47,12 +47,12 @@ else endif/] [template public CppReturnSpec(operation : Operation)] -[if (type = null)][ConsDestructorOrVoid()/][else][returnResult().modConst()/] [type.cppQualifiedName()/] [/if][returnResult().modPtr()/][returnResult().modRef()/] +[if (type = null)][ConsDestructorOrVoid()/][else][returnResult().modConst()/] [type.cppQualifiedName()/][returnResult().modPtr()/][returnResult().modRef()/] [/if] [/template] [template public CppReturnSpec(behavior : Behavior)] -[if (returnResult() = null)]void [else][returnResult().modConst()/] [returnResult().type.cppQualifiedName()/] [/if][returnResult().modPtr()/][returnResult().modRef()/] +[if (returnResult() = null)]void [else][returnResult().modConst()/] [returnResult().type.cppQualifiedName()/][returnResult().modPtr()/][returnResult().modRef()/] [/if] [/template] |