Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java91
1 files changed, 42 insertions, 49 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java
index bfe584f23b9..a500e28afa7 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/CompartmentVisibilityPreferenceImpl.java
@@ -1,19 +1,31 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
*/
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.CompartmentVisibilityPreference;
import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
@@ -25,8 +37,8 @@ import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
* The following features are implemented:
* </p>
* <ul>
- * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentVisibilityPreferenceImpl#isVisibleByDefault <em>Visible By Default</em>}</li>
- * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentVisibilityPreferenceImpl#getCompartments <em>Compartments</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentVisibilityPreferenceImpl#isVisibleByDefault <em>Visible By Default</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.CompartmentVisibilityPreferenceImpl#getCompartments <em>Compartments</em>}</li>
* </ul>
*
* @generated
@@ -36,7 +48,6 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
* The default value of the '{@link #isVisibleByDefault() <em>Visible By Default</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #isVisibleByDefault()
* @generated
* @ordered
@@ -47,7 +58,6 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
* The cached value of the '{@link #isVisibleByDefault() <em>Visible By Default</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #isVisibleByDefault()
* @generated
* @ordered
@@ -58,7 +68,6 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
* The cached value of the '{@link #getCompartments() <em>Compartments</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getCompartments()
* @generated
* @ordered
@@ -68,7 +77,6 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected CompartmentVisibilityPreferenceImpl() {
@@ -78,7 +86,6 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -89,10 +96,8 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public boolean isVisibleByDefault() {
return visibleByDefault;
}
@@ -100,25 +105,20 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public void setVisibleByDefault(boolean newVisibleByDefault) {
boolean oldVisibleByDefault = visibleByDefault;
visibleByDefault = newVisibleByDefault;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT, oldVisibleByDefault, visibleByDefault));
- }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @Override
public EList<GenCompartment> getCompartments() {
if (compartments == null) {
compartments = new EObjectResolvingEList<GenCompartment>(GenCompartment.class, this, PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS);
@@ -129,16 +129,15 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
- return isVisibleByDefault();
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
- return getCompartments();
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ return isVisibleByDefault();
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ return getCompartments();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -146,20 +145,19 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
- setVisibleByDefault((Boolean) newValue);
- return;
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
- getCompartments().clear();
- getCompartments().addAll((Collection<? extends GenCompartment>) newValue);
- return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault((Boolean)newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ getCompartments().clear();
+ getCompartments().addAll((Collection<? extends GenCompartment>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -167,18 +165,17 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
- setVisibleByDefault(VISIBLE_BY_DEFAULT_EDEFAULT);
- return;
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
- getCompartments().clear();
- return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ setVisibleByDefault(VISIBLE_BY_DEFAULT_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ getCompartments().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -186,16 +183,15 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
- return visibleByDefault != VISIBLE_BY_DEFAULT_EDEFAULT;
- case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
- return compartments != null && !compartments.isEmpty();
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__VISIBLE_BY_DEFAULT:
+ return visibleByDefault != VISIBLE_BY_DEFAULT_EDEFAULT;
+ case PapyrusgmfgenextensionPackage.COMPARTMENT_VISIBILITY_PREFERENCE__COMPARTMENTS:
+ return compartments != null && !compartments.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -203,14 +199,11 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (visibleByDefault: ");
@@ -219,4 +212,4 @@ public class CompartmentVisibilityPreferenceImpl extends CommentedElementImpl im
return result.toString();
}
-} // CompartmentVisibilityPreferenceImpl
+} //CompartmentVisibilityPreferenceImpl

Back to the top