Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-03-22 10:44:57 +0000
committerHenrik Rentz-Reichert2013-03-22 10:44:57 +0000
commitfb013f3fa54370f5c66ece277fa2e1702c47bbb9 (patch)
tree5b9158143ab506d1e39b51fdc1c9565db737a13b
parent609c57fca51f03df3c9d57811d2bda605efe0fac (diff)
downloadorg.eclipse.etrice-fb013f3fa54370f5c66ece277fa2e1702c47bbb9.tar.gz
org.eclipse.etrice-fb013f3fa54370f5c66ece277fa2e1702c47bbb9.tar.xz
org.eclipse.etrice-fb013f3fa54370f5c66ece277fa2e1702c47bbb9.zip
[core.etmap] bug 398876: add documentation to Xtext generated meta models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398876
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/ETMap.ecore93
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Import.java31
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Mapping.java30
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/MappingModel.java30
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/SubSystemMapping.java30
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/ThreadMapping.java22
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend128
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java141
8 files changed, 427 insertions, 78 deletions
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/ETMap.ecore b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/ETMap.ecore
index ac64983e0..6b2551384 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/ETMap.ecore
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/ETMap.ecore
@@ -3,30 +3,97 @@
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="eTMap" nsURI="http://www.eclipse.org/etrice/core/etmap/ETMap"
nsPrefix="eTMap">
<eClassifiers xsi:type="ecore:EClass" name="MappingModel">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The root object for the mapping model. It gives access to the mappings defined.&#xD;&#xA;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The model name is a dot separated fully qualified name and is&#xD;&#xA;used to provide a name space.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
- eType="#//Import" containment="true"/>
+ eType="#//Import" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A list of all imported models.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="mappings" upperBound="-1"
- eType="#//Mapping" containment="true"/>
+ eType="#//Mapping" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A list of all defined mappings.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Mapping">
- <eStructuralFeatures xsi:type="ecore:EReference" name="logicalSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//LogicalSystem"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="physicalSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//PhysicalSystem"/>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the mapping of a logical system (defined in a ROOM model) to a&#xD;&#xA;physical system (defined in a physical model).&#xD;&#xA;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="logicalSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//LogicalSystem">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the logical system being mapped.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="physicalSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//PhysicalSystem">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the physical system being mapped to.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="subsysMappings" upperBound="-1"
- eType="#//SubSystemMapping" containment="true"/>
+ eType="#//SubSystemMapping" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is a list of nested mappings of the sub systems of this system.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SubSystemMapping">
- <eStructuralFeatures xsi:type="ecore:EReference" name="logicalSubSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//SubSystemRef"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//NodeRef"/>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the mapping of a sub system (defined in a ROOM model) to a&#xD;&#xA;node (defined in a physical model).&#xD;&#xA;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="logicalSubSys" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//SubSystemRef">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the logical sub system being mapped.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//NodeRef">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the node being mapped to.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="threadMappings" upperBound="-1"
- eType="#//ThreadMapping" containment="true"/>
+ eType="#//ThreadMapping" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is a list of nested mappings of logical to physical threads.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ThreadMapping">
- <eStructuralFeatures xsi:type="ecore:EReference" name="logicalThread" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//LogicalThread"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="physicalThread" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//PhysicalThread"/>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the mapping of a logical thread (defined in a ROOM model) to a&#xD;&#xA;physical thread (defined in a physical model).&#xD;&#xA;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="logicalThread" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//LogicalThread">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the logical thread being mapped.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="physicalThread" eType="ecore:EClass ../../../../../../../org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore#//PhysicalThread">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This is the physical thread being mapped to.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Import">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNamespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="importURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The import declares an imported model (given as a URI) and&#xD;&#xA;an optional imported namespace.&#xD;&#xA;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNamespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The imported name space has to be a dot separated qualified name followed by .*.&#xD;&#xA;Example: my.namespace.*&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="importURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The import URI can be a relative or absolute file system path.&#xD;&#xA;It may contain environment variables in ${} which will be expanded.&#xD;&#xA;&lt;p>&#xD;&#xA;Examples:&#xD;&#xA;&lt;ul>&#xD;&#xA; &lt;li>import model &quot;AnotherModel.room&quot;&lt;/li>&#xD;&#xA; &lt;li>import my.namespace.* from &quot;AnotherModel.room&quot;&lt;/li>&#xD;&#xA; &lt;li>import my.namespace.* from &quot;../../AnotherProject/models/AnotherModel.room&quot;&lt;/li>&#xD;&#xA; &lt;li>import my.namespace.* from &quot;/${ROOM_MODELS}/SomeModel.room&quot;&lt;/li>&#xD;&#xA;&lt;/ul>&#xD;&#xA;&lt;/p>&#xD;&#xA;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Import.java b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Import.java
index f6e2f51c8..542abc6f8 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Import.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Import.java
@@ -9,6 +9,12 @@ import org.eclipse.emf.ecore.EObject;
* A representation of the model object '<em><b>Import</b></em>'.
* <!-- end-user-doc -->
*
+ * <!-- begin-model-doc -->
+ * The import declares an imported model (given as a URI) and
+ * an optional imported namespace.
+ *
+ * <!-- end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
@@ -26,11 +32,12 @@ public interface Import extends EObject
/**
* Returns the value of the '<em><b>Imported Namespace</b></em>' attribute.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Imported Namespace</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The imported name space has to be a dot separated qualified name followed by .*.
+ * Example: my.namespace.*
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Imported Namespace</em>' attribute.
* @see #setImportedNamespace(String)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getImport_ImportedNamespace()
@@ -52,11 +59,21 @@ public interface Import extends EObject
/**
* Returns the value of the '<em><b>Import URI</b></em>' attribute.
* <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The import URI can be a relative or absolute file system path.
+ * It may contain environment variables in ${} which will be expanded.
* <p>
- * If the meaning of the '<em>Import URI</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * Examples:
+ * <ul>
+ * <li>import model "AnotherModel.room"</li>
+ * <li>import my.namespace.* from "AnotherModel.room"</li>
+ * <li>import my.namespace.* from "../../AnotherProject/models/AnotherModel.room"</li>
+ * <li>import my.namespace.* from "/${ROOM_MODELS}/SomeModel.room"</li>
+ * </ul>
* </p>
- * <!-- end-user-doc -->
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Import URI</em>' attribute.
* @see #setImportURI(String)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getImport_ImportURI()
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Mapping.java b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Mapping.java
index ab638cb4f..58b925040 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Mapping.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/Mapping.java
@@ -15,6 +15,12 @@ import org.eclipse.etrice.core.room.LogicalSystem;
* A representation of the model object '<em><b>Mapping</b></em>'.
* <!-- end-user-doc -->
*
+ * <!-- begin-model-doc -->
+ * This is the mapping of a logical system (defined in a ROOM model) to a
+ * physical system (defined in a physical model).
+ *
+ * <!-- end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
@@ -33,11 +39,11 @@ public interface Mapping extends EObject
/**
* Returns the value of the '<em><b>Logical Sys</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Logical Sys</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the logical system being mapped.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Logical Sys</em>' reference.
* @see #setLogicalSys(LogicalSystem)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMapping_LogicalSys()
@@ -59,11 +65,11 @@ public interface Mapping extends EObject
/**
* Returns the value of the '<em><b>Physical Sys</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Physical Sys</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the physical system being mapped to.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Physical Sys</em>' reference.
* @see #setPhysicalSys(PhysicalSystem)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMapping_PhysicalSys()
@@ -86,11 +92,11 @@ public interface Mapping extends EObject
* Returns the value of the '<em><b>Subsys Mappings</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.etrice.core.etmap.eTMap.SubSystemMapping}.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Subsys Mappings</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is a list of nested mappings of the sub systems of this system.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Subsys Mappings</em>' containment reference list.
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMapping_SubsysMappings()
* @model containment="true"
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/MappingModel.java b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/MappingModel.java
index 9691fc5c6..782151dc8 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/MappingModel.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/MappingModel.java
@@ -11,6 +11,11 @@ import org.eclipse.emf.ecore.EObject;
* A representation of the model object '<em><b>Mapping Model</b></em>'.
* <!-- end-user-doc -->
*
+ * <!-- begin-model-doc -->
+ * The root object for the mapping model. It gives access to the mappings defined.
+ *
+ * <!-- end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
@@ -29,11 +34,12 @@ public interface MappingModel extends EObject
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The model name is a dot separated fully qualified name and is
+ * used to provide a name space.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMappingModel_Name()
@@ -56,11 +62,11 @@ public interface MappingModel extends EObject
* Returns the value of the '<em><b>Imports</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.etrice.core.etmap.eTMap.Import}.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Imports</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * A list of all imported models.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Imports</em>' containment reference list.
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMappingModel_Imports()
* @model containment="true"
@@ -72,11 +78,11 @@ public interface MappingModel extends EObject
* Returns the value of the '<em><b>Mappings</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.etrice.core.etmap.eTMap.Mapping}.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mappings</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * A list of all defined mappings.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Mappings</em>' containment reference list.
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getMappingModel_Mappings()
* @model containment="true"
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/SubSystemMapping.java b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/SubSystemMapping.java
index 75f792ca1..5d9925f74 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/SubSystemMapping.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/SubSystemMapping.java
@@ -15,6 +15,12 @@ import org.eclipse.etrice.core.room.SubSystemRef;
* A representation of the model object '<em><b>Sub System Mapping</b></em>'.
* <!-- end-user-doc -->
*
+ * <!-- begin-model-doc -->
+ * This is the mapping of a sub system (defined in a ROOM model) to a
+ * node (defined in a physical model).
+ *
+ * <!-- end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
@@ -33,11 +39,11 @@ public interface SubSystemMapping extends EObject
/**
* Returns the value of the '<em><b>Logical Sub Sys</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Logical Sub Sys</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the logical sub system being mapped.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Logical Sub Sys</em>' reference.
* @see #setLogicalSubSys(SubSystemRef)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getSubSystemMapping_LogicalSubSys()
@@ -59,11 +65,11 @@ public interface SubSystemMapping extends EObject
/**
* Returns the value of the '<em><b>Node</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Node</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the node being mapped to.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Node</em>' reference.
* @see #setNode(NodeRef)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getSubSystemMapping_Node()
@@ -86,11 +92,11 @@ public interface SubSystemMapping extends EObject
* Returns the value of the '<em><b>Thread Mappings</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.etrice.core.etmap.eTMap.ThreadMapping}.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Thread Mappings</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is a list of nested mappings of logical to physical threads.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Thread Mappings</em>' containment reference list.
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getSubSystemMapping_ThreadMappings()
* @model containment="true"
diff --git a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/ThreadMapping.java b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/ThreadMapping.java
index e06028c72..418966db1 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/ThreadMapping.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src-gen/org/eclipse/etrice/core/etmap/eTMap/ThreadMapping.java
@@ -13,6 +13,12 @@ import org.eclipse.etrice.core.room.LogicalThread;
* A representation of the model object '<em><b>Thread Mapping</b></em>'.
* <!-- end-user-doc -->
*
+ * <!-- begin-model-doc -->
+ * This is the mapping of a logical thread (defined in a ROOM model) to a
+ * physical thread (defined in a physical model).
+ *
+ * <!-- end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
@@ -30,11 +36,11 @@ public interface ThreadMapping extends EObject
/**
* Returns the value of the '<em><b>Logical Thread</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Logical Thread</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the logical thread being mapped.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Logical Thread</em>' reference.
* @see #setLogicalThread(LogicalThread)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getThreadMapping_LogicalThread()
@@ -56,11 +62,11 @@ public interface ThreadMapping extends EObject
/**
* Returns the value of the '<em><b>Physical Thread</b></em>' reference.
* <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Physical Thread</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This is the physical thread being mapped to.
+ *
+ * <!-- end-model-doc -->
* @return the value of the '<em>Physical Thread</em>' reference.
* @see #setPhysicalThread(PhysicalThread)
* @see org.eclipse.etrice.core.etmap.eTMap.ETMapPackage#getThreadMapping_PhysicalThread()
diff --git a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend
index 420f9f33b..8efc32410 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend
+++ b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.xtend
@@ -20,18 +20,122 @@ import static extension org.eclipse.etrice.core.postprocessing.PostprocessingHel
class DocuPostprocessor {
def process(GeneratedMetamodel metamodel) {
-// var pckg = metamodel.EPackage
-//
-// var mdl = pckg.getClass("MappingModel")
-// mdl.setDocumentation(
-// '''
-// <br>
-// ''')
-//
-// mdl.getAttribute("name").setDocumentation(
-// '''
-// <br>
-// ''')
+ val pckg = metamodel.EPackage
+
+ //------------------------------------------------------------------
+ var cls = pckg.getClass("MappingModel")
+ cls.setDocumentation(
+ '''
+ The root object for the mapping model. It gives access to the mappings defined.
+ ''')
+
+ cls.getAttribute("name").setDocumentation(
+ '''
+ The model name is a dot separated fully qualified name and is
+ used to provide a name space.
+ ''')
+
+ cls.getReference("imports").setDocumentation(
+ '''
+ A list of all imported models.
+ ''')
+
+ cls.getReference("mappings").setDocumentation(
+ '''
+ A list of all defined mappings.
+ ''')
+
+ //------------------------------------------------------------------
+ cls = pckg.getClass("Mapping")
+ cls.setDocumentation(
+ '''
+ This is the mapping of a logical system (defined in a ROOM model) to a
+ physical system (defined in a physical model).
+ ''')
+
+ cls.getReference("logicalSys").setDocumentation(
+ '''
+ This is the logical system being mapped.
+ ''')
+
+ cls.getReference("physicalSys").setDocumentation(
+ '''
+ This is the physical system being mapped to.
+ ''')
+
+ cls.getReference("subsysMappings").setDocumentation(
+ '''
+ This is a list of nested mappings of the sub systems of this system.
+ ''')
+
+ //------------------------------------------------------------------
+ cls = pckg.getClass("SubSystemMapping")
+ cls.setDocumentation(
+ '''
+ This is the mapping of a sub system (defined in a ROOM model) to a
+ node (defined in a physical model).
+ ''')
+
+ cls.getReference("logicalSubSys").setDocumentation(
+ '''
+ This is the logical sub system being mapped.
+ ''')
+
+ cls.getReference("node").setDocumentation(
+ '''
+ This is the node being mapped to.
+ ''')
+
+ cls.getReference("threadMappings").setDocumentation(
+ '''
+ This is a list of nested mappings of logical to physical threads.
+ ''')
+
+ //------------------------------------------------------------------
+ cls = pckg.getClass("ThreadMapping")
+ cls.setDocumentation(
+ '''
+ This is the mapping of a logical thread (defined in a ROOM model) to a
+ physical thread (defined in a physical model).
+ ''')
+
+ cls.getReference("logicalThread").setDocumentation(
+ '''
+ This is the logical thread being mapped.
+ ''')
+
+ cls.getReference("physicalThread").setDocumentation(
+ '''
+ This is the physical thread being mapped to.
+ ''')
+
+ //------------------------------------------------------------------
+ cls = pckg.getClass("Import")
+ cls.setDocumentation('''
+ The import declares an imported model (given as a URI) and
+ an optional imported namespace.
+ ''')
+
+ cls.getAttribute("importedNamespace").setDocumentation(
+ '''
+ The imported name space has to be a dot separated qualified name followed by .*.
+ Example: my.namespace.*
+ ''')
+
+ cls.getAttribute("importURI").setDocumentation(
+ '''
+ The import URI can be a relative or absolute file system path.
+ It may contain environment variables in ${} which will be expanded.
+ <p>
+ Examples:
+ <ul>
+ <li>import model "AnotherModel.room"</li>
+ <li>import my.namespace.* from "AnotherModel.room"</li>
+ <li>import my.namespace.* from "../../AnotherProject/models/AnotherModel.room"</li>
+ <li>import my.namespace.* from "/${ROOM_MODELS}/SomeModel.room"</li>
+ </ul>
+ </p>
+ ''')
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java
index 2f889933d..89811e52b 100644
--- a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java
+++ b/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java
@@ -1,10 +1,147 @@
package org.eclipse.etrice.core.etmap.postprocessing;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.etrice.core.postprocessing.PostprocessingHelpers;
+import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.GeneratedMetamodel;
@SuppressWarnings("all")
public class DocuPostprocessor {
- public Object process(final GeneratedMetamodel metamodel) {
- return null;
+ public void process(final GeneratedMetamodel metamodel) {
+ final EPackage pckg = metamodel.getEPackage();
+ EClass cls = PostprocessingHelpers.getClass(pckg, "MappingModel");
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("The root object for the mapping model. It gives access to the mappings defined.");
+ _builder.newLine();
+ EcoreUtil.setDocumentation(cls, _builder.toString());
+ EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
+ StringConcatenation _builder_1 = new StringConcatenation();
+ _builder_1.append("The model name is a dot separated fully qualified name and is");
+ _builder_1.newLine();
+ _builder_1.append("used to provide a name space.");
+ _builder_1.newLine();
+ EcoreUtil.setDocumentation(_attribute, _builder_1.toString());
+ EReference _reference = PostprocessingHelpers.getReference(cls, "imports");
+ StringConcatenation _builder_2 = new StringConcatenation();
+ _builder_2.append("A list of all imported models.");
+ _builder_2.newLine();
+ EcoreUtil.setDocumentation(_reference, _builder_2.toString());
+ EReference _reference_1 = PostprocessingHelpers.getReference(cls, "mappings");
+ StringConcatenation _builder_3 = new StringConcatenation();
+ _builder_3.append("A list of all defined mappings.");
+ _builder_3.newLine();
+ EcoreUtil.setDocumentation(_reference_1, _builder_3.toString());
+ EClass _class = PostprocessingHelpers.getClass(pckg, "Mapping");
+ cls = _class;
+ StringConcatenation _builder_4 = new StringConcatenation();
+ _builder_4.append("This is the mapping of a logical system (defined in a ROOM model) to a");
+ _builder_4.newLine();
+ _builder_4.append("physical system (defined in a physical model).");
+ _builder_4.newLine();
+ EcoreUtil.setDocumentation(cls, _builder_4.toString());
+ EReference _reference_2 = PostprocessingHelpers.getReference(cls, "logicalSys");
+ StringConcatenation _builder_5 = new StringConcatenation();
+ _builder_5.append("This is the logical system being mapped.");
+ _builder_5.newLine();
+ EcoreUtil.setDocumentation(_reference_2, _builder_5.toString());
+ EReference _reference_3 = PostprocessingHelpers.getReference(cls, "physicalSys");
+ StringConcatenation _builder_6 = new StringConcatenation();
+ _builder_6.append("This is the physical system being mapped to.");
+ _builder_6.newLine();
+ EcoreUtil.setDocumentation(_reference_3, _builder_6.toString());
+ EReference _reference_4 = PostprocessingHelpers.getReference(cls, "subsysMappings");
+ StringConcatenation _builder_7 = new StringConcatenation();
+ _builder_7.append("This is a list of nested mappings of the sub systems of this system.");
+ _builder_7.newLine();
+ EcoreUtil.setDocumentation(_reference_4, _builder_7.toString());
+ EClass _class_1 = PostprocessingHelpers.getClass(pckg, "SubSystemMapping");
+ cls = _class_1;
+ StringConcatenation _builder_8 = new StringConcatenation();
+ _builder_8.append("This is the mapping of a sub system (defined in a ROOM model) to a");
+ _builder_8.newLine();
+ _builder_8.append("node (defined in a physical model).");
+ _builder_8.newLine();
+ EcoreUtil.setDocumentation(cls, _builder_8.toString());
+ EReference _reference_5 = PostprocessingHelpers.getReference(cls, "logicalSubSys");
+ StringConcatenation _builder_9 = new StringConcatenation();
+ _builder_9.append("This is the logical sub system being mapped.");
+ _builder_9.newLine();
+ EcoreUtil.setDocumentation(_reference_5, _builder_9.toString());
+ EReference _reference_6 = PostprocessingHelpers.getReference(cls, "node");
+ StringConcatenation _builder_10 = new StringConcatenation();
+ _builder_10.append("This is the node being mapped to.");
+ _builder_10.newLine();
+ EcoreUtil.setDocumentation(_reference_6, _builder_10.toString());
+ EReference _reference_7 = PostprocessingHelpers.getReference(cls, "threadMappings");
+ StringConcatenation _builder_11 = new StringConcatenation();
+ _builder_11.append("This is a list of nested mappings of logical to physical threads.");
+ _builder_11.newLine();
+ EcoreUtil.setDocumentation(_reference_7, _builder_11.toString());
+ EClass _class_2 = PostprocessingHelpers.getClass(pckg, "ThreadMapping");
+ cls = _class_2;
+ StringConcatenation _builder_12 = new StringConcatenation();
+ _builder_12.append("This is the mapping of a logical thread (defined in a ROOM model) to a");
+ _builder_12.newLine();
+ _builder_12.append("physical thread (defined in a physical model).");
+ _builder_12.newLine();
+ EcoreUtil.setDocumentation(cls, _builder_12.toString());
+ EReference _reference_8 = PostprocessingHelpers.getReference(cls, "logicalThread");
+ StringConcatenation _builder_13 = new StringConcatenation();
+ _builder_13.append("This is the logical thread being mapped.");
+ _builder_13.newLine();
+ EcoreUtil.setDocumentation(_reference_8, _builder_13.toString());
+ EReference _reference_9 = PostprocessingHelpers.getReference(cls, "physicalThread");
+ StringConcatenation _builder_14 = new StringConcatenation();
+ _builder_14.append("This is the physical thread being mapped to.");
+ _builder_14.newLine();
+ EcoreUtil.setDocumentation(_reference_9, _builder_14.toString());
+ EClass _class_3 = PostprocessingHelpers.getClass(pckg, "Import");
+ cls = _class_3;
+ StringConcatenation _builder_15 = new StringConcatenation();
+ _builder_15.append("The import declares an imported model (given as a URI) and");
+ _builder_15.newLine();
+ _builder_15.append("an optional imported namespace.");
+ _builder_15.newLine();
+ EcoreUtil.setDocumentation(cls, _builder_15.toString());
+ EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "importedNamespace");
+ StringConcatenation _builder_16 = new StringConcatenation();
+ _builder_16.append("The imported name space has to be a dot separated qualified name followed by .*.");
+ _builder_16.newLine();
+ _builder_16.append("Example: my.namespace.*");
+ _builder_16.newLine();
+ EcoreUtil.setDocumentation(_attribute_1, _builder_16.toString());
+ EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "importURI");
+ StringConcatenation _builder_17 = new StringConcatenation();
+ _builder_17.append("The import URI can be a relative or absolute file system path.");
+ _builder_17.newLine();
+ _builder_17.append("It may contain environment variables in ${} which will be expanded.");
+ _builder_17.newLine();
+ _builder_17.append("<p>");
+ _builder_17.newLine();
+ _builder_17.append("Examples:");
+ _builder_17.newLine();
+ _builder_17.append("<ul>");
+ _builder_17.newLine();
+ _builder_17.append(" ");
+ _builder_17.append("<li>import model \"AnotherModel.room\"</li>");
+ _builder_17.newLine();
+ _builder_17.append(" ");
+ _builder_17.append("<li>import my.namespace.* from \"AnotherModel.room\"</li>");
+ _builder_17.newLine();
+ _builder_17.append(" ");
+ _builder_17.append("<li>import my.namespace.* from \"../../AnotherProject/models/AnotherModel.room\"</li>");
+ _builder_17.newLine();
+ _builder_17.append(" ");
+ _builder_17.append("<li>import my.namespace.* from \"/${ROOM_MODELS}/SomeModel.room\"</li>");
+ _builder_17.newLine();
+ _builder_17.append("</ul>");
+ _builder_17.newLine();
+ _builder_17.append("</p>");
+ _builder_17.newLine();
+ EcoreUtil.setDocumentation(_attribute_2, _builder_17.toString());
}
}

Back to the top