Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-04-15 08:49:41 -0400
committervlorenzo2011-04-15 08:49:41 -0400
commita3848ce139456389ba8928db648ea4e600b1cd05 (patch)
tree9a4bbe3ae908d133da1f0a029059540dadbec647 /plugins/developer/org.eclipse.papyrus.gmfgenextension
parent80856805bc5ded61d1954bd01ff531ef551ab220 (diff)
downloadorg.eclipse.papyrus-a3848ce139456389ba8928db648ea4e600b1cd05.tar.gz
org.eclipse.papyrus-a3848ce139456389ba8928db648ea4e600b1cd05.tar.xz
org.eclipse.papyrus-a3848ce139456389ba8928db648ea4e600b1cd05.zip
NEW - bug 335987: [General][Enhancement] Show/Hide Connectors Labels
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335987
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore13
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/HiddenLabels.java100
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/LabelRole.java155
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java9
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java189
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/LabelRoleImpl.java371
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java11
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java77
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java18
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java58
10 files changed, 976 insertions, 25 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
index afe1e4e5bf1..6204c26f593 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
@@ -122,4 +122,17 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="genView" ordered="false"
unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenLink"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="LabelRole" eSuperTypes="#//CommentedElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element is always linked with link Label and External Node Label.&#xD;&#xA;role : the role of the Label (Stereotype, Source Multiplicity, Target Multiplicity, Name, ...)&#xD;&#xA;iconPath : an icon illustrating the role of the Label&#xD;&#xA;visibleByDefault : if false, the label is not visible when the element is created&#xD;&#xA;&#xD;&#xA;These informations are used by the action Show/Hide Label."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="role" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iconPathRole" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="linkLabels" upperBound="-1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenLinkLabel"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="externalNodeLabels" upperBound="-1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenExternalNodeLabel"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleByDefault" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/HiddenLabels.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/HiddenLabels.java
new file mode 100644
index 00000000000..292ec617591
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/HiddenLabels.java
@@ -0,0 +1,100 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Hidden Labels</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element is always linked with link Label and External Node Label. This element allows to define the initial status (preferences) for the labels.
+ * Labels non referenced by this node will be visible.
+ * The attribute visibleByDefault allows to define this behavior.
+ * This behavior can be change in the Preference Page by the user.
+ *
+ *
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.HiddenLabels#getLinkLabels <em>Link Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.HiddenLabels#getExternalNodeLabels <em>External Node Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.HiddenLabels#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getHiddenLabels()
+ * @model
+ * @generated
+ */
+public interface HiddenLabels extends CommentedElement {
+ /**
+ * Returns the value of the '<em><b>Link Labels</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenLinkLabel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Link Labels</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>Link Labels</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getHiddenLabels_LinkLabels()
+ * @model
+ * @generated
+ */
+ EList<GenLinkLabel> getLinkLabels();
+
+ /**
+ * Returns the value of the '<em><b>External Node Labels</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>External Node Labels</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>External Node Labels</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getHiddenLabels_ExternalNodeLabels()
+ * @model
+ * @generated
+ */
+ EList<GenExternalNodeLabel> getExternalNodeLabels();
+
+ /**
+ * Returns the value of the '<em><b>Visible By Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Visible By Default</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Visible By Default</em>' attribute.
+ * @see #setVisibleByDefault(boolean)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getHiddenLabels_VisibleByDefault()
+ * @model
+ * @generated
+ */
+ boolean isVisibleByDefault();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.HiddenLabels#isVisibleByDefault <em>Visible By Default</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Visible By Default</em>' attribute.
+ * @see #isVisibleByDefault()
+ * @generated
+ */
+ void setVisibleByDefault(boolean value);
+
+} // HiddenLabels
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/LabelRole.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/LabelRole.java
new file mode 100644
index 00000000000..4ea6dead7a3
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/LabelRole.java
@@ -0,0 +1,155 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Label Role</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element is always linked with link Label and External Node Label.
+ * role : the role of the Label (Stereotype, Source Multiplicity, Target Multiplicity, Name, ...)
+ * iconPath : an icon illustrating the role of the Label
+ * visibleByDefault : if false, the label is not visible when the element is created
+ *
+ * These informations are used by the action Show/Hide Label.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getRole <em>Role</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getIconPathRole <em>Icon Path Role</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getLinkLabels <em>Link Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getExternalNodeLabels <em>External Node Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole()
+ * @model
+ * @generated
+ */
+public interface LabelRole extends CommentedElement {
+ /**
+ * Returns the value of the '<em><b>Role</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Role</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Role</em>' attribute.
+ * @see #setRole(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole_Role()
+ * @model required="true"
+ * @generated
+ */
+ String getRole();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getRole <em>Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Role</em>' attribute.
+ * @see #getRole()
+ * @generated
+ */
+ void setRole(String value);
+
+ /**
+ * Returns the value of the '<em><b>Icon Path Role</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Icon Path Role</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Icon Path Role</em>' attribute.
+ * @see #setIconPathRole(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole_IconPathRole()
+ * @model
+ * @generated
+ */
+ String getIconPathRole();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getIconPathRole <em>Icon Path Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Icon Path Role</em>' attribute.
+ * @see #getIconPathRole()
+ * @generated
+ */
+ void setIconPathRole(String value);
+
+ /**
+ * Returns the value of the '<em><b>Link Labels</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenLinkLabel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Link Labels</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>Link Labels</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole_LinkLabels()
+ * @model
+ * @generated
+ */
+ EList<GenLinkLabel> getLinkLabels();
+
+ /**
+ * Returns the value of the '<em><b>External Node Labels</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>External Node Labels</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>External Node Labels</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole_ExternalNodeLabels()
+ * @model
+ * @generated
+ */
+ EList<GenExternalNodeLabel> getExternalNodeLabels();
+
+ /**
+ * Returns the value of the '<em><b>Visible By Default</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Visible By Default</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Visible By Default</em>' attribute.
+ * @see #setVisibleByDefault(boolean)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getLabelRole_VisibleByDefault()
+ * @model default="true"
+ * @generated
+ */
+ boolean isVisibleByDefault();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#isVisibleByDefault <em>Visible By Default</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Visible By Default</em>' attribute.
+ * @see #isVisibleByDefault()
+ * @generated
+ */
+ void setVisibleByDefault(boolean value);
+
+} // LabelRole
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 b5d9fa27bfb..ad7d756458a 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
@@ -180,6 +180,15 @@ public interface PapyrusgmfgenextensionFactory extends EFactory {
EditPartUsingReorientService createEditPartUsingReorientService();
/**
+ * Returns a new object of class '<em>Label Role</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Label Role</em>'.
+ * @generated
+ */
+ LabelRole createLabelRole();
+
+ /**
* 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 86f9bc03086..a6195542922 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
@@ -860,6 +860,80 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl <em>Label Role</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getLabelRole()
+ * @generated
+ */
+ int LABEL_ROLE = 17;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__COMMENT = COMMENTED_ELEMENT__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>Role</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__ROLE = COMMENTED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Icon Path Role</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__ICON_PATH_ROLE = COMMENTED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Link Labels</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__LINK_LABELS = COMMENTED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>External Node Labels</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__EXTERNAL_NODE_LABELS = COMMENTED_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Visible By Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE__VISIBLE_BY_DEFAULT = COMMENTED_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Label Role</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LABEL_ROLE_FEATURE_COUNT = COMMENTED_ELEMENT_FEATURE_COUNT + 5;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView <em>Extended Gen View</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1371,6 +1445,71 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
EReference getEditPartUsingReorientService_GenView();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole <em>Label Role</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Label Role</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole
+ * @generated
+ */
+ EClass getLabelRole();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getRole <em>Role</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Role</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getRole()
+ * @see #getLabelRole()
+ * @generated
+ */
+ EAttribute getLabelRole_Role();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getIconPathRole <em>Icon Path Role</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Icon Path Role</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getIconPathRole()
+ * @see #getLabelRole()
+ * @generated
+ */
+ EAttribute getLabelRole_IconPathRole();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getLinkLabels <em>Link Labels</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Link Labels</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getLinkLabels()
+ * @see #getLabelRole()
+ * @generated
+ */
+ EReference getLabelRole_LinkLabels();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getExternalNodeLabels <em>External Node Labels</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>External Node Labels</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#getExternalNodeLabels()
+ * @see #getLabelRole()
+ * @generated
+ */
+ EReference getLabelRole_ExternalNodeLabels();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#isVisibleByDefault <em>Visible By Default</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Visible By Default</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.LabelRole#isVisibleByDefault()
+ * @see #getLabelRole()
+ * @generated
+ */
+ EAttribute getLabelRole_VisibleByDefault();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1811,6 +1950,56 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
*/
EReference EDIT_PART_USING_REORIENT_SERVICE__GEN_VIEW = eINSTANCE.getEditPartUsingReorientService_GenView();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl <em>Label Role</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getLabelRole()
+ * @generated
+ */
+ EClass LABEL_ROLE = eINSTANCE.getLabelRole();
+
+ /**
+ * The meta object literal for the '<em><b>Role</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LABEL_ROLE__ROLE = eINSTANCE.getLabelRole_Role();
+
+ /**
+ * The meta object literal for the '<em><b>Icon Path Role</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LABEL_ROLE__ICON_PATH_ROLE = eINSTANCE.getLabelRole_IconPathRole();
+
+ /**
+ * The meta object literal for the '<em><b>Link Labels</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LABEL_ROLE__LINK_LABELS = eINSTANCE.getLabelRole_LinkLabels();
+
+ /**
+ * The meta object literal for the '<em><b>External Node Labels</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LABEL_ROLE__EXTERNAL_NODE_LABELS = eINSTANCE.getLabelRole_ExternalNodeLabels();
+
+ /**
+ * The meta object literal for the '<em><b>Visible By Default</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LABEL_ROLE__VISIBLE_BY_DEFAULT = eINSTANCE.getLabelRole_VisibleByDefault();
+
}
} //PapyrusgmfgenextensionPackage
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/LabelRoleImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/LabelRoleImpl.java
new file mode 100644
index 00000000000..02199441a0d
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/LabelRoleImpl.java
@@ -0,0 +1,371 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+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.GenExternalNodeLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel;
+import org.eclipse.papyrus.papyrusgmfgenextension.LabelRole;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Label Role</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl#getRole <em>Role</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl#getIconPathRole <em>Icon Path Role</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl#getLinkLabels <em>Link Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl#getExternalNodeLabels <em>External Node Labels</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.LabelRoleImpl#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LabelRoleImpl extends CommentedElementImpl implements LabelRole {
+
+ /**
+ * The default value of the '{@link #getRole() <em>Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getRole()
+ * @generated
+ * @ordered
+ */
+ protected static final String ROLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRole() <em>Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getRole()
+ * @generated
+ * @ordered
+ */
+ protected String role = ROLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getIconPathRole() <em>Icon Path Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getIconPathRole()
+ * @generated
+ * @ordered
+ */
+ protected static final String ICON_PATH_ROLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getIconPathRole() <em>Icon Path Role</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getIconPathRole()
+ * @generated
+ * @ordered
+ */
+ protected String iconPathRole = ICON_PATH_ROLE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getLinkLabels() <em>Link Labels</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getLinkLabels()
+ * @generated
+ * @ordered
+ */
+ protected EList<GenLinkLabel> linkLabels;
+
+ /**
+ * The cached value of the '{@link #getExternalNodeLabels() <em>External Node Labels</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getExternalNodeLabels()
+ * @generated
+ * @ordered
+ */
+ protected EList<GenExternalNodeLabel> externalNodeLabels;
+
+ /**
+ * The default value of the '{@link #isVisibleByDefault() <em>Visible By Default</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #isVisibleByDefault()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean VISIBLE_BY_DEFAULT_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isVisibleByDefault() <em>Visible By Default</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #isVisibleByDefault()
+ * @generated
+ * @ordered
+ */
+ protected boolean visibleByDefault = VISIBLE_BY_DEFAULT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LabelRoleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.LABEL_ROLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setRole(String newRole) {
+ String oldRole = role;
+ role = newRole;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.LABEL_ROLE__ROLE, oldRole, role));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getIconPathRole() {
+ return iconPathRole;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIconPathRole(String newIconPathRole) {
+ String oldIconPathRole = iconPathRole;
+ iconPathRole = newIconPathRole;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.LABEL_ROLE__ICON_PATH_ROLE, oldIconPathRole, iconPathRole));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<GenLinkLabel> getLinkLabels() {
+ if(linkLabels == null) {
+ linkLabels = new EObjectResolvingEList<GenLinkLabel>(GenLinkLabel.class, this, PapyrusgmfgenextensionPackage.LABEL_ROLE__LINK_LABELS);
+ }
+ return linkLabels;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<GenExternalNodeLabel> getExternalNodeLabels() {
+ if(externalNodeLabels == null) {
+ externalNodeLabels = new EObjectResolvingEList<GenExternalNodeLabel>(GenExternalNodeLabel.class, this, PapyrusgmfgenextensionPackage.LABEL_ROLE__EXTERNAL_NODE_LABELS);
+ }
+ return externalNodeLabels;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isVisibleByDefault() {
+ return visibleByDefault;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setVisibleByDefault(boolean newVisibleByDefault) {
+ boolean oldVisibleByDefault = visibleByDefault;
+ visibleByDefault = newVisibleByDefault;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.LABEL_ROLE__VISIBLE_BY_DEFAULT, oldVisibleByDefault, visibleByDefault));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch(featureID) {
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ROLE:
+ return getRole();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ICON_PATH_ROLE:
+ return getIconPathRole();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__LINK_LABELS:
+ return getLinkLabels();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__EXTERNAL_NODE_LABELS:
+ return getExternalNodeLabels();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__VISIBLE_BY_DEFAULT:
+ return isVisibleByDefault();
+ }
+ 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.LABEL_ROLE__ROLE:
+ setRole((String)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ICON_PATH_ROLE:
+ setIconPathRole((String)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__LINK_LABELS:
+ getLinkLabels().clear();
+ getLinkLabels().addAll((Collection<? extends GenLinkLabel>)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__EXTERNAL_NODE_LABELS:
+ getExternalNodeLabels().clear();
+ getExternalNodeLabels().addAll((Collection<? extends GenExternalNodeLabel>)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch(featureID) {
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ROLE:
+ setRole(ROLE_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ICON_PATH_ROLE:
+ setIconPathRole(ICON_PATH_ROLE_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__LINK_LABELS:
+ getLinkLabels().clear();
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__EXTERNAL_NODE_LABELS:
+ getExternalNodeLabels().clear();
+ return;
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault(VISIBLE_BY_DEFAULT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch(featureID) {
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ROLE:
+ return ROLE_EDEFAULT == null ? role != null : !ROLE_EDEFAULT.equals(role);
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__ICON_PATH_ROLE:
+ return ICON_PATH_ROLE_EDEFAULT == null ? iconPathRole != null : !ICON_PATH_ROLE_EDEFAULT.equals(iconPathRole);
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__LINK_LABELS:
+ return linkLabels != null && !linkLabels.isEmpty();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__EXTERNAL_NODE_LABELS:
+ return externalNodeLabels != null && !externalNodeLabels.isEmpty();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE__VISIBLE_BY_DEFAULT:
+ return visibleByDefault != VISIBLE_BY_DEFAULT_EDEFAULT;
+ }
+ 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(" (role: ");
+ result.append(role);
+ result.append(", iconPathRole: ");
+ result.append(iconPathRole);
+ result.append(", visibleByDefault: ");
+ result.append(visibleByDefault);
+ result.append(')');
+ return result.toString();
+ }
+
+} //LabelRoleImpl
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 073f975e83c..706e30698dc 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
@@ -93,6 +93,7 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
case PapyrusgmfgenextensionPackage.ADDITIONAL_EDIT_PART_CANDIES: return createAdditionalEditPartCandies();
case PapyrusgmfgenextensionPackage.EDIT_PART_USING_DELETE_SERVICE: return createEditPartUsingDeleteService();
case PapyrusgmfgenextensionPackage.EDIT_PART_USING_REORIENT_SERVICE: return createEditPartUsingReorientService();
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE: return createLabelRole();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -273,6 +274,16 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
* <!-- end-user-doc -->
* @generated
*/
+ public LabelRole createLabelRole() {
+ LabelRoleImpl labelRole = new LabelRoleImpl();
+ return labelRole;
+ }
+
+ /**
+ * <!-- 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 ebaeeaf7fe8..f9e8cd2693e 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
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.papyrusgmfgenextension.EditPartUsingReorientService;
import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView;
import org.eclipse.papyrus.papyrusgmfgenextension.ExternalHook;
import org.eclipse.papyrus.papyrusgmfgenextension.GenNodeConstraint;
+import org.eclipse.papyrus.papyrusgmfgenextension.LabelRole;
import org.eclipse.papyrus.papyrusgmfgenextension.MutatingCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.OwnedEditpart;
import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusExtensionRootNode;
@@ -149,6 +150,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
private EClass editPartUsingReorientServiceEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass labelRoleEClass = 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.
@@ -609,6 +617,60 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLabelRole() {
+ return labelRoleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLabelRole_Role() {
+ return (EAttribute)labelRoleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLabelRole_IconPathRole() {
+ return (EAttribute)labelRoleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLabelRole_LinkLabels() {
+ return (EReference)labelRoleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLabelRole_ExternalNodeLabels() {
+ return (EReference)labelRoleEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLabelRole_VisibleByDefault() {
+ return (EAttribute)labelRoleEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -697,6 +759,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
editPartUsingReorientServiceEClass = createEClass(EDIT_PART_USING_REORIENT_SERVICE);
createEAttribute(editPartUsingReorientServiceEClass, EDIT_PART_USING_REORIENT_SERVICE__NAME);
createEReference(editPartUsingReorientServiceEClass, EDIT_PART_USING_REORIENT_SERVICE__GEN_VIEW);
+
+ labelRoleEClass = createEClass(LABEL_ROLE);
+ createEAttribute(labelRoleEClass, LABEL_ROLE__ROLE);
+ createEAttribute(labelRoleEClass, LABEL_ROLE__ICON_PATH_ROLE);
+ createEReference(labelRoleEClass, LABEL_ROLE__LINK_LABELS);
+ createEReference(labelRoleEClass, LABEL_ROLE__EXTERNAL_NODE_LABELS);
+ createEAttribute(labelRoleEClass, LABEL_ROLE__VISIBLE_BY_DEFAULT);
}
/**
@@ -746,6 +815,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
additionalEditPartCandiesEClass.getESuperTypes().add(this.getCommentedElement());
editPartUsingDeleteServiceEClass.getESuperTypes().add(this.getCommentedElement());
editPartUsingReorientServiceEClass.getESuperTypes().add(this.getCommentedElement());
+ labelRoleEClass.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);
@@ -813,6 +883,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
initEAttribute(getEditPartUsingReorientService_Name(), theEcorePackage.getEString(), "name", null, 0, 1, EditPartUsingReorientService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getEditPartUsingReorientService_GenView(), theGMFGenPackage.getGenLink(), null, "genView", null, 0, -1, EditPartUsingReorientService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEClass(labelRoleEClass, LabelRole.class, "LabelRole", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getLabelRole_Role(), theEcorePackage.getEString(), "role", null, 1, 1, LabelRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getLabelRole_IconPathRole(), ecorePackage.getEString(), "iconPathRole", null, 0, 1, LabelRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLabelRole_LinkLabels(), theGMFGenPackage.getGenLinkLabel(), null, "linkLabels", null, 0, -1, LabelRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLabelRole_ExternalNodeLabels(), theGMFGenPackage.getGenExternalNodeLabel(), null, "externalNodeLabels", null, 0, -1, LabelRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getLabelRole_VisibleByDefault(), theEcorePackage.getEBoolean(), "visibleByDefault", "true", 0, 1, LabelRole.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/util/PapyrusgmfgenextensionAdapterFactory.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
index ff7619f6f8c..1b97ca5fb3d 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
@@ -154,6 +154,10 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
return createEditPartUsingReorientServiceAdapter();
}
@Override
+ public Adapter caseLabelRole(LabelRole object) {
+ return createLabelRoleAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -412,6 +416,20 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.LabelRole <em>Label Role</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.LabelRole
+ * @generated
+ */
+ public Adapter createLabelRoleAdapter() {
+ 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 f346212ffd1..b5b5f5b3386 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
@@ -10,6 +10,8 @@ import java.util.List;
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.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
@@ -41,7 +43,7 @@ import org.eclipse.papyrus.papyrusgmfgenextension.SpecificLocatorExternalLabel;
* @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage
* @generated
*/
-public class PapyrusgmfgenextensionSwitch<T> {
+public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
/**
* The cached model package
@@ -64,34 +66,16 @@ public class PapyrusgmfgenextensionSwitch<T> {
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
* @generated
*/
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
}
/**
@@ -101,6 +85,7 @@ public class PapyrusgmfgenextensionSwitch<T> {
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
+ @Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case PapyrusgmfgenextensionPackage.EXTENDED_GEN_VIEW: {
@@ -226,6 +211,13 @@ public class PapyrusgmfgenextensionSwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case PapyrusgmfgenextensionPackage.LABEL_ROLE: {
+ LabelRole labelRole = (LabelRole)theEObject;
+ T result = caseLabelRole(labelRole);
+ if (result == null) result = caseCommentedElement(labelRole);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -486,6 +478,21 @@ public class PapyrusgmfgenextensionSwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Label Role</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>Label Role</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLabelRole(LabelRole object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
@@ -496,6 +503,7 @@ public class PapyrusgmfgenextensionSwitch<T> {
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
+ @Override
public T defaultCase(EObject object) {
return null;
}

Back to the top