Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2013-05-02 06:34:50 -0400
committerrschnekenbu2013-05-02 06:34:50 -0400
commit029b4fc15522ad216180d590c0f4228a86a8b4f0 (patch)
treea3ae36d1b410f55a0cd38b4b1191b9ccd95525a3 /plugins/developer/org.eclipse.papyrus.gmfgenextension
parent0b1d3114b0a21b442e110e91883af58b3e6b3811 (diff)
downloadorg.eclipse.papyrus-029b4fc15522ad216180d590c0f4228a86a8b4f0.tar.gz
org.eclipse.papyrus-029b4fc15522ad216180d590c0f4228a86a8b4f0.tar.xz
org.eclipse.papyrus-029b4fc15522ad216180d590c0f4228a86a8b4f0.zip
407054: [Activity] Activity diagram shall reuse UML.Edit commands to create elements
https://bugs.eclipse.org/bugs/show_bug.cgi?id=407054
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF7
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/GenerateMetamodelType.gifbin0 -> 547 bytes
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/updateElementType.gifbin0 -> 330 bytes
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.genmodel7
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml34
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalElementTypesLibrary.java18
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalMetamodelType.java52
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/GenerateUsingElementTypeCreationCommand.java17
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java27
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java409
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalElementTypesLibraryImpl.java201
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalMetamodelTypeImpl.java159
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/GenerateUsingElementTypeCreationCommandImpl.java39
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java35
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java81
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddSemanticElementTypeInGenericTopNode.java187
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/UpdateElementTypeToMatchGenericType.java255
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java187
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java184
21 files changed, 1905 insertions, 5 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/.settings/org.eclipse.core.resources.prefs b/plugins/developer/org.eclipse.papyrus.gmfgenextension/.settings/org.eclipse.core.resources.prefs
index 9cde684b01f..2ee1519f197 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,2 @@
-#Tue Jun 08 19:10:09 CEST 2010
eclipse.preferences.version=1
encoding//src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/messages.properties=ISO-8859-1
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
index b62611ec786..4630c3bcc5b 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
@@ -4,18 +4,21 @@ Export-Package: org.eclipse.papyrus.papyrusgmfgenextension,
org.eclipse.papyrus.papyrusgmfgenextension.popupaction,
org.eclipse.papyrus.papyrusgmfgenextension.util
Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.papyrus.domaincontextcodegen;visibility:=reexport,
+ org.eclipse.emf.codegen.ecore;visibility:=reexport,
org.eclipse.gmf.codegen;visibility:=reexport,
org.eclipse.ui;bundle-version="3.5.0",
org.eclipse.uml2.uml;bundle-version="3.0.0",
org.eclipse.uml2.uml.edit;bundle-version="3.0.0",
org.eclipse.uml2.codegen.ecore;bundle-version="1.6.0"
+Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Bundle-ClassPath: .
Bundle-Version: 0.10.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.gmfgenextension;singleton:=tr
- ue
+Bundle-SymbolicName: org.eclipse.papyrus.gmfgenextension;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/GenerateMetamodelType.gif b/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/GenerateMetamodelType.gif
new file mode 100644
index 00000000000..b6831627209
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/GenerateMetamodelType.gif
Binary files differ
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/updateElementType.gif b/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/updateElementType.gif
new file mode 100644
index 00000000000..e3831471a65
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/icons/updateElementType.gif
Binary files differ
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
index f5fc4c6e9b2..3c0432ff3e2 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
@@ -161,4 +161,14 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="genView" upperBound="-1"
eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenCommonBase"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ExternalElementTypesLibrary" eSuperTypes="platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenNode #//CommentedElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ExternalMetamodelType" eSuperTypes="platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//MetamodelType">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elementTypeRef" eType="ecore:EClass ../../org.eclipse.papyrus.domaincontextcodegen/resource/DomainContext.ecore#//ElementType"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenerateUsingElementTypeCreationCommand"
+ eSuperTypes="#//CommentedElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="Documentation" value="flag that indicated if the code generation should rely on the creation command generated by gmf tooling of the creation commands based on UML.edit framework"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.genmodel b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.genmodel
index 65bab3e14e3..ef3fb659fa6 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.genmodel
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.genmodel
@@ -2,7 +2,7 @@
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.gmfgenextension/src" modelPluginID="org.eclipse.papyrus.gmfgenextension"
modelName="PapyrusGmfgenExtension" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel#//genmodel platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.genmodel#//gmfgen">
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.papyrus.domaincontextcodegen/resource/DomainContext.genmodel#//domaincontextcodegen platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel#//genmodel platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.genmodel#//gmfgen">
<foreignModel>papyrusGmfgenExtension.ecore</foreignModel>
<genPackages prefix="Papyrusgmfgenextension" basePackage="org.eclipse.papyrus" disposableProviderFactory="true"
ecorePackage="papyrusGmfgenExtension.ecore#/">
@@ -89,5 +89,10 @@
<genClasses ecoreClass="papyrusGmfgenExtension.ecore#//ConstrainedByReferenceCompartmentItemSemanticEditPolicy">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrusGmfgenExtension.ecore#//ConstrainedByReferenceCompartmentItemSemanticEditPolicy/genView"/>
</genClasses>
+ <genClasses ecoreClass="papyrusGmfgenExtension.ecore#//ExternalElementTypesLibrary"/>
+ <genClasses ecoreClass="papyrusGmfgenExtension.ecore#//ExternalMetamodelType">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrusGmfgenExtension.ecore#//ExternalMetamodelType/elementTypeRef"/>
+ </genClasses>
+ <genClasses ecoreClass="papyrusGmfgenExtension.ecore#//GenerateUsingElementTypeCreationCommand"/>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
index e7e8918f1f2..25f575057ab 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
@@ -223,6 +223,40 @@
</or>
</enablement>
</action>
+
+ <action
+ class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddSemanticElementTypeInGenericTopNode"
+ icon="icons/GenerateMetamodelType.gif"
+ id="org.eclipse.papyrus.gmfgenextension.addSemanticElementTypeInGenericTopNode"
+ label="Add Semantic Element Type In Generic Top Node"
+ menubarPath="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.MenuPapyrus/AddSemanticElementTypeInGenericTopNode"
+ tooltip="Generate Sermantic Metamodel types for UML metamodel">
+ <enablement>
+ <or>
+ <objectClass
+ name="org.eclipse.gmf.codegen.gmfgen.GenDiagram">
+ </objectClass>
+ </or>
+ </enablement>
+ </action>
+ <action
+ class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.UpdateElementTypeToMatchGenericType"
+ icon="icons/updateElementType.gif"
+ id="org.eclipse.papyrus.gmfgenextension.updateElementTypeToMatchGenericType"
+ label="Update ElementType To Match Generic Type"
+ menubarPath="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.MenuPapyrus/UpdateElementTypeToMatchGenericType"
+ tooltip="Update ElementType To Match Generic Type">
+ <enablement>
+ <or>
+ <objectClass
+ name="org.eclipse.gmf.codegen.gmfgen.MetamodelType">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.gmf.codegen.gmfgen.SpecializationType">
+ </objectClass>
+ </or>
+ </enablement>
+ </action>
</objectContribution>
</extension>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalElementTypesLibrary.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalElementTypesLibrary.java
new file mode 100644
index 00000000000..042d60203ba
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalElementTypesLibrary.java
@@ -0,0 +1,18 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>External Element Types Library</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getExternalElementTypesLibrary()
+ * @model
+ * @generated
+ */
+public interface ExternalElementTypesLibrary extends GenNode, CommentedElement {
+} // ExternalElementTypesLibrary
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalMetamodelType.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalMetamodelType.java
new file mode 100644
index 00000000000..aa00fb3c374
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/ExternalMetamodelType.java
@@ -0,0 +1,52 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
+
+import org.eclipse.papyrus.domaincontextcodegen.ElementType;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>External Metamodel Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType#getElementTypeRef <em>Element Type Ref</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getExternalMetamodelType()
+ * @model
+ * @generated
+ */
+public interface ExternalMetamodelType extends MetamodelType {
+ /**
+ * Returns the value of the '<em><b>Element Type Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element Type Ref</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element Type Ref</em>' reference.
+ * @see #setElementTypeRef(ElementType)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getExternalMetamodelType_ElementTypeRef()
+ * @model
+ * @generated
+ */
+ ElementType getElementTypeRef();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType#getElementTypeRef <em>Element Type Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element Type Ref</em>' reference.
+ * @see #getElementTypeRef()
+ * @generated
+ */
+ void setElementTypeRef(ElementType value);
+
+} // ExternalMetamodelType
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/GenerateUsingElementTypeCreationCommand.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/GenerateUsingElementTypeCreationCommand.java
new file mode 100644
index 00000000000..1d335f0a47a
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/GenerateUsingElementTypeCreationCommand.java
@@ -0,0 +1,17 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Generate Using Element Type Creation Command</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getGenerateUsingElementTypeCreationCommand()
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='flag that indicated if the code generation should rely on the creation command generated by gmf tooling of the creation commands based on UML.edit framework'"
+ * @generated
+ */
+public interface GenerateUsingElementTypeCreationCommand extends CommentedElement {
+} // GenerateUsingElementTypeCreationCommand
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
index aa20c146278..2177d021fb8 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
@@ -216,6 +216,33 @@ public interface PapyrusgmfgenextensionFactory extends EFactory {
ConstrainedByReferenceCompartmentItemSemanticEditPolicy createConstrainedByReferenceCompartmentItemSemanticEditPolicy();
/**
+ * Returns a new object of class '<em>External Element Types Library</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>External Element Types Library</em>'.
+ * @generated
+ */
+ ExternalElementTypesLibrary createExternalElementTypesLibrary();
+
+ /**
+ * Returns a new object of class '<em>External Metamodel Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>External Metamodel Type</em>'.
+ * @generated
+ */
+ ExternalMetamodelType createExternalMetamodelType();
+
+ /**
+ * Returns a new object of class '<em>Generate Using Element Type Creation Command</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Generate Using Element Type Creation Command</em>'.
+ * @generated
+ */
+ GenerateUsingElementTypeCreationCommand createGenerateUsingElementTypeCreationCommand();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
index b6dc780d843..034fa06851e 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
@@ -10,6 +10,7 @@ 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.gmf.codegen.gmfgen.GMFGenPackage;
/**
* <!-- begin-user-doc -->
@@ -1065,6 +1066,335 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalElementTypesLibraryImpl <em>External Element Types Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalElementTypesLibraryImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getExternalElementTypesLibrary()
+ * @generated
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY = 21;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__DIAGRAM_RUN_TIME_CLASS = GMFGenPackage.GEN_NODE__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__VISUAL_ID = GMFGenPackage.GEN_NODE__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Element Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__ELEMENT_TYPE = GMFGenPackage.GEN_NODE__ELEMENT_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__EDIT_PART_CLASS_NAME = GMFGenPackage.GEN_NODE__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Item Semantic Edit Policy Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__ITEM_SEMANTIC_EDIT_POLICY_CLASS_NAME = GMFGenPackage.GEN_NODE__ITEM_SEMANTIC_EDIT_POLICY_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Notation View Factory Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__NOTATION_VIEW_FACTORY_CLASS_NAME = GMFGenPackage.GEN_NODE__NOTATION_VIEW_FACTORY_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Viewmap</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__VIEWMAP = GMFGenPackage.GEN_NODE__VIEWMAP;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__STYLES = GMFGenPackage.GEN_NODE__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Behaviour</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__BEHAVIOUR = GMFGenPackage.GEN_NODE__BEHAVIOUR;
+
+ /**
+ * The feature id for the '<em><b>Sans Domain</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__SANS_DOMAIN = GMFGenPackage.GEN_NODE__SANS_DOMAIN;
+
+ /**
+ * The feature id for the '<em><b>Contained Nodes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__CONTAINED_NODES = GMFGenPackage.GEN_NODE__CONTAINED_NODES;
+
+ /**
+ * The feature id for the '<em><b>Canonical Edit Policy Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__CANONICAL_EDIT_POLICY_CLASS_NAME = GMFGenPackage.GEN_NODE__CANONICAL_EDIT_POLICY_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Child Nodes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__CHILD_NODES = GMFGenPackage.GEN_NODE__CHILD_NODES;
+
+ /**
+ * The feature id for the '<em><b>Gen Outgoing Links</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__GEN_OUTGOING_LINKS = GMFGenPackage.GEN_NODE__GEN_OUTGOING_LINKS;
+
+ /**
+ * The feature id for the '<em><b>Gen Incoming Links</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__GEN_INCOMING_LINKS = GMFGenPackage.GEN_NODE__GEN_INCOMING_LINKS;
+
+ /**
+ * The feature id for the '<em><b>Model Facet</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__MODEL_FACET = GMFGenPackage.GEN_NODE__MODEL_FACET;
+
+ /**
+ * The feature id for the '<em><b>Labels</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__LABELS = GMFGenPackage.GEN_NODE__LABELS;
+
+ /**
+ * The feature id for the '<em><b>Compartments</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__COMPARTMENTS = GMFGenPackage.GEN_NODE__COMPARTMENTS;
+
+ /**
+ * The feature id for the '<em><b>Primary Drag Edit Policy Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__PRIMARY_DRAG_EDIT_POLICY_QUALIFIED_CLASS_NAME = GMFGenPackage.GEN_NODE__PRIMARY_DRAG_EDIT_POLICY_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Graphical Node Edit Policy Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__GRAPHICAL_NODE_EDIT_POLICY_CLASS_NAME = GMFGenPackage.GEN_NODE__GRAPHICAL_NODE_EDIT_POLICY_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Create Command Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__CREATE_COMMAND_CLASS_NAME = GMFGenPackage.GEN_NODE__CREATE_COMMAND_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Reoriented Incoming Links</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__REORIENTED_INCOMING_LINKS = GMFGenPackage.GEN_NODE__REORIENTED_INCOMING_LINKS;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT = GMFGenPackage.GEN_NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>External Element Types Library</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_ELEMENT_TYPES_LIBRARY_FEATURE_COUNT = GMFGenPackage.GEN_NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalMetamodelTypeImpl <em>External Metamodel Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalMetamodelTypeImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getExternalMetamodelType()
+ * @generated
+ */
+ int EXTERNAL_METAMODEL_TYPE = 22;
+
+ /**
+ * The feature id for the '<em><b>Diagram Element</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__DIAGRAM_ELEMENT = GMFGenPackage.METAMODEL_TYPE__DIAGRAM_ELEMENT;
+
+ /**
+ * The feature id for the '<em><b>Unique Identifier</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__UNIQUE_IDENTIFIER = GMFGenPackage.METAMODEL_TYPE__UNIQUE_IDENTIFIER;
+
+ /**
+ * The feature id for the '<em><b>Display Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__DISPLAY_NAME = GMFGenPackage.METAMODEL_TYPE__DISPLAY_NAME;
+
+ /**
+ * The feature id for the '<em><b>Defined Externally</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__DEFINED_EXTERNALLY = GMFGenPackage.METAMODEL_TYPE__DEFINED_EXTERNALLY;
+
+ /**
+ * The feature id for the '<em><b>Edit Helper Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__EDIT_HELPER_CLASS_NAME = GMFGenPackage.METAMODEL_TYPE__EDIT_HELPER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Element Type Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF = GMFGenPackage.METAMODEL_TYPE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>External Metamodel Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTERNAL_METAMODEL_TYPE_FEATURE_COUNT = GMFGenPackage.METAMODEL_TYPE_FEATURE_COUNT + 1;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.GenerateUsingElementTypeCreationCommandImpl <em>Generate Using Element Type Creation Command</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.GenerateUsingElementTypeCreationCommandImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getGenerateUsingElementTypeCreationCommand()
+ * @generated
+ */
+ int GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND = 23;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND__COMMENT = COMMENTED_ELEMENT__COMMENT;
+
+ /**
+ * The number of structural features of the '<em>Generate Using Element Type Creation Command</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND_FEATURE_COUNT = COMMENTED_ELEMENT_FEATURE_COUNT + 0;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView <em>Extended Gen View</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1726,6 +2056,47 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
EReference getConstrainedByReferenceCompartmentItemSemanticEditPolicy_GenView();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary <em>External Element Types Library</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>External Element Types Library</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary
+ * @generated
+ */
+ EClass getExternalElementTypesLibrary();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType <em>External Metamodel Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>External Metamodel Type</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType
+ * @generated
+ */
+ EClass getExternalMetamodelType();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType#getElementTypeRef <em>Element Type Ref</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element Type Ref</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType#getElementTypeRef()
+ * @see #getExternalMetamodelType()
+ * @generated
+ */
+ EReference getExternalMetamodelType_ElementTypeRef();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand <em>Generate Using Element Type Creation Command</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Generate Using Element Type Creation Command</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand
+ * @generated
+ */
+ EClass getGenerateUsingElementTypeCreationCommand();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2286,6 +2657,44 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
*/
EReference CONSTRAINED_BY_REFERENCE_COMPARTMENT_ITEM_SEMANTIC_EDIT_POLICY__GEN_VIEW = eINSTANCE.getConstrainedByReferenceCompartmentItemSemanticEditPolicy_GenView();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalElementTypesLibraryImpl <em>External Element Types Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalElementTypesLibraryImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getExternalElementTypesLibrary()
+ * @generated
+ */
+ EClass EXTERNAL_ELEMENT_TYPES_LIBRARY = eINSTANCE.getExternalElementTypesLibrary();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalMetamodelTypeImpl <em>External Metamodel Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalMetamodelTypeImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getExternalMetamodelType()
+ * @generated
+ */
+ EClass EXTERNAL_METAMODEL_TYPE = eINSTANCE.getExternalMetamodelType();
+
+ /**
+ * The meta object literal for the '<em><b>Element Type Ref</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF = eINSTANCE.getExternalMetamodelType_ElementTypeRef();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.GenerateUsingElementTypeCreationCommandImpl <em>Generate Using Element Type Creation Command</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.GenerateUsingElementTypeCreationCommandImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getGenerateUsingElementTypeCreationCommand()
+ * @generated
+ */
+ EClass GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND = eINSTANCE.getGenerateUsingElementTypeCreationCommand();
+
}
} //PapyrusgmfgenextensionPackage
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalElementTypesLibraryImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalElementTypesLibraryImpl.java
new file mode 100644
index 00000000000..bbc10af35aa
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalElementTypesLibraryImpl.java
@@ -0,0 +1,201 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.impl.GenNodeImpl;
+import org.eclipse.papyrus.papyrusgmfgenextension.CommentedElement;
+import org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>External Element Types Library</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalElementTypesLibraryImpl#getComment <em>Comment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ExternalElementTypesLibraryImpl extends GenNodeImpl implements ExternalElementTypesLibrary {
+ /**
+ * The default value of the '{@link #getComment() <em>Comment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComment()
+ * @generated
+ * @ordered
+ */
+ protected static final String COMMENT_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getComment() <em>Comment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComment()
+ * @generated
+ * @ordered
+ */
+ protected String comment = COMMENT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExternalElementTypesLibraryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.EXTERNAL_ELEMENT_TYPES_LIBRARY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getComment() {
+ return comment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setComment(String newComment) {
+ String oldComment = comment;
+ comment = newComment;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT, oldComment, comment));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT:
+ return getComment();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT:
+ setComment((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT:
+ setComment(COMMENT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT:
+ return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == CommentedElement.class) {
+ switch (derivedFeatureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT: return PapyrusgmfgenextensionPackage.COMMENTED_ELEMENT__COMMENT;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == CommentedElement.class) {
+ switch (baseFeatureID) {
+ case PapyrusgmfgenextensionPackage.COMMENTED_ELEMENT__COMMENT: return PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY__COMMENT;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (comment: ");
+ result.append(comment);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public GenDiagram getDiagram() {
+ return null;
+ }
+
+} //ExternalElementTypesLibraryImpl
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalMetamodelTypeImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalMetamodelTypeImpl.java
new file mode 100644
index 00000000000..293a6a72274
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/ExternalMetamodelTypeImpl.java
@@ -0,0 +1,159 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.gmf.codegen.gmfgen.impl.MetamodelTypeImpl;
+
+import org.eclipse.papyrus.domaincontextcodegen.ElementType;
+
+import org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>External Metamodel Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.ExternalMetamodelTypeImpl#getElementTypeRef <em>Element Type Ref</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ExternalMetamodelTypeImpl extends MetamodelTypeImpl implements ExternalMetamodelType {
+ /**
+ * The cached value of the '{@link #getElementTypeRef() <em>Element Type Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElementTypeRef()
+ * @generated
+ * @ordered
+ */
+ protected ElementType elementTypeRef;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExternalMetamodelTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.EXTERNAL_METAMODEL_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ElementType getElementTypeRef() {
+ if (elementTypeRef != null && elementTypeRef.eIsProxy()) {
+ InternalEObject oldElementTypeRef = (InternalEObject)elementTypeRef;
+ elementTypeRef = (ElementType)eResolveProxy(oldElementTypeRef);
+ if (elementTypeRef != oldElementTypeRef) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF, oldElementTypeRef, elementTypeRef));
+ }
+ }
+ return elementTypeRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ElementType basicGetElementTypeRef() {
+ return elementTypeRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElementTypeRef(ElementType newElementTypeRef) {
+ ElementType oldElementTypeRef = elementTypeRef;
+ elementTypeRef = newElementTypeRef;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF, oldElementTypeRef, elementTypeRef));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF:
+ if (resolve) return getElementTypeRef();
+ return basicGetElementTypeRef();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF:
+ setElementTypeRef((ElementType)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF:
+ setElementTypeRef((ElementType)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF:
+ return elementTypeRef != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ExternalMetamodelTypeImpl
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/GenerateUsingElementTypeCreationCommandImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/GenerateUsingElementTypeCreationCommandImpl.java
new file mode 100644
index 00000000000..64822a0c246
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/GenerateUsingElementTypeCreationCommandImpl.java
@@ -0,0 +1,39 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Generate Using Element Type Creation Command</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class GenerateUsingElementTypeCreationCommandImpl extends CommentedElementImpl implements GenerateUsingElementTypeCreationCommand {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenerateUsingElementTypeCreationCommandImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND;
+ }
+
+} //GenerateUsingElementTypeCreationCommandImpl
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
index 91e9cdba42c..014eaf2f2e1 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
@@ -47,7 +47,7 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
*/
public static PapyrusgmfgenextensionFactory init() {
try {
- PapyrusgmfgenextensionFactory thePapyrusgmfgenextensionFactory = (PapyrusgmfgenextensionFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension");
+ PapyrusgmfgenextensionFactory thePapyrusgmfgenextensionFactory = (PapyrusgmfgenextensionFactory)EPackage.Registry.INSTANCE.getEFactory(PapyrusgmfgenextensionPackage.eNS_URI);
if (thePapyrusgmfgenextensionFactory != null) {
return thePapyrusgmfgenextensionFactory;
}
@@ -97,6 +97,9 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE: return createCompartmentVisibilityPreference();
case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE: return createCompartmentTitleVisibilityPreference();
case PapyrusgmfgenextensionPackage.CONSTRAINED_BY_REFERENCE_COMPARTMENT_ITEM_SEMANTIC_EDIT_POLICY: return createConstrainedByReferenceCompartmentItemSemanticEditPolicy();
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY: return createExternalElementTypesLibrary();
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE: return createExternalMetamodelType();
+ case PapyrusgmfgenextensionPackage.GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND: return createGenerateUsingElementTypeCreationCommand();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -317,6 +320,36 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
* <!-- end-user-doc -->
* @generated
*/
+ public ExternalElementTypesLibrary createExternalElementTypesLibrary() {
+ ExternalElementTypesLibraryImpl externalElementTypesLibrary = new ExternalElementTypesLibraryImpl();
+ return externalElementTypesLibrary;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalMetamodelType createExternalMetamodelType() {
+ ExternalMetamodelTypeImpl externalMetamodelType = new ExternalMetamodelTypeImpl();
+ return externalMetamodelType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenerateUsingElementTypeCreationCommand createGenerateUsingElementTypeCreationCommand() {
+ GenerateUsingElementTypeCreationCommandImpl generateUsingElementTypeCreationCommand = new GenerateUsingElementTypeCreationCommandImpl();
+ return generateUsingElementTypeCreationCommand;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public PapyrusgmfgenextensionPackage getPapyrusgmfgenextensionPackage() {
return (PapyrusgmfgenextensionPackage)getEPackage();
}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
index 7727d4e83fc..bd2a5bbe6db 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.papyrus.domaincontextcodegen.DomaincontextcodegenPackage;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -25,8 +26,11 @@ import org.eclipse.papyrus.papyrusgmfgenextension.ConstrainedByReferenceCompartm
import org.eclipse.papyrus.papyrusgmfgenextension.EditPartUsingDeleteService;
import org.eclipse.papyrus.papyrusgmfgenextension.EditPartUsingReorientService;
import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView;
+import org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary;
import org.eclipse.papyrus.papyrusgmfgenextension.ExternalHook;
+import org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType;
import org.eclipse.papyrus.papyrusgmfgenextension.GenNodeConstraint;
+import org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand;
import org.eclipse.papyrus.papyrusgmfgenextension.LabelVisibilityPreference;
import org.eclipse.papyrus.papyrusgmfgenextension.MutatingCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.OwnedEditpart;
@@ -181,6 +185,27 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
private EClass constrainedByReferenceCompartmentItemSemanticEditPolicyEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass externalElementTypesLibraryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass externalMetamodelTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass generateUsingElementTypeCreationCommandEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -224,6 +249,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
isInited = true;
// Initialize simple dependencies
+ DomaincontextcodegenPackage.eINSTANCE.eClass();
GMFGenPackage.eINSTANCE.eClass();
// Create package meta-data objects
@@ -767,6 +793,42 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExternalElementTypesLibrary() {
+ return externalElementTypesLibraryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExternalMetamodelType() {
+ return externalMetamodelTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getExternalMetamodelType_ElementTypeRef() {
+ return (EReference)externalMetamodelTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGenerateUsingElementTypeCreationCommand() {
+ return generateUsingElementTypeCreationCommandEClass;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -873,6 +935,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
constrainedByReferenceCompartmentItemSemanticEditPolicyEClass = createEClass(CONSTRAINED_BY_REFERENCE_COMPARTMENT_ITEM_SEMANTIC_EDIT_POLICY);
createEReference(constrainedByReferenceCompartmentItemSemanticEditPolicyEClass, CONSTRAINED_BY_REFERENCE_COMPARTMENT_ITEM_SEMANTIC_EDIT_POLICY__GEN_VIEW);
+
+ externalElementTypesLibraryEClass = createEClass(EXTERNAL_ELEMENT_TYPES_LIBRARY);
+
+ externalMetamodelTypeEClass = createEClass(EXTERNAL_METAMODEL_TYPE);
+ createEReference(externalMetamodelTypeEClass, EXTERNAL_METAMODEL_TYPE__ELEMENT_TYPE_REF);
+
+ generateUsingElementTypeCreationCommandEClass = createEClass(GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND);
}
/**
@@ -900,6 +969,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
GMFGenPackage theGMFGenPackage = (GMFGenPackage)EPackage.Registry.INSTANCE.getEPackage(GMFGenPackage.eNS_URI);
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
GenModelPackage theGenModelPackage = (GenModelPackage)EPackage.Registry.INSTANCE.getEPackage(GenModelPackage.eNS_URI);
+ DomaincontextcodegenPackage theDomaincontextcodegenPackage = (DomaincontextcodegenPackage)EPackage.Registry.INSTANCE.getEPackage(DomaincontextcodegenPackage.eNS_URI);
// Create type parameters
@@ -926,6 +996,10 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
compartmentVisibilityPreferenceEClass.getESuperTypes().add(this.getCommentedElement());
compartmentTitleVisibilityPreferenceEClass.getESuperTypes().add(this.getCommentedElement());
constrainedByReferenceCompartmentItemSemanticEditPolicyEClass.getESuperTypes().add(this.getCommentedElement());
+ externalElementTypesLibraryEClass.getESuperTypes().add(theGMFGenPackage.getGenNode());
+ externalElementTypesLibraryEClass.getESuperTypes().add(this.getCommentedElement());
+ externalMetamodelTypeEClass.getESuperTypes().add(theGMFGenPackage.getMetamodelType());
+ generateUsingElementTypeCreationCommandEClass.getESuperTypes().add(this.getCommentedElement());
// Initialize classes and features; add operations and parameters
initEClass(extendedGenViewEClass, ExtendedGenView.class, "ExtendedGenView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1011,6 +1085,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
initEClass(constrainedByReferenceCompartmentItemSemanticEditPolicyEClass, ConstrainedByReferenceCompartmentItemSemanticEditPolicy.class, "ConstrainedByReferenceCompartmentItemSemanticEditPolicy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConstrainedByReferenceCompartmentItemSemanticEditPolicy_GenView(), theGMFGenPackage.getGenCommonBase(), null, "genView", null, 0, -1, ConstrainedByReferenceCompartmentItemSemanticEditPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(externalElementTypesLibraryEClass, ExternalElementTypesLibrary.class, "ExternalElementTypesLibrary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(externalMetamodelTypeEClass, ExternalMetamodelType.class, "ExternalMetamodelType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getExternalMetamodelType_ElementTypeRef(), theDomaincontextcodegenPackage.getElementType(), null, "elementTypeRef", null, 0, 1, ExternalMetamodelType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(generateUsingElementTypeCreationCommandEClass, GenerateUsingElementTypeCreationCommand.class, "GenerateUsingElementTypeCreationCommand", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddSemanticElementTypeInGenericTopNode.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddSemanticElementTypeInGenericTopNode.java
new file mode 100644
index 00000000000..e012257b1a8
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddSemanticElementTypeInGenericTopNode.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ * All rights reserved. This program and the accompanying materials
+ * are property of the CEA, their use is subject to specific agreement
+ * with the CEA.
+ *
+ * Contributors:
+ * CEA LIST - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.papyrus.papyrusgmfgenextension.popupaction;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.gmf.codegen.gmfgen.ElementType;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.GenTopLevelNode;
+import org.eclipse.gmf.codegen.gmfgen.TypeModelFacet;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Implementation class for AddSemanticElementTypeInGenericTopNode action
+ */
+public class AddSemanticElementTypeInGenericTopNode extends Action {
+
+ /** prefix for Metamodel type identifier */
+ private static final String ORG_ECLIPSE_PAPYRUS_UML = "org.eclipse.papyrus.uml.";
+
+ public static final String GEN_CLASS_RT_CLASS = "Node"; //$NON-NLS-1$
+
+ public static final String GEN_CLASS_FACET_META_FEATURE = "NamedElement"; //$NON-NLS-1$
+
+ public static final String GEN_FEATURE_FACET_META_FEATURE = "name"; //$NON-NLS-1$
+
+ public static final String URI_NOTATION_GENMODEL = "org.eclipse.gmf.runtime.notation/model/notation.genmodel"; //$NON-NLS-1$
+
+ public static final String URI_UML_GENMODEL = "org.eclipse.uml2.uml/model/UML.genmodel"; //$NON-NLS-1$
+
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ // NO OP
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+
+ // Parse selected GenLink(s) and add the desired CustomBehavior
+ Iterator<EObject> it = getSelectedEObject().iterator();
+ while(it.hasNext()) {
+ EObject eObject = it.next();
+ if(eObject instanceof GenDiagram) {
+
+ GenDiagram genDiagram = (GenDiagram)eObject;
+ ResourceSet resourceSet = genDiagram.eResource().getResourceSet();
+ int updated = 0;
+ int created = 0;
+
+ // create and set values for top node and sub children
+ List<GenClass> concreteUMLMetaclasses = getAllUMLConcreteClasses(resourceSet);
+ for(GenClass currentGenClass : concreteUMLMetaclasses) {
+ boolean needsCreation = false;
+
+ String metaclassName = currentGenClass.getEcoreClass().getName();
+ GenTopLevelNode node = findTopLevelNode(genDiagram, currentGenClass);
+ if(node == null) {
+ needsCreation = true;
+ node = createNewTopNode(genDiagram, metaclassName);
+ created++;
+ }
+ updateToplevelNode(node, resourceSet, currentGenClass);
+
+ if(needsCreation) {
+ genDiagram.getTopLevelNodes().add(node);
+ }
+ updated++;
+ }
+
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Generation", created+ " nodes were created.\n "+updated+" nodes were updated");
+ }
+ }
+ }
+
+
+
+ /**
+ * Returns all the UML {@link GenClass} that are related to UML constructs which are not abstract
+ * @param resourceSet
+ * @return
+ */
+ protected List<GenClass> getAllUMLConcreteClasses(ResourceSet resourceSet) {
+ Resource umlResource = resourceSet.getResource( URI.createPlatformPluginURI(URI_UML_GENMODEL, false), true);
+ List<GenClass> classes = new ArrayList<GenClass>();
+ Iterator<EObject> it = umlResource.getAllContents();
+ while(it.hasNext()) {
+ EObject next = it.next();
+ if(next instanceof GenClass) {
+ GenClass genClass = (GenClass)next;
+ EClass umlEClass = genClass.getEcoreClass();
+ if(umlEClass !=null && !umlEClass.isAbstract() && !umlEClass.isInterface()) {
+ classes.add(genClass);
+ }
+ }
+ }
+ return classes;
+ }
+
+ /**
+ * Returns the top level node that corresponds to this metaclass
+ * @param metaclassName name of the metaclass for which element type has to be defined
+ * @return the top level node found or <code>null</code>;
+ */
+ protected GenTopLevelNode findTopLevelNode(GenDiagram genDiagram, GenClass genClass) {
+ for(GenTopLevelNode topNode : genDiagram.getTopLevelNodes()) {
+ TypeModelFacet facet = topNode.getModelFacet();
+ if(facet !=null) {
+ if(genClass.equals(facet.getMetaClass())) {
+ return topNode;
+ };
+ }
+ }
+ return null;
+ }
+
+ protected void updateToplevelNode(GenTopLevelNode topLevelNode, ResourceSet resourceSet, GenClass genClass) {
+ String metaclassName = genClass.getEcoreClass().getName();
+ topLevelNode.setDiagramRunTimeClass(getNodeViewClass(resourceSet));
+
+ TypeModelFacet typeModelFacet = topLevelNode.getModelFacet();
+ if(typeModelFacet == null) {
+ typeModelFacet = GMFGenFactory.eINSTANCE.createTypeModelFacet();
+ topLevelNode.setModelFacet(typeModelFacet);
+ }
+
+ typeModelFacet.setMetaClass(genClass);
+
+ ElementType type = topLevelNode.getElementType();
+ if(type == null) {
+ type = GMFGenFactory.eINSTANCE.createMetamodelType();
+ topLevelNode.setElementType(type);
+ }
+ type.setDefinedExternally(true);
+ type.setDisplayName(metaclassName+"_Semantic");
+ type.setUniqueIdentifier(ORG_ECLIPSE_PAPYRUS_UML+metaclassName);
+ }
+
+ public GenTopLevelNode createNewTopNode(GenDiagram genDiagram, String metaclassName) {
+ GenTopLevelNode topLevelNode = GMFGenFactory.eINSTANCE.createGenTopLevelNode();
+ return topLevelNode;
+ }
+
+
+ protected GenClass getNodeViewClass(ResourceSet resourceSet) {
+ URI uri_notation = URI.createPlatformPluginURI(URI_NOTATION_GENMODEL, false);
+ Resource notation = resourceSet.getResource(uri_notation, true);
+ return findGenClass(notation, GEN_CLASS_RT_CLASS);
+ }
+
+ protected GenClass getMetaclassGenClass(ResourceSet resourceSet, String metaclassName) {
+ URI uri_uml = URI.createPlatformPluginURI(URI_UML_GENMODEL, false);
+ Resource umlResource = resourceSet.getResource(uri_uml, true);
+ return findGenClass(umlResource, metaclassName);
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/UpdateElementTypeToMatchGenericType.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/UpdateElementTypeToMatchGenericType.java
new file mode 100644
index 00000000000..b9c903e9672
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/UpdateElementTypeToMatchGenericType.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ * All rights reserved. This program and the accompanying materials
+ * are property of the CEA, their use is subject to specific agreement
+ * with the CEA.
+ *
+ * Contributors:
+ * CEA LIST - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.papyrusgmfgenextension.popupaction;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.gmf.codegen.gmfgen.ElementType;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.GenTopLevelNode;
+import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
+import org.eclipse.gmf.codegen.gmfgen.SpecializationType;
+import org.eclipse.gmf.codegen.gmfgen.TypeModelFacet;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Implementation class for AddSemanticElementTypeInGenericTopNode action
+ */
+public class UpdateElementTypeToMatchGenericType extends Action {
+
+ private static final String GENERIC_UML_GMFGEN = "GenericUML.gmfgen";
+
+ /** prefix for Metamodel type identifier */
+ private static final String ORG_ECLIPSE_PAPYRUS_UML = "org.eclipse.papyrus.uml.";
+
+ public static final String GEN_CLASS_RT_CLASS = "Node"; //$NON-NLS-1$
+
+ public static final String GEN_CLASS_FACET_META_FEATURE = "NamedElement"; //$NON-NLS-1$
+
+ public static final String GEN_FEATURE_FACET_META_FEATURE = "name"; //$NON-NLS-1$
+
+ public static final String URI_NOTATION_GENMODEL = "org.eclipse.gmf.runtime.notation/model/notation.genmodel"; //$NON-NLS-1$
+
+ public static final String URI_UML_GENMODEL = "org.eclipse.uml2.uml/model/UML.genmodel"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ // NO OP
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ // Parse selected GenLink(s) and add the desired CustomBehavior
+ Iterator<EObject> it = getSelectedEObject().iterator();
+ while(it.hasNext()) {
+ EObject eObject = it.next();
+ if(eObject instanceof SpecializationType) {
+ SpecializationType specializationType = (SpecializationType)eObject;
+ Resource genericTypeResource = getGenericTypeResource(specializationType.eResource().getResourceSet());
+ if(genericTypeResource==null) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "no "+GENERIC_UML_GMFGEN+" resource has been found.");
+ return;
+ }
+ // retrieve associated metaclass
+ GenClass metaclass = specializationType.getMetamodelType().getMetaClass();
+ String id = specializationType.getUniqueIdentifier();
+ String displayName = specializationType.getDisplayName();
+ // check precondition before creating a duplicate
+ if(metaclass == null) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "metaclass is null");
+ } else {
+ // create the specialization type and update it
+ SpecializationType newType = GMFGenFactory.eINSTANCE.createSpecializationType();
+ newType.setUniqueIdentifier(id);
+ newType.setDefinedExternally(false);
+ newType.setDisplayName(displayName);
+
+ // find generic element type
+ EClass eClass = metaclass.getEcoreClass();
+
+ Iterator<EObject> genericTypes = genericTypeResource.getAllContents();
+ while(genericTypes.hasNext()) {
+ EObject object = genericTypes.next();
+ if(object instanceof MetamodelType) {
+ MetamodelType type = ((MetamodelType)object);
+ if(type.getMetaClass().getEcoreClass().equals(eClass)) {
+ newType.setMetamodelType(type);
+ }
+ }
+ }
+
+ // replace existing type
+ GenCommonBase commonBase = specializationType.getDiagramElement();
+ commonBase.setElementType(newType);
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Generation", "Specialization type was created and has replaced the specialization type\n"+newType);
+ }
+ } else if(eObject instanceof MetamodelType) {
+ MetamodelType metamodelType = (MetamodelType)eObject;
+ Resource genericTypeResource = getGenericTypeResource(metamodelType.eResource().getResourceSet());
+ if(genericTypeResource==null) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "no "+GENERIC_UML_GMFGEN+" resource has been found.");
+ return;
+ }
+ // retrieve associated metaclass
+ GenClass metaclass = metamodelType.getMetaClass();
+ String id = metamodelType.getUniqueIdentifier();
+ String displayName = metamodelType.getDisplayName();
+ // check precondition before creating a duplicate
+ if(metaclass == null) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", "metaclass is null");
+ } else {
+ // create the specialization type and update it
+ SpecializationType newType = GMFGenFactory.eINSTANCE.createSpecializationType();
+ newType.setUniqueIdentifier(id);
+ newType.setDefinedExternally(false);
+ newType.setDisplayName(displayName);
+
+ // find generic element type
+ EClass eClass = metaclass.getEcoreClass();
+
+ Iterator<EObject> genericTypes = genericTypeResource.getAllContents();
+ while(genericTypes.hasNext()) {
+ EObject object = genericTypes.next();
+ if(object instanceof MetamodelType) {
+ MetamodelType type = ((MetamodelType)object);
+ if(type.getMetaClass().getEcoreClass().equals(eClass)) {
+ newType.setMetamodelType(type);
+ }
+ }
+ }
+
+ // replace existing type
+ GenCommonBase commonBase = metamodelType.getDiagramElement();
+ commonBase.setElementType(newType);
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Generation", "Specialization type was created and has replaced the metamodel type\n"+newType);
+ }
+ }
+ }
+ }
+
+ /**
+ * @param resourceSet
+ * @return
+ */
+ protected Resource getGenericTypeResource(ResourceSet resourceSet) {
+ for(Resource resource : resourceSet.getResources()) {
+ URI resourceURI = resource.getURI();
+ String resourceName = resourceURI.segment(resourceURI.segmentCount() - 1);
+ if(GENERIC_UML_GMFGEN.equals(resourceName)) {
+ return resource;
+ }
+ }
+ return null;
+ }
+
+ protected MetamodelType getGenericType(ResourceSet resourceSet, EClass eClass) {
+ return null;
+ }
+
+ /**
+ * Returns all the UML {@link GenClass} that are related to UML constructs which are not abstract
+ *
+ * @param resourceSet
+ * @return
+ */
+ protected List<GenClass> getAllUMLConcreteClasses(ResourceSet resourceSet) {
+ Resource umlResource = resourceSet.getResource(URI.createPlatformPluginURI(URI_UML_GENMODEL, false), true);
+ List<GenClass> classes = new ArrayList<GenClass>();
+ Iterator<EObject> it = umlResource.getAllContents();
+ while(it.hasNext()) {
+ EObject next = it.next();
+ if(next instanceof GenClass) {
+ GenClass genClass = (GenClass)next;
+ EClass umlEClass = genClass.getEcoreClass();
+ if(umlEClass != null && !umlEClass.isAbstract() && !umlEClass.isInterface()) {
+ classes.add(genClass);
+ }
+ }
+ }
+ return classes;
+ }
+
+ /**
+ * Returns the top level node that corresponds to this metaclass
+ *
+ * @param metaclassName
+ * name of the metaclass for which element type has to be defined
+ * @return the top level node found or <code>null</code>;
+ */
+ protected GenTopLevelNode findTopLevelNode(GenDiagram genDiagram, GenClass genClass) {
+ for(GenTopLevelNode topNode : genDiagram.getTopLevelNodes()) {
+ TypeModelFacet facet = topNode.getModelFacet();
+ if(facet != null) {
+ if(genClass.equals(facet.getMetaClass())) {
+ return topNode;
+ };
+ }
+ }
+ return null;
+ }
+
+ protected void updateToplevelNode(GenTopLevelNode topLevelNode, ResourceSet resourceSet, GenClass genClass) {
+ String metaclassName = genClass.getEcoreClass().getName();
+ topLevelNode.setDiagramRunTimeClass(getNodeViewClass(resourceSet));
+ TypeModelFacet typeModelFacet = topLevelNode.getModelFacet();
+ if(typeModelFacet == null) {
+ typeModelFacet = GMFGenFactory.eINSTANCE.createTypeModelFacet();
+ topLevelNode.setModelFacet(typeModelFacet);
+ }
+ typeModelFacet.setMetaClass(genClass);
+ ElementType type = topLevelNode.getElementType();
+ if(type == null) {
+ type = GMFGenFactory.eINSTANCE.createMetamodelType();
+ topLevelNode.setElementType(type);
+ }
+ type.setDefinedExternally(true);
+ type.setDisplayName(metaclassName + "_Semantic");
+ type.setUniqueIdentifier(ORG_ECLIPSE_PAPYRUS_UML + metaclassName);
+ }
+
+ public GenTopLevelNode createNewTopNode(GenDiagram genDiagram, String metaclassName) {
+ GenTopLevelNode topLevelNode = GMFGenFactory.eINSTANCE.createGenTopLevelNode();
+ return topLevelNode;
+ }
+
+ protected GenClass getNodeViewClass(ResourceSet resourceSet) {
+ URI uri_notation = URI.createPlatformPluginURI(URI_NOTATION_GENMODEL, false);
+ Resource notation = resourceSet.getResource(uri_notation, true);
+ return findGenClass(notation, GEN_CLASS_RT_CLASS);
+ }
+
+ protected GenClass getMetaclassGenClass(ResourceSet resourceSet, String metaclassName) {
+ URI uri_uml = URI.createPlatformPluginURI(URI_UML_GENMODEL, false);
+ Resource umlResource = resourceSet.getResource(uri_uml, true);
+ return findGenClass(umlResource, metaclassName);
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
index 0d8fa3f5d6c..9efbb7b7020 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
@@ -10,6 +10,13 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.codegen.gmfgen.ElementType;
+import org.eclipse.gmf.codegen.gmfgen.GenChildContainer;
+import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
+import org.eclipse.gmf.codegen.gmfgen.GenContainerBase;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkEnd;
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
@@ -170,6 +177,46 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
return createConstrainedByReferenceCompartmentItemSemanticEditPolicyAdapter();
}
@Override
+ public Adapter caseExternalElementTypesLibrary(ExternalElementTypesLibrary object) {
+ return createExternalElementTypesLibraryAdapter();
+ }
+ @Override
+ public Adapter caseExternalMetamodelType(ExternalMetamodelType object) {
+ return createExternalMetamodelTypeAdapter();
+ }
+ @Override
+ public Adapter caseGenerateUsingElementTypeCreationCommand(GenerateUsingElementTypeCreationCommand object) {
+ return createGenerateUsingElementTypeCreationCommandAdapter();
+ }
+ @Override
+ public Adapter caseGenCommonBase(GenCommonBase object) {
+ return createGenCommonBaseAdapter();
+ }
+ @Override
+ public Adapter caseGenContainerBase(GenContainerBase object) {
+ return createGenContainerBaseAdapter();
+ }
+ @Override
+ public Adapter caseGenChildContainer(GenChildContainer object) {
+ return createGenChildContainerAdapter();
+ }
+ @Override
+ public Adapter caseGenLinkEnd(GenLinkEnd object) {
+ return createGenLinkEndAdapter();
+ }
+ @Override
+ public Adapter caseGenNode(GenNode object) {
+ return createGenNodeAdapter();
+ }
+ @Override
+ public Adapter caseElementType(ElementType object) {
+ return createElementTypeAdapter();
+ }
+ @Override
+ public Adapter caseMetamodelType(MetamodelType object) {
+ return createMetamodelTypeAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -484,6 +531,146 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary <em>External Element Types Library</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.ExternalElementTypesLibrary
+ * @generated
+ */
+ public Adapter createExternalElementTypesLibraryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType <em>External Metamodel Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.ExternalMetamodelType
+ * @generated
+ */
+ public Adapter createExternalMetamodelTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand <em>Generate Using Element Type Creation Command</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.GenerateUsingElementTypeCreationCommand
+ * @generated
+ */
+ public Adapter createGenerateUsingElementTypeCreationCommandAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase <em>Gen Common Base</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase
+ * @generated
+ */
+ public Adapter createGenCommonBaseAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenContainerBase <em>Gen Container Base</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenContainerBase
+ * @generated
+ */
+ public Adapter createGenContainerBaseAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer <em>Gen Child Container</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer
+ * @generated
+ */
+ public Adapter createGenChildContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenLinkEnd <em>Gen Link End</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLinkEnd
+ * @generated
+ */
+ public Adapter createGenLinkEndAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenNode <em>Gen Node</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode
+ * @generated
+ */
+ public Adapter createGenNodeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.ElementType <em>Element Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.ElementType
+ * @generated
+ */
+ public Adapter createElementTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.MetamodelType <em>Metamodel Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.MetamodelType
+ * @generated
+ */
+ public Adapter createMetamodelTypeAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
index afb51f7dd2d..f904817b922 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
@@ -12,6 +12,13 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.gmf.codegen.gmfgen.ElementType;
+import org.eclipse.gmf.codegen.gmfgen.GenChildContainer;
+import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
+import org.eclipse.gmf.codegen.gmfgen.GenContainerBase;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkEnd;
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
@@ -239,6 +246,33 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case PapyrusgmfgenextensionPackage.EXTERNAL_ELEMENT_TYPES_LIBRARY: {
+ ExternalElementTypesLibrary externalElementTypesLibrary = (ExternalElementTypesLibrary)theEObject;
+ T result = caseExternalElementTypesLibrary(externalElementTypesLibrary);
+ if (result == null) result = caseGenNode(externalElementTypesLibrary);
+ if (result == null) result = caseCommentedElement(externalElementTypesLibrary);
+ if (result == null) result = caseGenChildContainer(externalElementTypesLibrary);
+ if (result == null) result = caseGenLinkEnd(externalElementTypesLibrary);
+ if (result == null) result = caseGenContainerBase(externalElementTypesLibrary);
+ if (result == null) result = caseGenCommonBase(externalElementTypesLibrary);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PapyrusgmfgenextensionPackage.EXTERNAL_METAMODEL_TYPE: {
+ ExternalMetamodelType externalMetamodelType = (ExternalMetamodelType)theEObject;
+ T result = caseExternalMetamodelType(externalMetamodelType);
+ if (result == null) result = caseMetamodelType(externalMetamodelType);
+ if (result == null) result = caseElementType(externalMetamodelType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PapyrusgmfgenextensionPackage.GENERATE_USING_ELEMENT_TYPE_CREATION_COMMAND: {
+ GenerateUsingElementTypeCreationCommand generateUsingElementTypeCreationCommand = (GenerateUsingElementTypeCreationCommand)theEObject;
+ T result = caseGenerateUsingElementTypeCreationCommand(generateUsingElementTypeCreationCommand);
+ if (result == null) result = caseCommentedElement(generateUsingElementTypeCreationCommand);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -559,6 +593,156 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>External Element Types Library</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>External Element Types Library</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExternalElementTypesLibrary(ExternalElementTypesLibrary object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>External Metamodel Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>External Metamodel Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExternalMetamodelType(ExternalMetamodelType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Generate Using Element Type Creation Command</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Generate Using Element Type Creation Command</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenerateUsingElementTypeCreationCommand(GenerateUsingElementTypeCreationCommand object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen Common Base</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen Common Base</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenCommonBase(GenCommonBase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen Container Base</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen Container Base</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenContainerBase(GenContainerBase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen Child Container</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen Child Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenChildContainer(GenChildContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen Link End</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen Link End</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenLinkEnd(GenLinkEnd object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen Node</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGenNode(GenNode object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Element Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Element Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseElementType(ElementType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Metamodel Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Metamodel Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMetamodelType(MetamodelType object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top