Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-11-18 11:40:47 -0500
committerMickael ADAM2014-11-20 10:37:37 -0500
commit44689e90adf4724399b430d10a8fe9372197fbeb (patch)
tree988f7129bdf131163929909e40c9ef6958bffd00 /plugins/developer/org.eclipse.papyrus.gmfgenextension
parent5a1e5a0cbe42f2dbd1894bff6bdbd985bab179b9 (diff)
downloadorg.eclipse.papyrus-44689e90adf4724399b430d10a8fe9372197fbeb.tar.gz
org.eclipse.papyrus-44689e90adf4724399b430d10a8fe9372197fbeb.tar.xz
org.eclipse.papyrus-44689e90adf4724399b430d10a8fe9372197fbeb.zip
440201: [Diagram] Class diagram shapes shall be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440201 Patch Set 1: -Improve GmfGenExtension: Now override createNodePlate throught gmfgen add edit policy for external label -Clean and fix some bug in roundedCompartment Patch Set 2: - Used of RoundedRectangleNodePlate for all node by default, let the possibility to override it. Change-Id: Ie64ad8e049bd4d11cb9075987fee555ba4b97a3c Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net> 440201: [Diagram] Class diagram shapes shall be refactored https://bugs.eclipse.org/bugs/show_bug.cgi?id=440201 -Improve GmfGenExtension: Now override createNodePlate throught gmfgen add edit policy for external label -Clean and fix some bug in roundedCompartment Change-Id: Ie64ad8e049bd4d11cb9075987fee555ba4b97a3c Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF3
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml4
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java147
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java108
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java15
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java66
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java282
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java (renamed from plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java)39
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java21
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java29
12 files changed, 715 insertions, 19 deletions
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 d5bb01d1bae..669489a7f60 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
@@ -19,7 +19,6 @@ Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
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/model/papyrusGmfgenExtension.ecore b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
index 4286563ba12..8e4b2714324 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
@@ -178,4 +178,14 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="singletonPath" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SpecificNodePlate" eSuperTypes="#//CommentedElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element is always linked to a genView (topLevel, or child)&#xD;&#xA;Used set if an editPart is abstract.&#xD;&#xA;SuperGenViews is a list of all superEditPart.&#xD;&#xA;&#xD;&#xA;Thanks to this, it is possible to factorize code and to decrease the number of generated classes."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="editParts" ordered="false"
+ unique="false" lowerBound="1" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenNode"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nodePlateQualifiedName"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
index 70ab2fb840b..8c851cfef10 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
@@ -115,10 +115,10 @@
</enablement>
</action>
<action
- class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddExternalNodeFloatingNameDisplayBehavior"
+ class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddExternalNodeFloatingLabelDisplayBehavior"
enablesFor="*"
id="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddExternalNodeFloatingNameDisplayBehavior"
- label="Add label to display Name as an external Floating node label"
+ label="Add label to display Label as an external Floating node label"
menubarPath="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.MenuPapyrus/AddExternalNodeFloatingNameDisplayBehavior">
<enablement>
<objectClass
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 9d0bfdb3e4c..35a0f2caa43 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
@@ -279,6 +279,16 @@ public interface PapyrusgmfgenextensionFactory extends EFactory {
CustomDiagramUpdaterSingleton createCustomDiagramUpdaterSingleton();
/**
+ * Returns a new object of class '<em>Specific Node Plate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Specific Node Plate</em>'.
+ * @generated
+ */
+ SpecificNodePlate createSpecificNodePlate();
+
+ /**
* 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 5601eebbe91..f8b5c162c7b 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
@@ -1586,6 +1586,68 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl <em>Specific Node Plate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getSpecificNodePlate()
+ * @generated
+ */
+ int SPECIFIC_NODE_PLATE = 25;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__COMMENT = COMMENTED_ELEMENT__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>Edit Parts</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__EDIT_PARTS = COMMENTED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__NAME = COMMENTED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Node Plate Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME = COMMENTED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Specific Node Plate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE_FEATURE_COUNT = COMMENTED_ELEMENT_FEATURE_COUNT + 3;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView <em>Extended Gen View</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2377,6 +2439,53 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
EAttribute getCustomDiagramUpdaterSingleton_SingletonPath();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate <em>Specific Node Plate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Specific Node Plate</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate
+ * @generated
+ */
+ EClass getSpecificNodePlate();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts <em>Edit Parts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Edit Parts</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EReference getSpecificNodePlate_EditParts();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EAttribute getSpecificNodePlate_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Node Plate Qualified Name</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EAttribute getSpecificNodePlate_NodePlateQualifiedName();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3063,6 +3172,44 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
*/
EAttribute CUSTOM_DIAGRAM_UPDATER_SINGLETON__SINGLETON_PATH = eINSTANCE.getCustomDiagramUpdaterSingleton_SingletonPath();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl <em>Specific Node Plate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getSpecificNodePlate()
+ * @generated
+ */
+ EClass SPECIFIC_NODE_PLATE = eINSTANCE.getSpecificNodePlate();
+
+ /**
+ * The meta object literal for the '<em><b>Edit Parts</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference SPECIFIC_NODE_PLATE__EDIT_PARTS = eINSTANCE.getSpecificNodePlate_EditParts();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SPECIFIC_NODE_PLATE__NAME = eINSTANCE.getSpecificNodePlate_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Node Plate Qualified Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME = eINSTANCE.getSpecificNodePlate_NodePlateQualifiedName();
+
}
} // PapyrusgmfgenextensionPackage
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java
new file mode 100644
index 00000000000..672529582bf
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java
@@ -0,0 +1,108 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Specific Node Plate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element is always linked to a genView (topLevel, or child)
+ * Used set if an editPart is abstract.
+ * SuperGenViews is a list of all superEditPart.
+ *
+ * Thanks to this, it is possible to factorize code and to decrease the number of generated classes.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts <em>Edit Parts</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate()
+ * @model
+ * @generated
+ */
+public interface SpecificNodePlate extends CommentedElement {
+ /**
+ * Returns the value of the '<em><b>Edit Parts</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenNode}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edit Parts</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Edit Parts</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_EditParts()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ EList<GenNode> getEditParts();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Node Plate Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Node Plate Qualified Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Node Plate Qualified Name</em>' attribute.
+ * @see #setNodePlateQualifiedName(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_NodePlateQualifiedName()
+ * @model
+ * @generated
+ */
+ String getNodePlateQualifiedName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Node Plate Qualified Name</em>' attribute.
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ */
+ void setNodePlateQualifiedName(String value);
+
+} // SpecificNodePlate
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 b1844c1f221..86acbe040e5 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
@@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -137,6 +138,8 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
return createGenerateUsingElementTypeCreationCommand();
case PapyrusgmfgenextensionPackage.CUSTOM_DIAGRAM_UPDATER_SINGLETON:
return createCustomDiagramUpdaterSingleton();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE:
+ return createSpecificNodePlate();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -449,6 +452,18 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
* @generated
*/
@Override
+ public SpecificNodePlate createSpecificNodePlate() {
+ SpecificNodePlateImpl specificNodePlate = new SpecificNodePlateImpl();
+ return specificNodePlate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
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 16c8cef05e5..caa96baae62 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
@@ -42,6 +42,7 @@ import org.eclipse.papyrus.papyrusgmfgenextension.PropertyRefreshHook;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificDiagramUpdater;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificLocator;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificLocatorExternalLabel;
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
@@ -240,6 +241,14 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
private EClass customDiagramUpdaterSingletonEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass specificNodePlateEClass = 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.
* <p>
@@ -1019,6 +1028,50 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getSpecificNodePlate() {
+ return specificNodePlateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSpecificNodePlate_EditParts() {
+ return (EReference) specificNodePlateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSpecificNodePlate_Name() {
+ return (EAttribute) specificNodePlateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSpecificNodePlate_NodePlateQualifiedName() {
+ return (EAttribute) specificNodePlateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -1141,6 +1194,11 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
customDiagramUpdaterSingletonEClass = createEClass(CUSTOM_DIAGRAM_UPDATER_SINGLETON);
createEAttribute(customDiagramUpdaterSingletonEClass, CUSTOM_DIAGRAM_UPDATER_SINGLETON__SINGLETON_PATH);
+
+ specificNodePlateEClass = createEClass(SPECIFIC_NODE_PLATE);
+ createEReference(specificNodePlateEClass, SPECIFIC_NODE_PLATE__EDIT_PARTS);
+ createEAttribute(specificNodePlateEClass, SPECIFIC_NODE_PLATE__NAME);
+ createEAttribute(specificNodePlateEClass, SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME);
}
/**
@@ -1204,6 +1262,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
externalMetamodelTypeEClass.getESuperTypes().add(theGMFGenPackage.getMetamodelType());
generateUsingElementTypeCreationCommandEClass.getESuperTypes().add(this.getCommentedElement());
customDiagramUpdaterSingletonEClass.getESuperTypes().add(this.getCommentedElement());
+ specificNodePlateEClass.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);
@@ -1332,6 +1391,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
initEAttribute(getCustomDiagramUpdaterSingleton_SingletonPath(), ecorePackage.getEString(), "singletonPath", null, 1, 1, CustomDiagramUpdaterSingleton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
+ initEClass(specificNodePlateEClass, SpecificNodePlate.class, "SpecificNodePlate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSpecificNodePlate_EditParts(), theGMFGenPackage.getGenNode(), null, "editParts", null, 1, -1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getSpecificNodePlate_Name(), theEcorePackage.getEString(), "name", null, 0, 1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSpecificNodePlate_NodePlateQualifiedName(), theEcorePackage.getEString(), "nodePlateQualifiedName", null, 0, 1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java
new file mode 100644
index 00000000000..4b9ce6ccf7e
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java
@@ -0,0 +1,282 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Specific Node Plate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getEditParts <em>Edit Parts</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SpecificNodePlateImpl extends CommentedElementImpl implements SpecificNodePlate {
+ /**
+ * The cached value of the '{@link #getEditParts() <em>Edit Parts</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getEditParts()
+ * @generated
+ * @ordered
+ */
+ protected EList<GenNode> editParts;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getNodePlateQualifiedName() <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NODE_PLATE_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNodePlateQualifiedName() <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String nodePlateQualifiedName = NODE_PLATE_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SpecificNodePlateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.SPECIFIC_NODE_PLATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<GenNode> getEditParts() {
+ if (editParts == null) {
+ editParts = new EObjectResolvingEList<GenNode>(GenNode.class, this, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS);
+ }
+ return editParts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME, oldName, name));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getNodePlateQualifiedName() {
+ return nodePlateQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setNodePlateQualifiedName(String newNodePlateQualifiedName) {
+ String oldNodePlateQualifiedName = nodePlateQualifiedName;
+ nodePlateQualifiedName = newNodePlateQualifiedName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME, oldNodePlateQualifiedName, nodePlateQualifiedName));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ return getEditParts();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ return getName();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ return getNodePlateQualifiedName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ getEditParts().clear();
+ getEditParts().addAll((Collection<? extends GenNode>) newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ setName((String) newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ setNodePlateQualifiedName((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ getEditParts().clear();
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ setNodePlateQualifiedName(NODE_PLATE_QUALIFIED_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ return editParts != null && !editParts.isEmpty();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ return NODE_PLATE_QUALIFIED_NAME_EDEFAULT == null ? nodePlateQualifiedName != null : !NODE_PLATE_QUALIFIED_NAME_EDEFAULT.equals(nodePlateQualifiedName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", nodePlateQualifiedName: ");
+ result.append(nodePlateQualifiedName);
+ result.append(')');
+ return result.toString();
+ }
+
+} // SpecificNodePlateImpl
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java
index b9c1914045e..afeb2c93985 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java
@@ -8,7 +8,7 @@
*
* Contributors:
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.papyrusgmfgenextension.popupaction;
@@ -35,7 +35,7 @@ import org.eclipse.ui.IViewPart;
/**
* this class is used to add a label to display name from external node
*/
-public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
+public class AddExternalNodeFloatingLabelDisplayBehavior extends Action {
public static final String FIGURE_VIEWMAP_PATH = "org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel";//"org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"; //$NON-NLS-1$
@@ -45,9 +45,9 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
public static final String DEFAULT_GETTER_NAME = "getFloatingNameLabel"; //$NON-NLS-1$
- public static final String DEFAULT_EDITPART_NAME_SUFFIX = "FloatingNameEditPart"; //$NON-NLS-1$
+ public static final String DEFAULT_EDITPART_NAME_SUFFIX = "FloatingLabelEditPart"; //$NON-NLS-1$
- public static final String DEFAULT_EDITPOLICY_NAME_SUFFIX = "FloatingNameItemSemanticEditPolicy"; //$NON-NLS-1$
+ public static final String DEFAULT_EDITPOLICY_NAME_SUFFIX = "FloatingLabelItemSemanticEditPolicy"; //$NON-NLS-1$
// public static final String DEFAULT_WRAPPING_LABEL_CLASS = "org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"; //$NON-NLS-1$
@@ -77,6 +77,7 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
*
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
+ @Override
public void run(IAction action) {
// Parse selected GenLink(s) and add the desired CustomBehavior
Iterator<EObject> it = getSelectedEObject().iterator();
@@ -93,28 +94,33 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
/**
* creation an external node floating name
- *
- * @param eObject
+ *
+ * @param genNode
* the parent genNode
*/
- private void createAnFloatingNameExternalNode(GenNode eObject) {
+ private void createAnFloatingNameExternalNode(GenNode genNode) {
// Create une external node label
GenExternalNodeLabel label = GMFGenFactory.eINSTANCE.createGenExternalNodeLabel();
// Set Name of the edit part
- label.setEditPartClassName(eObject.getClassNamePrefix() + DEFAULT_EDITPART_NAME_SUFFIX);
+ // label.setEditPartClassName(genNode.getClassNamePrefix() + DEFAULT_EDITPART_NAME_SUFFIX);
+
+ String editPartClassName = genNode.getEditPartClassName();
+ int index = editPartClassName.indexOf("EditPart");
+ String name = editPartClassName.substring(0, index) + DEFAULT_EDITPART_NAME_SUFFIX + editPartClassName.substring(index + "EditPart".length());
+ label.setEditPartClassName(name);
// Set item semantic edit policy
- label.setItemSemanticEditPolicyClassName(eObject.getClassNamePrefix() + DEFAULT_EDITPOLICY_NAME_SUFFIX);
+ label.setItemSemanticEditPolicyClassName(genNode.getClassNamePrefix() + DEFAULT_EDITPOLICY_NAME_SUFFIX);
// Set the Read only
label.setReadOnly(false);
// Set GenLinkLabel VisualID with new unique ID
- int visualID = SetVisualIDWithUnusedValue.getNewVisualID(eObject.eResource(), GenLinkLabel.class);
+ int visualID = SetVisualIDWithUnusedValue.getNewVisualID(genNode.eResource(), GenLinkLabel.class);
label.setVisualID(visualID);
// Retrieve DiagramRunTimeClass in notation.genmodel (Node -> View)
URI uri_notation = URI.createPlatformPluginURI(URI_NOTATION_GENMODEL, false);
- Resource notation = eObject.eResource().getResourceSet().getResource(uri_notation, true);
+ Resource notation = genNode.eResource().getResourceSet().getResource(uri_notation, true);
label.setDiagramRunTimeClass(findGenClass(notation, GEN_CLASS_RT_CLASS));
// Create Viewmap
@@ -129,13 +135,13 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
// Select NamedElement::name property in UML.genmodel for MetaFeatures
URI uri_uml = URI.createPlatformPluginURI(URI_UML_GENMODEL, false);
- Resource uml = eObject.eResource().getResourceSet().getResource(uri_uml, true);
+ Resource uml = genNode.eResource().getResourceSet().getResource(uri_uml, true);
facet.getMetaFeatures().add(findGenFeature(uml, GEN_CLASS_FACET_META_FEATURE, GEN_FEATURE_FACET_META_FEATURE));
// Attach Predefined Parser MessageFormatParser
// not good must find the predifined parser of the model...
// Get the predefined parser.
- PredefinedParser parser = getPredefinedParser(eObject);
+ PredefinedParser parser = getPredefinedParser(genNode);
facet.setParser(parser);
// Attach created element one to another in the model
@@ -143,9 +149,12 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
label.setModelFacet(facet);
// Add custom Policy to have feedback
- addCustomBehavior(label, LABEL_POLICY_KEY, LABEL_POLICY_CLASS);
+ // addCustomBehavior(label, LABEL_POLICY_KEY, LABEL_POLICY_CLASS);
+
+ // edit policy which permit to take into account of specific locator of external label
+ addCustomBehavior(genNode, "org.eclipse.gef.EditPolicy.LAYOUT_ROLE", "org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy");
- eObject.getLabels().add(label);
+ genNode.getLabels().add(label);
}
/**
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 b69d3ed3c1c..59cc8fe2035 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
@@ -17,6 +17,7 @@ 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;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -231,6 +232,11 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
@Override
+ public Adapter caseSpecificNodePlate(SpecificNodePlate object) {
+ return createSpecificNodePlateAdapter();
+ }
+
+ @Override
public Adapter caseGenCommonBase(GenCommonBase object) {
return createGenCommonBaseAdapter();
}
@@ -663,6 +669,21 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate <em>Specific Node Plate</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.SpecificNodePlate
+ * @generated
+ */
+ public Adapter createSpecificNodePlateAdapter() {
+ 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;
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 0f0206b2061..1c9e0a43873 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
@@ -16,6 +16,7 @@ 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;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -410,6 +411,17 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
return result;
}
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE: {
+ SpecificNodePlate specificNodePlate = (SpecificNodePlate) theEObject;
+ T result = caseSpecificNodePlate(specificNodePlate);
+ if (result == null) {
+ result = caseCommentedElement(specificNodePlate);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -841,6 +853,23 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Specific Node Plate</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>Specific Node Plate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSpecificNodePlate(SpecificNodePlate 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;

Back to the top