Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-09-16 09:07:53 +0000
committerAnsgar Radermacher2013-10-08 12:37:28 +0000
commiteb9de3f93dcd0822e0a7a22691b21278f568403a (patch)
treee733abe5d2c41a41138bc64353882b920c0b1a57 /extraplugins
parent77af26e5a90a8c2e76b79dbe79b224a5d96fe7c8 (diff)
downloadorg.eclipse.papyrus-eb9de3f93dcd0822e0a7a22691b21278f568403a.tar.gz
org.eclipse.papyrus-eb9de3f93dcd0822e0a7a22691b21278f568403a.tar.xz
org.eclipse.papyrus-eb9de3f93dcd0822e0a7a22691b21278f568403a.zip
Add includePaths property to ExternLibrary Stereotype
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.ecore10
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.genmodel6
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.di4
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.notation16
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.uml14
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/C_CppPackage.java16
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/EStorageClass.java78
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/ExternLibrary.java25
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/C_CppPackageImpl.java10
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/ExternLibraryImpl.java59
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/StorageClassImpl.java2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/cpp/profile/StUtils.java53
12 files changed, 73 insertions, 220 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.ecore b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.ecore
index 15e002484e2..0b83fd2e633 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.ecore
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.ecore
@@ -42,10 +42,10 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ExternLibrary">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="Mark a package as External Library. If this package is used, the associated CDT project will be configured accordingly.&#xA;The name is not required, since the UML name is used "/>
+ <details key="documentation" value="Mark a package as External Library. If this package is used, the associated CDT project will be configured accordingly."/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false"
- eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="includePaths" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="base_package" ordered="false"
unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="libPaths" ordered="false"
@@ -180,11 +180,9 @@
<eLiterals name="readWrite" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="EStorageClass">
- <eLiterals name="auto"/>
+ <eLiterals name="volatile"/>
<eLiterals name="register" value="1"/>
<eLiterals name="extern" value="2"/>
- <eLiterals name="static" value="3"/>
- <eLiterals name="inline" value="4"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StorageClass">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="storageClass" ordered="false"
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.genmodel b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.genmodel
index e37d79f135f..2a30ebd43db 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.genmodel
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.genmodel
@@ -17,11 +17,9 @@
<genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EAccessKind/readWrite"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="C_Cpp.ecore#//EStorageClass">
- <genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/auto"/>
+ <genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/volatile"/>
<genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/register"/>
<genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/extern"/>
- <genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/static"/>
- <genEnumLiterals ecoreEnumLiteral="C_Cpp.ecore#//EStorageClass/inline"/>
</genEnums>
<genClasses ecoreClass="C_Cpp.ecore#//Ptr">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference C_Cpp.ecore#//Ptr/base_parameter"/>
@@ -41,7 +39,7 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference C_Cpp.ecore#//ManualGeneration/base_Class"/>
</genClasses>
<genClasses ecoreClass="C_Cpp.ecore#//ExternLibrary">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute C_Cpp.ecore#//ExternLibrary/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute C_Cpp.ecore#//ExternLibrary/includePaths"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference C_Cpp.ecore#//ExternLibrary/base_package"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute C_Cpp.ecore#//ExternLibrary/libPaths"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute C_Cpp.ecore#//ExternLibrary/macros"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.di b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.di
index 6585e3a9a2b..134e5584ee5 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.di
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.di
@@ -30,10 +30,10 @@
<emfPageIdentifier href="C_Cpp.profile.notation#_VN2nIMoSEeGKstsYRuxdvw"/>
</children>
<children>
- <emfPageIdentifier href="C_Cpp.profile.notation#_tDFW4MoSEeGKstsYRuxdvw"/>
+ <emfPageIdentifier href="C_Cpp.profile.notation#_br8hIJVTEeKBzP_954cAAA"/>
</children>
<children>
- <emfPageIdentifier href="C_Cpp.profile.notation#_br8hIJVTEeKBzP_954cAAA"/>
+ <emfPageIdentifier href="C_Cpp.profile.notation#_tDFW4MoSEeGKstsYRuxdvw"/>
</children>
</children>
</windows>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.notation b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.notation
index da67bac357f..98c4e27340f 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.notation
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.notation
@@ -742,7 +742,7 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_nxsVzsoSEeGKstsYRuxdvw"/>
</children>
<element xmi:type="uml:Stereotype" href="C_Cpp.profile.uml#_PmXVQByJEduN1bTiWJ0lyw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nxruscoSEeGKstsYRuxdvw" x="189" y="135" width="145" height="109"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nxruscoSEeGKstsYRuxdvw" x="189" y="135" width="172" height="109"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_1pPUYMoSEeGKstsYRuxdvw" type="1031" fontName="Sans Serif" lineColor="0">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1pP7cMoSEeGKstsYRuxdvw" source="ShadowFigure">
@@ -838,7 +838,7 @@
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_w-5PcdTPEeKiLbHSN_MIRQ" type="3"/>
<element xmi:type="uml:Comment" href="C_Cpp.profile.uml#_w-x6sNTPEeKiLbHSN_MIRQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_w-4oYdTPEeKiLbHSN_MIRQ" x="198" y="253" width="251" height="63"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_w-4oYdTPEeKiLbHSN_MIRQ" x="198" y="261" width="251" height="63"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_LBHbMNTQEeKiLbHSN_MIRQ" type="1002" fontName="Sans Serif" lineColor="0">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_LBHbMtTQEeKiLbHSN_MIRQ" source="ShadowFigure">
@@ -914,7 +914,7 @@
<styles xmi:type="notation:FontStyle" xmi:id="_nyC7EcoSEeGKstsYRuxdvw" fontName="Sans Serif"/>
<element xmi:type="uml:Extension" href="C_Cpp.profile.uml#_zqqC4ByJEduN1bTiWJ0lyw"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nyC7EsoSEeGKstsYRuxdvw" points="[0, 0, -167, -79]$[117, 55, -50, -24]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gmQpAP2HEeGbWP4cpLE0gg" id="(0.5853658536585366,0.86)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gmQpAP2HEeGbWP4cpLE0gg" id="(0.5964523281596452,0.92)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_1pmgwMoSEeGKstsYRuxdvw" type="1013" source="_XJFkwMoSEeGKstsYRuxdvw" target="_1pPUYMoSEeGKstsYRuxdvw" routing="Rectilinear" lineColor="0">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9vlTsNTPEeKiLbHSN_MIRQ" source="QualifiedName">
@@ -958,7 +958,7 @@
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KFWWgtTQEeKiLbHSN_MIRQ" points="[2, -14, 0, 29]$[0, -32, -2, 11]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KFYLsNTQEeKiLbHSN_MIRQ" id="(0.3904382470119522,0.23333333333333334)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KFYLsdTQEeKiLbHSN_MIRQ" id="(0.45517241379310347,0.89)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KFYLsdTQEeKiLbHSN_MIRQ" id="(0.6569767441860465,0.9724770642201835)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_N6QLgNTQEeKiLbHSN_MIRQ" type="1022" source="_LBHbMNTQEeKiLbHSN_MIRQ" target="_aYuJgMoSEeGKstsYRuxdvw" lineColor="0">
<styles xmi:type="notation:FontStyle" xmi:id="_N6QLgdTQEeKiLbHSN_MIRQ" fontName="Sans Serif"/>
@@ -1203,14 +1203,6 @@
<element xmi:type="uml:EnumerationLiteral" href="C_Cpp.profile.uml#_irt6YJMIEeKrb5fnA81_2Q"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_gfyqoZVTEeKBzP_954cAAA" x="40" y="23"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_ggkGsJVTEeKBzP_954cAAA" type="1037" fontName="Sans Serif" lineColor="0">
- <element xmi:type="uml:EnumerationLiteral" href="C_Cpp.profile.uml#_mrDdwJMIEeKrb5fnA81_2Q"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ggkGsZVTEeKBzP_954cAAA" x="40" y="23"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_ghSfcJVTEeKBzP_954cAAA" type="1037" fontName="Sans Serif" lineColor="0">
- <element xmi:type="uml:EnumerationLiteral" href="C_Cpp.profile.uml#_nXJHsJMIEeKrb5fnA81_2Q"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ghSfcZVTEeKBzP_954cAAA" x="40" y="23"/>
- </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_ccgbY5VTEeKBzP_954cAAA"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_ccgbZJVTEeKBzP_954cAAA"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_ccgbZZVTEeKBzP_954cAAA"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.uml b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.uml
index 0d2df3e38f3..334c1ce504e 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.uml
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/profiles/C_Cpp.profile.uml
@@ -12,8 +12,7 @@
<body>Some toolkits require a quite particular way of use. For instance, LTTng requires the use of C (not C++) for the declaration of a trace provider and the header file is read several time with redefined macros. Therefore, the code generator supports a &quot;manual&quot; generation mode, in which primarily the contents of the CppInclude directive is written.</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_w-x6sNTPEeKiLbHSN_MIRQ" annotatedElement="_PmXVQByJEduN1bTiWJ0lyw">
- <body>Mark a package as External Library. If this package is used, the associated CDT project will be configured accordingly.
-The name is not required, since the UML name is used </body>
+ <body>Mark a package as External Library. If this package is used, the associated CDT project will be configured accordingly.</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_LBAtgNTQEeKiLbHSN_MIRQ" annotatedElement="_IHjS8ByMEdu0tMSz-ceC5A">
<body>No code generation should be done for this element. This also means that no include directive is generated, if the class is referenced.</body>
@@ -192,10 +191,13 @@ The name is not required, since the UML name is used </body>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_PmXVQByJEduN1bTiWJ0lyw" name="ExternLibrary">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_WFVj0ByJEduN1bTiWJ0lyw" name="name" isUnique="false">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_WFVj0ByJEduN1bTiWJ0lyw" name="includePaths" visibility="public" isUnique="false">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x4IIgOL8EeKxe91u-BdTVQ"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_x4hxIOL8EeKxe91u-BdTVQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_x4hxIOL8EeKxe91u-BdTVQ" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_3ta7IB5IEeO_BdY-WQWY-A">
+ <value xsi:nil="true"/>
+ </defaultValue>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_zqayUByJEduN1bTiWJ0lyw" name="base_package" isUnique="false" association="_zqqC4ByJEduN1bTiWJ0lyw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
@@ -443,11 +445,9 @@ The name is not required, since the UML name is used </body>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_1C3Q0JMIEeKrb5fnA81_2Q" name="readWrite"/>
</packagedElement>
<packagedElement xmi:type="uml:Enumeration" xmi:id="_YVBzYJMIEeKrb5fnA81_2Q" name="EStorageClass">
- <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_g3RhQJMIEeKrb5fnA81_2Q" name="auto"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_g3RhQJMIEeKrb5fnA81_2Q" name="volatile"/>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_iJ4_sJMIEeKrb5fnA81_2Q" name="register"/>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_irt6YJMIEeKrb5fnA81_2Q" name="extern"/>
- <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_mrDdwJMIEeKrb5fnA81_2Q" name="static"/>
- <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_nXJHsJMIEeKrb5fnA81_2Q" name="inline"/>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_U3BNgJVPEeKCE6_KfOehJw" name="StorageClass">
<ownedAttribute xmi:type="uml:Property" xmi:id="_X910gJVPEeKCE6_KfOehJw" name="storageClass" visibility="public" type="_YVBzYJMIEeKrb5fnA81_2Q" isUnique="false">
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/C_CppPackage.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/C_CppPackage.java
index d90f66fb011..b86055cbe22 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/C_CppPackage.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/C_CppPackage.java
@@ -263,13 +263,13 @@ public interface C_CppPackage extends EPackage {
int EXTERN_LIBRARY = 3;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute.
+ * The feature id for the '<em><b>Include Paths</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int EXTERN_LIBRARY__NAME = 0;
+ int EXTERN_LIBRARY__INCLUDE_PATHS = 0;
/**
* The feature id for the '<em><b>Base package</b></em>' reference.
@@ -1385,15 +1385,15 @@ public interface C_CppPackage extends EPackage {
EClass getExternLibrary();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getName <em>Name</em>}'.
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getIncludePaths <em>Include Paths</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.papyrus.C_Cpp.ExternLibrary#getName()
+ * @return the meta object for the attribute list '<em>Include Paths</em>'.
+ * @see org.eclipse.papyrus.C_Cpp.ExternLibrary#getIncludePaths()
* @see #getExternLibrary()
* @generated
*/
- EAttribute getExternLibrary_Name();
+ EAttribute getExternLibrary_IncludePaths();
/**
* Returns the meta object for the reference '{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getBase_package <em>Base package</em>}'.
@@ -2197,12 +2197,12 @@ public interface C_CppPackage extends EPackage {
EClass EXTERN_LIBRARY = eINSTANCE.getExternLibrary();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * The meta object literal for the '<em><b>Include Paths</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EAttribute EXTERN_LIBRARY__NAME = eINSTANCE.getExternLibrary_Name();
+ EAttribute EXTERN_LIBRARY__INCLUDE_PATHS = eINSTANCE.getExternLibrary_IncludePaths();
/**
* The meta object literal for the '<em><b>Base package</b></em>' reference feature.
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/EStorageClass.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/EStorageClass.java
index c3be77604f0..42a7a12d0c6 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/EStorageClass.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/EStorageClass.java
@@ -19,16 +19,14 @@ import org.eclipse.emf.common.util.Enumerator;
*/
public enum EStorageClass implements Enumerator {
/**
- * The '<em><b>Auto</b></em>' literal object.
+ * The '<em><b>Volatile</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #AUTO_VALUE
+ * @see #VOLATILE_VALUE
* @generated
* @ordered
*/
- AUTO(0, "auto", "auto"),
-
- /**
+ VOLATILE(0, "volatile", "volatile"), /**
* The '<em><b>Register</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -46,42 +44,22 @@ public enum EStorageClass implements Enumerator {
* @generated
* @ordered
*/
- EXTERN(2, "extern", "extern"),
-
- /**
- * The '<em><b>Static</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #STATIC_VALUE
- * @generated
- * @ordered
- */
- STATIC(3, "static", "static"),
+ EXTERN(2, "extern", "extern");
/**
- * The '<em><b>Inline</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #INLINE_VALUE
- * @generated
- * @ordered
- */
- INLINE(4, "inline", "inline");
-
- /**
- * The '<em><b>Auto</b></em>' literal value.
+ * The '<em><b>Volatile</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Auto</b></em>' literal object isn't clear,
+ * If the meaning of '<em><b>Volatile</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @see #AUTO
- * @model name="auto"
+ * @see #VOLATILE
+ * @model name="volatile"
* @generated
* @ordered
*/
- public static final int AUTO_VALUE = 0;
+ public static final int VOLATILE_VALUE = 0;
/**
* The '<em><b>Register</b></em>' literal value.
@@ -114,36 +92,6 @@ public enum EStorageClass implements Enumerator {
public static final int EXTERN_VALUE = 2;
/**
- * The '<em><b>Static</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Static</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #STATIC
- * @model name="static"
- * @generated
- * @ordered
- */
- public static final int STATIC_VALUE = 3;
-
- /**
- * The '<em><b>Inline</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Inline</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #INLINE
- * @model name="inline"
- * @generated
- * @ordered
- */
- public static final int INLINE_VALUE = 4;
-
- /**
* An array of all the '<em><b>EStorage Class</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -151,11 +99,9 @@ public enum EStorageClass implements Enumerator {
*/
private static final EStorageClass[] VALUES_ARRAY =
new EStorageClass[] {
- AUTO,
+ VOLATILE,
REGISTER,
EXTERN,
- STATIC,
- INLINE,
};
/**
@@ -206,11 +152,9 @@ public enum EStorageClass implements Enumerator {
*/
public static EStorageClass get(int value) {
switch (value) {
- case AUTO_VALUE: return AUTO;
+ case VOLATILE_VALUE: return VOLATILE;
case REGISTER_VALUE: return REGISTER;
case EXTERN_VALUE: return EXTERN;
- case STATIC_VALUE: return STATIC;
- case INLINE_VALUE: return INLINE;
}
return null;
}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/ExternLibrary.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/ExternLibrary.java
index e031c5c17d3..92ae55b0fcc 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/ExternLibrary.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/ExternLibrary.java
@@ -12,13 +12,12 @@ import org.eclipse.emf.ecore.EObject;
*
* <!-- begin-model-doc -->
* Mark a package as External Library. If this package is used, the associated CDT project will be configured accordingly.
- * The name is not required, since the UML name is used
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getIncludePaths <em>Include Paths</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getBase_package <em>Base package</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getLibPaths <em>Lib Paths</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getMacros <em>Macros</em>}</li>
@@ -33,30 +32,20 @@ import org.eclipse.emf.ecore.EObject;
*/
public interface ExternLibrary extends EObject {
/**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * Returns the value of the '<em><b>Include Paths</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * If the meaning of the '<em>Include Paths</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.papyrus.C_Cpp.C_CppPackage#getExternLibrary_Name()
+ * @return the value of the '<em>Include Paths</em>' attribute list.
+ * @see org.eclipse.papyrus.C_Cpp.C_CppPackage#getExternLibrary_IncludePaths()
* @model unique="false" dataType="org.eclipse.uml2.types.String" ordered="false"
* @generated
*/
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.C_Cpp.ExternLibrary#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
+ EList<String> getIncludePaths();
/**
* Returns the value of the '<em><b>Base package</b></em>' reference.
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/C_CppPackageImpl.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/C_CppPackageImpl.java
index 549903ff4a6..8feb971efd7 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/C_CppPackageImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/C_CppPackageImpl.java
@@ -603,7 +603,7 @@ public class C_CppPackageImpl extends EPackageImpl implements C_CppPackage {
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getExternLibrary_Name() {
+ public EAttribute getExternLibrary_IncludePaths() {
return (EAttribute)externLibraryEClass.getEStructuralFeatures().get(0);
}
@@ -1067,7 +1067,7 @@ public class C_CppPackageImpl extends EPackageImpl implements C_CppPackage {
createEReference(manualGenerationEClass, MANUAL_GENERATION__BASE_CLASS);
externLibraryEClass = createEClass(EXTERN_LIBRARY);
- createEAttribute(externLibraryEClass, EXTERN_LIBRARY__NAME);
+ createEAttribute(externLibraryEClass, EXTERN_LIBRARY__INCLUDE_PATHS);
createEReference(externLibraryEClass, EXTERN_LIBRARY__BASE_PACKAGE);
createEAttribute(externLibraryEClass, EXTERN_LIBRARY__LIB_PATHS);
createEAttribute(externLibraryEClass, EXTERN_LIBRARY__MACROS);
@@ -1208,7 +1208,7 @@ public class C_CppPackageImpl extends EPackageImpl implements C_CppPackage {
initEReference(getManualGeneration_Base_Class(), theUMLPackage.getClass_(), null, "base_Class", null, 1, 1, ManualGeneration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(externLibraryEClass, ExternLibrary.class, "ExternLibrary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getExternLibrary_Name(), theTypesPackage.getString(), "name", null, 0, 1, ExternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getExternLibrary_IncludePaths(), theTypesPackage.getString(), "includePaths", null, 0, -1, ExternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getExternLibrary_Base_package(), theUMLPackage.getPackage(), null, "base_package", null, 1, 1, ExternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(getExternLibrary_LibPaths(), theTypesPackage.getString(), "libPaths", null, 0, -1, ExternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(getExternLibrary_Macros(), theTypesPackage.getString(), "macros", null, 0, -1, ExternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
@@ -1303,11 +1303,9 @@ public class C_CppPackageImpl extends EPackageImpl implements C_CppPackage {
addEEnumLiteral(eAccessKindEEnum, EAccessKind.READ_WRITE);
initEEnum(eStorageClassEEnum, EStorageClass.class, "EStorageClass");
- addEEnumLiteral(eStorageClassEEnum, EStorageClass.AUTO);
+ addEEnumLiteral(eStorageClassEEnum, EStorageClass.VOLATILE);
addEEnumLiteral(eStorageClassEEnum, EStorageClass.REGISTER);
addEEnumLiteral(eStorageClassEEnum, EStorageClass.EXTERN);
- addEEnumLiteral(eStorageClassEEnum, EStorageClass.STATIC);
- addEEnumLiteral(eStorageClassEEnum, EStorageClass.INLINE);
// Create resource
createResource(eNS_URI);
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/ExternLibraryImpl.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/ExternLibraryImpl.java
index cbec6574b42..99533dfbb81 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/ExternLibraryImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/ExternLibraryImpl.java
@@ -9,6 +9,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
import org.eclipse.papyrus.C_Cpp.C_CppPackage;
import org.eclipse.papyrus.C_Cpp.ExternLibrary;
@@ -20,7 +21,7 @@ import org.eclipse.papyrus.C_Cpp.ExternLibrary;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.C_Cpp.impl.ExternLibraryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.C_Cpp.impl.ExternLibraryImpl#getIncludePaths <em>Include Paths</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.impl.ExternLibraryImpl#getBase_package <em>Base package</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.impl.ExternLibraryImpl#getLibPaths <em>Lib Paths</em>}</li>
* <li>{@link org.eclipse.papyrus.C_Cpp.impl.ExternLibraryImpl#getMacros <em>Macros</em>}</li>
@@ -33,24 +34,14 @@ import org.eclipse.papyrus.C_Cpp.ExternLibrary;
*/
public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
/**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * The cached value of the '{@link #getIncludePaths() <em>Include Paths</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getName()
+ * @see #getIncludePaths()
* @generated
* @ordered
*/
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
+ protected EList<String> includePaths;
/**
* The cached value of the '{@link #getBase_package() <em>Base package</em>}' reference.
@@ -126,20 +117,11 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
* <!-- end-user-doc -->
* @generated
*/
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, C_CppPackage.EXTERN_LIBRARY__NAME, oldName, name));
+ public EList<String> getIncludePaths() {
+ if (includePaths == null) {
+ includePaths = new EDataTypeEList<String>(String.class, this, C_CppPackage.EXTERN_LIBRARY__INCLUDE_PATHS);
+ }
+ return includePaths;
}
/**
@@ -236,8 +218,8 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case C_CppPackage.EXTERN_LIBRARY__NAME:
- return getName();
+ case C_CppPackage.EXTERN_LIBRARY__INCLUDE_PATHS:
+ return getIncludePaths();
case C_CppPackage.EXTERN_LIBRARY__BASE_PACKAGE:
if (resolve) return getBase_package();
return basicGetBase_package();
@@ -262,8 +244,9 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case C_CppPackage.EXTERN_LIBRARY__NAME:
- setName((String)newValue);
+ case C_CppPackage.EXTERN_LIBRARY__INCLUDE_PATHS:
+ getIncludePaths().clear();
+ getIncludePaths().addAll((Collection<? extends String>)newValue);
return;
case C_CppPackage.EXTERN_LIBRARY__BASE_PACKAGE:
setBase_package((org.eclipse.uml2.uml.Package)newValue);
@@ -296,8 +279,8 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case C_CppPackage.EXTERN_LIBRARY__NAME:
- setName(NAME_EDEFAULT);
+ case C_CppPackage.EXTERN_LIBRARY__INCLUDE_PATHS:
+ getIncludePaths().clear();
return;
case C_CppPackage.EXTERN_LIBRARY__BASE_PACKAGE:
setBase_package((org.eclipse.uml2.uml.Package)null);
@@ -326,8 +309,8 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case C_CppPackage.EXTERN_LIBRARY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case C_CppPackage.EXTERN_LIBRARY__INCLUDE_PATHS:
+ return includePaths != null && !includePaths.isEmpty();
case C_CppPackage.EXTERN_LIBRARY__BASE_PACKAGE:
return base_package != null;
case C_CppPackage.EXTERN_LIBRARY__LIB_PATHS:
@@ -352,8 +335,8 @@ public class ExternLibraryImpl extends EObjectImpl implements ExternLibrary {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
+ result.append(" (includePaths: ");
+ result.append(includePaths);
result.append(", libPaths: ");
result.append(libPaths);
result.append(", macros: ");
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/StorageClassImpl.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/StorageClassImpl.java
index c7cbee49572..d3fc67c87d6 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/StorageClassImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/StorageClassImpl.java
@@ -37,7 +37,7 @@ public class StorageClassImpl extends EObjectImpl implements StorageClass {
* @generated
* @ordered
*/
- protected static final EStorageClass STORAGE_CLASS_EDEFAULT = EStorageClass.AUTO;
+ protected static final EStorageClass STORAGE_CLASS_EDEFAULT = EStorageClass.VOLATILE;
/**
* The cached value of the '{@link #getStorageClass() <em>Storage Class</em>}' attribute.
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/cpp/profile/StUtils.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/cpp/profile/StUtils.java
index 6269be8b35e..da6cdf828a4 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/cpp/profile/StUtils.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/cpp/profile/StUtils.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
* Some functions around stereotype usage.
@@ -94,26 +95,6 @@ public class StUtils {
}
/**
- * Return the stereotype application by passing an element of the static profile
- *
- * @param element
- * the UML model element
- * @param clazz
- * the class of an element of a static profile. Compatible sub-types will be returned as well
- * @return the stereotype application or null
- */
- @SuppressWarnings("unchecked")
- public static <T extends EObject> T getApplication(Element element, java.lang.Class<T> clazz) {
- for(EObject stereoApplication : element.getStereotypeApplications()) {
- // check whether the stereotype is an instance of the passed parameter clazz
- if(clazz.isInstance(stereoApplication)) {
- return (T)stereoApplication;
- }
- }
- return null;
- }
-
- /**
* Apply a stereotype. The stereotype is not applied, if already a sub-stereotype is applied.
* If you want to apply the new stereotype also in this case, use applyExact instead.
*
@@ -169,26 +150,11 @@ public class StUtils {
*/
public static <T extends EObject> T applyApp(Element element, java.lang.Class<T> clazz) {
if(apply(element, clazz) != null) {
- return getApplication(element, clazz);
+ return UMLUtil.getStereotypeApplication(element, clazz);
}
return null;
}
- /**
- * @param element
- * @param stereo_name
- * @return
- */
- public static Stereotype applyExact(Element element, String stereo_name) {
- Stereotype stereotype = element.getApplicableStereotype(stereo_name);
- if(stereotype != null) {
- Stereotype alreadyApplied = element.getAppliedSubstereotype(stereotype, stereo_name);
- if(alreadyApplied == null) {
- element.applyStereotype(stereotype);
- }
- }
- return stereotype;
- }
/**
* Apply a stereotype.
@@ -221,21 +187,6 @@ public class StUtils {
unapply(element, getStereoName(element, clazz));
}
- /**
- * Apply a stereotype.
- * Caveat: the function relies on the correspondence between the fully qualified
- * stereotype name and the package name within the static profile. The latter may
- * use a different prefix (as it is the case with the MARTE analysis & design profile).
- *
- * @param element
- * the element
- * @param stereo_name
- * the stereotype name
- * @return
- */
- public static Stereotype applyExact(Element element, java.lang.Class<? extends EObject> clazz) {
- return applyExact(element, getStereoName(element, clazz));
- }
public static Stereotype getStereo(Element element, java.lang.Class<? extends EObject> clazz) {
return element.getAppliedStereotype(getStereoName(element, clazz));

Back to the top