Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-04-18 03:34:50 -0400
committervlorenzo2011-04-18 03:34:50 -0400
commit139984791861bd195ead6911564fd88aa00f566e (patch)
treec0b283222587cbeb174d37681d65da6b7d905163 /plugins/developer/org.eclipse.papyrus.gmfgenextension
parente32c718589689b808f6001e0c7d7eaaca1e7c77b (diff)
downloadorg.eclipse.papyrus-139984791861bd195ead6911564fd88aa00f566e.tar.gz
org.eclipse.papyrus-139984791861bd195ead6911564fd88aa00f566e.tar.xz
org.eclipse.papyrus-139984791861bd195ead6911564fd88aa00f566e.zip
NEW - bug 343092: [Enhancement] Show/Hide Compartment Title
https://bugs.eclipse.org/bugs/show_bug.cgi?id=343092 NEW - bug 335987: [General][Enhancement] Show/Hide Connectors Labels and External Nodes Labels https://bugs.eclipse.org/bugs/show_bug.cgi?id=335987 (correct some erros in the xpt template)
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/CompartmentTitleVisibilityPreference.java78
-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.java105
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentTitleVisibilityPreferenceImpl.java209
-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.java44
-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.java22
9 files changed, 506 insertions, 0 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
index a80de28e78d..3f0e48766a4 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
@@ -144,4 +144,14 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="compartments" upperBound="-1"
eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenCompartment"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CompartmentTitleVisibilityPreference"
+ eSuperTypes="#//CommentedElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element allows to define the compartment's title which are hidden (or visible) by default"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleByDefault" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="compartments" upperBound="-1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenCompartment"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/CompartmentTitleVisibilityPreference.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/CompartmentTitleVisibilityPreference.java
new file mode 100644
index 00000000000..03249053dab
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/CompartmentTitleVisibilityPreference.java
@@ -0,0 +1,78 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenCompartment;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Compartment Title Visibility Preference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element allows to define the compartment's title which are hidden (or visible) by default
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#getCompartments <em>Compartments</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getCompartmentTitleVisibilityPreference()
+ * @model
+ * @generated
+ */
+public interface CompartmentTitleVisibilityPreference extends CommentedElement {
+ /**
+ * 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#getCompartmentTitleVisibilityPreference_VisibleByDefault()
+ * @model default="true"
+ * @generated
+ */
+ boolean isVisibleByDefault();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#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);
+
+ /**
+ * Returns the value of the '<em><b>Compartments</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenCompartment}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Compartments</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>Compartments</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getCompartmentTitleVisibilityPreference_Compartments()
+ * @model
+ * @generated
+ */
+ EList<GenCompartment> getCompartments();
+
+} // CompartmentTitleVisibilityPreference
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 655111bec30..8e873e9d6b4 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
@@ -198,6 +198,15 @@ public interface PapyrusgmfgenextensionFactory extends EFactory {
CompartmentVisibilityPreference createCompartmentVisibilityPreference();
/**
+ * Returns a new object of class '<em>Compartment Title Visibility Preference</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Compartment Title Visibility Preference</em>'.
+ * @generated
+ */
+ CompartmentTitleVisibilityPreference createCompartmentTitleVisibilityPreference();
+
+ /**
* 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 84e341ad36d..f1e3465366a 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
@@ -980,6 +980,53 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl <em>Compartment Title Visibility Preference</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getCompartmentTitleVisibilityPreference()
+ * @generated
+ */
+ int COMPARTMENT_TITLE_VISIBILITY_PREFERENCE = 19;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMMENT = COMMENTED_ELEMENT__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>Visible By Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT = COMMENTED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Compartments</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS = COMMENTED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Compartment Title Visibility Preference</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARTMENT_TITLE_VISIBILITY_PREFERENCE_FEATURE_COUNT = COMMENTED_ELEMENT_FEATURE_COUNT + 2;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView <em>Extended Gen View</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1588,6 +1635,38 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
EReference getCompartmentVisibilityPreference_Compartments();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference <em>Compartment Title Visibility Preference</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Compartment Title Visibility Preference</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference
+ * @generated
+ */
+ EClass getCompartmentTitleVisibilityPreference();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#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.CompartmentTitleVisibilityPreference#isVisibleByDefault()
+ * @see #getCompartmentTitleVisibilityPreference()
+ * @generated
+ */
+ EAttribute getCompartmentTitleVisibilityPreference_VisibleByDefault();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#getCompartments <em>Compartments</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Compartments</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference#getCompartments()
+ * @see #getCompartmentTitleVisibilityPreference()
+ * @generated
+ */
+ EReference getCompartmentTitleVisibilityPreference_Compartments();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2104,6 +2183,32 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
*/
EReference COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS = eINSTANCE.getCompartmentVisibilityPreference_Compartments();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl <em>Compartment Title Visibility Preference</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getCompartmentTitleVisibilityPreference()
+ * @generated
+ */
+ EClass COMPARTMENT_TITLE_VISIBILITY_PREFERENCE = eINSTANCE.getCompartmentTitleVisibilityPreference();
+
+ /**
+ * The meta object literal for the '<em><b>Visible By Default</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT = eINSTANCE.getCompartmentTitleVisibilityPreference_VisibleByDefault();
+
+ /**
+ * The meta object literal for the '<em><b>Compartments</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS = eINSTANCE.getCompartmentTitleVisibilityPreference_Compartments();
+
}
} //PapyrusgmfgenextensionPackage
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentTitleVisibilityPreferenceImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentTitleVisibilityPreferenceImpl.java
new file mode 100644
index 00000000000..f7ff967f44c
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentTitleVisibilityPreferenceImpl.java
@@ -0,0 +1,209 @@
+/**
+ * <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.GenCompartment;
+
+import org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Compartment Title Visibility Preference</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentTitleVisibilityPreferenceImpl#getCompartments <em>Compartments</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CompartmentTitleVisibilityPreferenceImpl extends CommentedElementImpl implements CompartmentTitleVisibilityPreference {
+ /**
+ * 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;
+
+ /**
+ * The cached value of the '{@link #getCompartments() <em>Compartments</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCompartments()
+ * @generated
+ * @ordered
+ */
+ protected EList<GenCompartment> compartments;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CompartmentTitleVisibilityPreferenceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE;
+ }
+
+ /**
+ * <!-- 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.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT, oldVisibleByDefault, visibleByDefault));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<GenCompartment> getCompartments() {
+ if (compartments == null) {
+ compartments = new EObjectResolvingEList<GenCompartment>(GenCompartment.class, this, PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS);
+ }
+ return compartments;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ return isVisibleByDefault();
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ return getCompartments();
+ }
+ 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.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault((Boolean)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ getCompartments().clear();
+ getCompartments().addAll((Collection<? extends GenCompartment>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault(VISIBLE_BY_DEFAULT_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ getCompartments().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ return visibleByDefault != VISIBLE_BY_DEFAULT_EDEFAULT;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ return compartments != null && !compartments.isEmpty();
+ }
+ 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(" (visibleByDefault: ");
+ result.append(visibleByDefault);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CompartmentTitleVisibilityPreferenceImpl
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 66573056726..773e5dbd8bf 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
@@ -95,6 +95,7 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
case PapyrusgmfgenextensionPackage.EDIT_PART_USING_REORIENT_SERVICE: return createEditPartUsingReorientService();
case PapyrusgmfgenextensionPackage.LABEL_VISIBILITY_PREFERENCE: return createLabelVisibilityPreference();
case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE: return createCompartmentVisibilityPreference();
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE: return createCompartmentTitleVisibilityPreference();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -295,6 +296,16 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
* <!-- end-user-doc -->
* @generated
*/
+ public CompartmentTitleVisibilityPreference createCompartmentTitleVisibilityPreference() {
+ CompartmentTitleVisibilityPreferenceImpl compartmentTitleVisibilityPreference = new CompartmentTitleVisibilityPreferenceImpl();
+ return compartmentTitleVisibilityPreference;
+ }
+
+ /**
+ * <!-- 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 cf0bc0250b8..f13741a5db1 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
@@ -19,6 +19,7 @@ import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenTopLevelNode;
import org.eclipse.papyrus.papyrusgmfgenextension.CommentedElement;
+import org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference;
import org.eclipse.papyrus.papyrusgmfgenextension.CompartmentVisibilityPreference;
import org.eclipse.papyrus.papyrusgmfgenextension.EditPartUsingDeleteService;
import org.eclipse.papyrus.papyrusgmfgenextension.EditPartUsingReorientService;
@@ -165,6 +166,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
private EClass compartmentVisibilityPreferenceEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass compartmentTitleVisibilityPreferenceEClass = 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.
@@ -706,6 +714,33 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCompartmentTitleVisibilityPreference() {
+ return compartmentTitleVisibilityPreferenceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCompartmentTitleVisibilityPreference_VisibleByDefault() {
+ return (EAttribute)compartmentTitleVisibilityPreferenceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCompartmentTitleVisibilityPreference_Compartments() {
+ return (EReference)compartmentTitleVisibilityPreferenceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -805,6 +840,10 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
compartmentVisibilityPreferenceEClass = createEClass(COMPARTMENT_VISIBILITY_PREFERENCE);
createEAttribute(compartmentVisibilityPreferenceEClass, COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT);
createEReference(compartmentVisibilityPreferenceEClass, COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS);
+
+ compartmentTitleVisibilityPreferenceEClass = createEClass(COMPARTMENT_TITLE_VISIBILITY_PREFERENCE);
+ createEAttribute(compartmentTitleVisibilityPreferenceEClass, COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT);
+ createEReference(compartmentTitleVisibilityPreferenceEClass, COMPARTMENT_TITLE_VISIBILITY_PREFERENCE__COMPARTMENTS);
}
/**
@@ -856,6 +895,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
editPartUsingReorientServiceEClass.getESuperTypes().add(this.getCommentedElement());
labelVisibilityPreferenceEClass.getESuperTypes().add(this.getCommentedElement());
compartmentVisibilityPreferenceEClass.getESuperTypes().add(this.getCommentedElement());
+ compartmentTitleVisibilityPreferenceEClass.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);
@@ -934,6 +974,10 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
initEAttribute(getCompartmentVisibilityPreference_VisibleByDefault(), theEcorePackage.getEBoolean(), "visibleByDefault", "true", 0, 1, CompartmentVisibilityPreference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCompartmentVisibilityPreference_Compartments(), theGMFGenPackage.getGenCompartment(), null, "compartments", null, 0, -1, CompartmentVisibilityPreference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(compartmentTitleVisibilityPreferenceEClass, CompartmentTitleVisibilityPreference.class, "CompartmentTitleVisibilityPreference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCompartmentTitleVisibilityPreference_VisibleByDefault(), theEcorePackage.getEBoolean(), "visibleByDefault", "true", 0, 1, CompartmentTitleVisibilityPreference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompartmentTitleVisibilityPreference_Compartments(), theGMFGenPackage.getGenCompartment(), null, "compartments", null, 0, -1, CompartmentTitleVisibilityPreference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, 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 75dcbe9c9df..39bb6c928d3 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
@@ -162,6 +162,10 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
return createCompartmentVisibilityPreferenceAdapter();
}
@Override
+ public Adapter caseCompartmentTitleVisibilityPreference(CompartmentTitleVisibilityPreference object) {
+ return createCompartmentTitleVisibilityPreferenceAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -448,6 +452,20 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.CompartmentTitleVisibilityPreference <em>Compartment Title Visibility Preference</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.CompartmentTitleVisibilityPreference
+ * @generated
+ */
+ public Adapter createCompartmentTitleVisibilityPreferenceAdapter() {
+ 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 03779f12214..c4b5bf0f2d4 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
@@ -225,6 +225,13 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_TITLE_VISIBILITY_PREFERENCE: {
+ CompartmentTitleVisibilityPreference compartmentTitleVisibilityPreference = (CompartmentTitleVisibilityPreference)theEObject;
+ T result = caseCompartmentTitleVisibilityPreference(compartmentTitleVisibilityPreference);
+ if (result == null) result = caseCommentedElement(compartmentTitleVisibilityPreference);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -515,6 +522,21 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Compartment Title Visibility Preference</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>Compartment Title Visibility Preference</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCompartmentTitleVisibilityPreference(CompartmentTitleVisibilityPreference object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top