From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- .../src/rba/view/impl/AlignedLayoutImpl.java | 221 +++ .../src/rba/view/impl/AllInstanceOfAreaImpl.java | 72 + .../view/impl/AllInstanceOfViewContentImpl.java | 73 + rba.model.view/src/rba/view/impl/AreaImpl.java | 232 ++++ .../src/rba/view/impl/AreaOperatorImpl.java | 34 + rba.model.view/src/rba/view/impl/AreaSetImpl.java | 57 + .../src/rba/view/impl/CompositeAreaImpl.java | 214 +++ rba.model.view/src/rba/view/impl/DisplayImpl.java | 240 ++++ .../src/rba/view/impl/DisplayingContentImpl.java | 70 + .../src/rba/view/impl/FixedPositionLayoutImpl.java | 169 +++ .../src/rba/view/impl/HideLowerPriorityImpl.java | 192 +++ .../src/rba/view/impl/HorizontalLayoutImpl.java | 33 + .../src/rba/view/impl/IsChangedDisplayImpl.java | 186 +++ .../src/rba/view/impl/IsDisplayedImpl.java | 70 + .../src/rba/view/impl/IsDisplayedOnImpl.java | 191 +++ rba.model.view/src/rba/view/impl/IsHiddenImpl.java | 70 + .../src/rba/view/impl/IsTranslatedViewToImpl.java | 205 +++ .../src/rba/view/impl/IsVisibleImpl.java | 58 + .../src/rba/view/impl/LayoutManagerImpl.java | 63 + rba.model.view/src/rba/view/impl/OffsetImpl.java | 355 +++++ .../src/rba/view/impl/PositionContainerImpl.java | 443 ++++++ .../src/rba/view/impl/RBAViewFactoryImpl.java | 390 ++++++ .../src/rba/view/impl/RBAViewPackageImpl.java | 1430 ++++++++++++++++++++ .../src/rba/view/impl/SizeIdentifierImpl.java | 35 + rba.model.view/src/rba/view/impl/SizeImpl.java | 274 ++++ .../src/rba/view/impl/SizeReferenceImpl.java | 146 ++ .../src/rba/view/impl/VerticalLayoutImpl.java | 33 + .../src/rba/view/impl/ViewContentImpl.java | 160 +++ .../src/rba/view/impl/ViewContentOperatorImpl.java | 62 + .../src/rba/view/impl/ViewContentSetImpl.java | 62 + .../src/rba/view/impl/ViewContentStateImpl.java | 62 + 31 files changed, 5902 insertions(+) create mode 100644 rba.model.view/src/rba/view/impl/AlignedLayoutImpl.java create mode 100644 rba.model.view/src/rba/view/impl/AllInstanceOfAreaImpl.java create mode 100644 rba.model.view/src/rba/view/impl/AllInstanceOfViewContentImpl.java create mode 100644 rba.model.view/src/rba/view/impl/AreaImpl.java create mode 100644 rba.model.view/src/rba/view/impl/AreaOperatorImpl.java create mode 100644 rba.model.view/src/rba/view/impl/AreaSetImpl.java create mode 100644 rba.model.view/src/rba/view/impl/CompositeAreaImpl.java create mode 100644 rba.model.view/src/rba/view/impl/DisplayImpl.java create mode 100644 rba.model.view/src/rba/view/impl/DisplayingContentImpl.java create mode 100644 rba.model.view/src/rba/view/impl/FixedPositionLayoutImpl.java create mode 100644 rba.model.view/src/rba/view/impl/HideLowerPriorityImpl.java create mode 100644 rba.model.view/src/rba/view/impl/HorizontalLayoutImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsChangedDisplayImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsDisplayedImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsDisplayedOnImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsHiddenImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsTranslatedViewToImpl.java create mode 100644 rba.model.view/src/rba/view/impl/IsVisibleImpl.java create mode 100644 rba.model.view/src/rba/view/impl/LayoutManagerImpl.java create mode 100644 rba.model.view/src/rba/view/impl/OffsetImpl.java create mode 100644 rba.model.view/src/rba/view/impl/PositionContainerImpl.java create mode 100644 rba.model.view/src/rba/view/impl/RBAViewFactoryImpl.java create mode 100644 rba.model.view/src/rba/view/impl/RBAViewPackageImpl.java create mode 100644 rba.model.view/src/rba/view/impl/SizeIdentifierImpl.java create mode 100644 rba.model.view/src/rba/view/impl/SizeImpl.java create mode 100644 rba.model.view/src/rba/view/impl/SizeReferenceImpl.java create mode 100644 rba.model.view/src/rba/view/impl/VerticalLayoutImpl.java create mode 100644 rba.model.view/src/rba/view/impl/ViewContentImpl.java create mode 100644 rba.model.view/src/rba/view/impl/ViewContentOperatorImpl.java create mode 100644 rba.model.view/src/rba/view/impl/ViewContentSetImpl.java create mode 100644 rba.model.view/src/rba/view/impl/ViewContentStateImpl.java (limited to 'rba.model.view/src/rba/view/impl') diff --git a/rba.model.view/src/rba/view/impl/AlignedLayoutImpl.java b/rba.model.view/src/rba/view/impl/AlignedLayoutImpl.java new file mode 100644 index 0000000..85ab299 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AlignedLayoutImpl.java @@ -0,0 +1,221 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +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 rba.view.AlignedLayout; +import rba.view.Area; +import rba.view.BasePoint; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Aligned Layout'. + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class AlignedLayoutImpl extends LayoutManagerImpl implements AlignedLayout { + /** + * The cached value of the '{@link #getSubarea() Subarea}' reference list. + * + * @see #getSubarea() + * @generated + * @ordered + */ + protected EList subarea; + + /** + * The default value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected static final BasePoint BASE_POINT_EDEFAULT = BasePoint.LEFT_TOP; + + /** + * The cached value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected BasePoint basePoint = BASE_POINT_EDEFAULT; + + /** + * + * @generated + */ + protected AlignedLayoutImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.ALIGNED_LAYOUT; + } + + /** + * + * @generated + */ + public EList getSubarea() { + if (subarea == null) { + subarea = new EObjectResolvingEList(Area.class, this, RBAViewPackage.ALIGNED_LAYOUT__SUBAREA); + } + return subarea; + } + + /** + * + * @generated + */ + public BasePoint getBasePoint() { + return basePoint; + } + + /** + * + * @generated + */ + public void setBasePoint(BasePoint newBasePoint) { + BasePoint oldBasePoint = basePoint; + basePoint = newBasePoint == null ? BASE_POINT_EDEFAULT : newBasePoint; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT, + oldBasePoint, basePoint)); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList collectLeafArea() { + java.util.Set areas = new java.util.HashSet(); + for (Area area : getSubarea()) { + areas.addAll(area.collectLeafAllocatable().stream().map(allocatable -> (Area) allocatable) + .collect(java.util.stream.Collectors.toList())); + } + return new org.eclipse.emf.common.util.BasicEList(areas); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.ALIGNED_LAYOUT__SUBAREA: + return getSubarea(); + case RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT: + return getBasePoint(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.ALIGNED_LAYOUT__SUBAREA: + getSubarea().clear(); + getSubarea().addAll((Collection) newValue); + return; + case RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT: + setBasePoint((BasePoint) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.ALIGNED_LAYOUT__SUBAREA: + getSubarea().clear(); + return; + case RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT: + setBasePoint(BASE_POINT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.ALIGNED_LAYOUT__SUBAREA: + return subarea != null && !subarea.isEmpty(); + case RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT: + return basePoint != BASE_POINT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.ALIGNED_LAYOUT___COLLECT_LEAF_AREA: + return collectLeafArea(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (basePoint: "); + result.append(basePoint); + result.append(')'); + return result.toString(); + } + +} // AlignedLayoutImpl diff --git a/rba.model.view/src/rba/view/impl/AllInstanceOfAreaImpl.java b/rba.model.view/src/rba/view/impl/AllInstanceOfAreaImpl.java new file mode 100644 index 0000000..e2f9da0 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AllInstanceOfAreaImpl.java @@ -0,0 +1,72 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.core.impl.SetExpressionImpl; + +import rba.view.AllInstanceOfArea; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'All Instance Of Area'. + * + * @generated + */ +public class AllInstanceOfAreaImpl extends SetExpressionImpl implements AllInstanceOfArea { + /** + * + * @generated + */ + protected AllInstanceOfAreaImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.ALL_INSTANCE_OF_AREA; + } + + /** + * + * @generated + */ + public String getExpressionText() { + return "AREA"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.SET_OF_AREA; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.ALL_INSTANCE_OF_AREA___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBAViewPackage.ALL_INSTANCE_OF_AREA___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AllInstanceOfAreaImpl diff --git a/rba.model.view/src/rba/view/impl/AllInstanceOfViewContentImpl.java b/rba.model.view/src/rba/view/impl/AllInstanceOfViewContentImpl.java new file mode 100644 index 0000000..15b4e5b --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AllInstanceOfViewContentImpl.java @@ -0,0 +1,73 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.core.impl.SetExpressionImpl; + +import rba.view.AllInstanceOfViewContent; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'All Instance Of View Content'. + * + * @generated + */ +public class AllInstanceOfViewContentImpl extends SetExpressionImpl implements AllInstanceOfViewContent { + /** + * + * @generated + */ + protected AllInstanceOfViewContentImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.ALL_INSTANCE_OF_VIEW_CONTENT; + } + + /** + * + * @generated + */ + public String getExpressionText() { + return "ALL_VIEWCONTENTS"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.SET_OF_CONTENT; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.ALL_INSTANCE_OF_VIEW_CONTENT___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBAViewPackage.ALL_INSTANCE_OF_VIEW_CONTENT___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AllInstanceOfViewContentImpl diff --git a/rba.model.view/src/rba/view/impl/AreaImpl.java b/rba.model.view/src/rba/view/impl/AreaImpl.java new file mode 100644 index 0000000..d12a43a --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AreaImpl.java @@ -0,0 +1,232 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.impl.AllocatableImpl; +import rba.view.Area; +import rba.view.RBAViewPackage; +import rba.view.SizeIdentifier; + +/** + * An implementation of the model object 'Area'. + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class AreaImpl extends AllocatableImpl implements Area { + /** + * The cached value of the '{@link #getZorder() Zorder}' containment reference. + * + * @see #getZorder() + * @generated + * @ordered + */ + protected Expression zorder; + + /** + * The cached value of the '{@link #getSize() Size}' containment reference list. + * + * @see #getSize() + * @generated + * @ordered + */ + protected EList size; + + /** + * + * @generated + */ + protected AreaImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.AREA; + } + + /** + * + * @generated + */ + public Expression getZorder() { + return zorder; + } + + /** + * + * @generated + */ + public NotificationChain basicSetZorder(Expression newZorder, NotificationChain msgs) { + Expression oldZorder = zorder; + zorder = newZorder; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RBAViewPackage.AREA__ZORDER, + oldZorder, newZorder); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setZorder(Expression newZorder) { + if (newZorder != zorder) { + NotificationChain msgs = null; + if (zorder != null) + msgs = ((InternalEObject) zorder).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.AREA__ZORDER, null, msgs); + if (newZorder != null) + msgs = ((InternalEObject) newZorder).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.AREA__ZORDER, null, msgs); + msgs = basicSetZorder(newZorder, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.AREA__ZORDER, newZorder, newZorder)); + } + + /** + * + * @generated + */ + public EList getSize() { + if (size == null) { + size = new EObjectContainmentEList(SizeIdentifier.class, this, RBAViewPackage.AREA__SIZE); + } + return size; + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.AREA; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.AREA__ZORDER: + return basicSetZorder(null, msgs); + case RBAViewPackage.AREA__SIZE: + return ((InternalEList) getSize()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.AREA__ZORDER: + return getZorder(); + case RBAViewPackage.AREA__SIZE: + return getSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.AREA__ZORDER: + setZorder((Expression) newValue); + return; + case RBAViewPackage.AREA__SIZE: + getSize().clear(); + getSize().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.AREA__ZORDER: + setZorder((Expression) null); + return; + case RBAViewPackage.AREA__SIZE: + getSize().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.AREA__ZORDER: + return zorder != null; + case RBAViewPackage.AREA__SIZE: + return size != null && !size.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.AREA___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AreaImpl diff --git a/rba.model.view/src/rba/view/impl/AreaOperatorImpl.java b/rba.model.view/src/rba/view/impl/AreaOperatorImpl.java new file mode 100644 index 0000000..054aca6 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AreaOperatorImpl.java @@ -0,0 +1,34 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.impl.AllocatableOperatorImpl; +import rba.view.AreaOperator; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Area Operator'. + * + * @generated + */ +public abstract class AreaOperatorImpl extends AllocatableOperatorImpl implements AreaOperator { + /** + * + * @generated + */ + protected AreaOperatorImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.AREA_OPERATOR; + } + +} // AreaOperatorImpl diff --git a/rba.model.view/src/rba/view/impl/AreaSetImpl.java b/rba.model.view/src/rba/view/impl/AreaSetImpl.java new file mode 100644 index 0000000..5c9f99e --- /dev/null +++ b/rba.model.view/src/rba/view/impl/AreaSetImpl.java @@ -0,0 +1,57 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import rba.core.ExpressionType; +import rba.core.impl.AllocatableSetImpl; +import rba.view.AreaSet; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Area Set'. + * + * @generated + */ +public class AreaSetImpl extends AllocatableSetImpl implements AreaSet { + /** + * + * @generated + */ + protected AreaSetImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.AREA_SET; + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.SET_OF_AREA; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.AREA_SET___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AreaSetImpl diff --git a/rba.model.view/src/rba/view/impl/CompositeAreaImpl.java b/rba.model.view/src/rba/view/impl/CompositeAreaImpl.java new file mode 100644 index 0000000..a407823 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/CompositeAreaImpl.java @@ -0,0 +1,214 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.ExpressionType; + +import rba.core.impl.PackagableElementImpl; +import rba.view.Area; +import rba.view.CompositeArea; +import rba.view.LayoutManager; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Composite Area'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.CompositeAreaImpl#getLayout Layout}
  • + *
+ * + * @generated + */ +public class CompositeAreaImpl extends PackagableElementImpl implements CompositeArea { + /** + * The cached value of the '{@link #getLayout() Layout}' containment reference. + * + * @see #getLayout() + * @generated + * @ordered + */ + protected LayoutManager layout; + + /** + * + * @generated + */ + protected CompositeAreaImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.COMPOSITE_AREA; + } + + /** + * + * @generated + */ + public LayoutManager getLayout() { + return layout; + } + + /** + * + * @generated + */ + public NotificationChain basicSetLayout(LayoutManager newLayout, NotificationChain msgs) { + LayoutManager oldLayout = layout; + layout = newLayout; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBAViewPackage.COMPOSITE_AREA__LAYOUT, oldLayout, newLayout); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setLayout(LayoutManager newLayout) { + if (newLayout != layout) { + NotificationChain msgs = null; + if (layout != null) + msgs = ((InternalEObject) layout).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.COMPOSITE_AREA__LAYOUT, null, msgs); + if (newLayout != null) + msgs = ((InternalEObject) newLayout).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.COMPOSITE_AREA__LAYOUT, null, msgs); + msgs = basicSetLayout(newLayout, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.COMPOSITE_AREA__LAYOUT, newLayout, + newLayout)); + } + + /** + * + * @generated + */ + public EList collectLeafArea() { + java.util.Set areas = new java.util.HashSet(); + if (layout != null) { + areas.addAll(layout.collectLeafArea()); + } + + return new org.eclipse.emf.common.util.BasicEList(areas); + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.AREA; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + return basicSetLayout(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + return getLayout(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + setLayout((LayoutManager) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + setLayout((LayoutManager) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + return layout != null; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.COMPOSITE_AREA___COLLECT_LEAF_AREA: + return collectLeafArea(); + case RBAViewPackage.COMPOSITE_AREA___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // CompositeAreaImpl diff --git a/rba.model.view/src/rba/view/impl/DisplayImpl.java b/rba.model.view/src/rba/view/impl/DisplayImpl.java new file mode 100644 index 0000000..353c46f --- /dev/null +++ b/rba.model.view/src/rba/view/impl/DisplayImpl.java @@ -0,0 +1,240 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.impl.PackagableElementImpl; +import rba.view.CompositeArea; +import rba.view.Display; +import rba.view.RBAViewPackage; +import rba.view.SizeIdentifier; + +/** + * An implementation of the model object 'Display'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.DisplayImpl#getRoot Root}
  • + *
  • {@link rba.view.impl.DisplayImpl#getSize Size}
  • + *
+ * + * @generated + */ +public class DisplayImpl extends PackagableElementImpl implements Display { + /** + * The cached value of the '{@link #getRoot() Root}' containment reference. + * + * @see #getRoot() + * @generated + * @ordered + */ + protected CompositeArea root; + + /** + * The cached value of the '{@link #getSize() Size}' containment reference. + * + * @see #getSize() + * @generated + * @ordered + */ + protected SizeIdentifier size; + + /** + * + * @generated + */ + protected DisplayImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.DISPLAY; + } + + /** + * + * @generated + */ + public CompositeArea getRoot() { + return root; + } + + /** + * + * @generated + */ + public NotificationChain basicSetRoot(CompositeArea newRoot, NotificationChain msgs) { + CompositeArea oldRoot = root; + root = newRoot; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RBAViewPackage.DISPLAY__ROOT, + oldRoot, newRoot); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setRoot(CompositeArea newRoot) { + if (newRoot != root) { + NotificationChain msgs = null; + if (root != null) + msgs = ((InternalEObject) root).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.DISPLAY__ROOT, null, msgs); + if (newRoot != null) + msgs = ((InternalEObject) newRoot).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.DISPLAY__ROOT, null, msgs); + msgs = basicSetRoot(newRoot, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.DISPLAY__ROOT, newRoot, newRoot)); + } + + /** + * + * @generated + */ + public SizeIdentifier getSize() { + return size; + } + + /** + * + * @generated + */ + public NotificationChain basicSetSize(SizeIdentifier newSize, NotificationChain msgs) { + SizeIdentifier oldSize = size; + size = newSize; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RBAViewPackage.DISPLAY__SIZE, + oldSize, newSize); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setSize(SizeIdentifier newSize) { + if (newSize != size) { + NotificationChain msgs = null; + if (size != null) + msgs = ((InternalEObject) size).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.DISPLAY__SIZE, null, msgs); + if (newSize != null) + msgs = ((InternalEObject) newSize).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.DISPLAY__SIZE, null, msgs); + msgs = basicSetSize(newSize, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.DISPLAY__SIZE, newSize, newSize)); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.DISPLAY__ROOT: + return basicSetRoot(null, msgs); + case RBAViewPackage.DISPLAY__SIZE: + return basicSetSize(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.DISPLAY__ROOT: + return getRoot(); + case RBAViewPackage.DISPLAY__SIZE: + return getSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.DISPLAY__ROOT: + setRoot((CompositeArea) newValue); + return; + case RBAViewPackage.DISPLAY__SIZE: + setSize((SizeIdentifier) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.DISPLAY__ROOT: + setRoot((CompositeArea) null); + return; + case RBAViewPackage.DISPLAY__SIZE: + setSize((SizeIdentifier) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.DISPLAY__ROOT: + return root != null; + case RBAViewPackage.DISPLAY__SIZE: + return size != null; + } + return super.eIsSet(featureID); + } + +} // DisplayImpl diff --git a/rba.model.view/src/rba/view/impl/DisplayingContentImpl.java b/rba.model.view/src/rba/view/impl/DisplayingContentImpl.java new file mode 100644 index 0000000..d8178dd --- /dev/null +++ b/rba.model.view/src/rba/view/impl/DisplayingContentImpl.java @@ -0,0 +1,70 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.view.DisplayingContent; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Displaying Content'. + * + * @generated + */ +public class DisplayingContentImpl extends AreaOperatorImpl implements DisplayingContent { + /** + * + * @generated + */ + protected DisplayingContentImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.DISPLAYING_CONTENT; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".displayingContent()"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.CONTENT; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.DISPLAYING_CONTENT___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.DISPLAYING_CONTENT___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // DisplayingContentImpl diff --git a/rba.model.view/src/rba/view/impl/FixedPositionLayoutImpl.java b/rba.model.view/src/rba/view/impl/FixedPositionLayoutImpl.java new file mode 100644 index 0000000..62eb041 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/FixedPositionLayoutImpl.java @@ -0,0 +1,169 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.view.Area; +import rba.view.FixedPositionLayout; +import rba.view.PositionContainer; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Fixed Position Layout'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.FixedPositionLayoutImpl#getSubAreaPosition Sub Area Position}
  • + *
+ * + * @generated + */ +public class FixedPositionLayoutImpl extends LayoutManagerImpl implements FixedPositionLayout { + /** + * The cached value of the '{@link #getSubAreaPosition() Sub Area Position}' containment reference list. + * @see #getSubAreaPosition() + * @generated + * @ordered + */ + protected EList subAreaPosition; + + /** + * + * @generated + */ + protected FixedPositionLayoutImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.FIXED_POSITION_LAYOUT; + } + + /** + * + * @generated + */ + public EList getSubAreaPosition() { + if (subAreaPosition == null) { + subAreaPosition = new EObjectContainmentEList(PositionContainer.class, this, + RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION); + } + return subAreaPosition; + } + + /** + * + * @generated + */ + public EList collectLeafArea() { + java.util.Set areas = new java.util.HashSet(); + for (PositionContainer pc : getSubAreaPosition()) { + areas.addAll(pc.getArea().collectLeafAllocatable().stream().map(allocatable -> (Area) allocatable) + .collect(java.util.stream.Collectors.toList())); + } + return new org.eclipse.emf.common.util.BasicEList(areas); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + return ((InternalEList) getSubAreaPosition()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + return getSubAreaPosition(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + getSubAreaPosition().clear(); + getSubAreaPosition().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + getSubAreaPosition().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + return subAreaPosition != null && !subAreaPosition.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.FIXED_POSITION_LAYOUT___COLLECT_LEAF_AREA: + return collectLeafArea(); + } + return super.eInvoke(operationID, arguments); + } + +} // FixedPositionLayoutImpl diff --git a/rba.model.view/src/rba/view/impl/HideLowerPriorityImpl.java b/rba.model.view/src/rba/view/impl/HideLowerPriorityImpl.java new file mode 100644 index 0000000..94aa46c --- /dev/null +++ b/rba.model.view/src/rba/view/impl/HideLowerPriorityImpl.java @@ -0,0 +1,192 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.AndOperator; +import rba.core.ContentValue; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.ImpliesOperator; +import rba.core.IsGreaterThanOperator; +import rba.core.IsLowerThanOperator; +import rba.core.Operator; +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.SugarExpression; +import rba.core.SugarExpressionBase; +import rba.core.impl.OperatorImpl; +import rba.view.HideLowerPriority; +import rba.view.IsHidden; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Hide Lower Priority'. + * + * @generated + */ +public class HideLowerPriorityImpl extends OperatorImpl implements HideLowerPriority { + /** + * + * @generated + */ + protected HideLowerPriorityImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.HIDE_LOWER_PRIORITY; + } + + /** + * + * @generated + */ + public String getSymbol() { + return "HideLowerPriority"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + EList expressions = getOperand(); + expressionText.append(getSymbol()); + expressionText.append("("); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(","); + expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(")"); + return expressionText.toString(); + } + + /** + * + * @generated + */ + public boolean canExpand() { + return true; + } + + /** + * + * @generated NOT + */ + public Expression getExpanded() { + AndOperator AND = RBACoreFactory.eINSTANCE.createAndOperator(); + ImpliesOperator implies = RBACoreFactory.eINSTANCE.createImpliesOperator(); + IsLowerThanOperator lowerThan = RBACoreFactory.eINSTANCE.createIsLowerThanOperator(); + ContentValue contentValue1 = RBACoreFactory.eINSTANCE.createContentValue(); + ContentValue contentValue2 = RBACoreFactory.eINSTANCE.createContentValue(); + IsHidden hidden = RBAViewFactory.eINSTANCE.createIsHidden(); + IsGreaterThanOperator greaterThan = RBACoreFactory.eINSTANCE.createIsGreaterThanOperator(); + + contentValue1.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + contentValue2.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + lowerThan.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(contentValue1)); + lowerThan.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(contentValue2)); + implies.getOperand().add(lowerThan); + hidden.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + implies.getOperand().add(hidden); + AND.getOperand().add(implies); + + implies = RBACoreFactory.eINSTANCE.createImpliesOperator(); + greaterThan.getOperand().add(contentValue1); + greaterThan.getOperand().add(contentValue2); + implies.getOperand().add(greaterThan); + + hidden = RBAViewFactory.eINSTANCE.createIsHidden(); + hidden.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + implies.getOperand().add(hidden); + AND.getOperand().add(implies); + + return AND; + } + + /** + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBAViewPackage.HIDE_LOWER_PRIORITY___GET_UNDERLYING_TYPE; + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBAViewPackage.HIDE_LOWER_PRIORITY___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBAViewPackage.HIDE_LOWER_PRIORITY___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == SugarExpression.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND: + return RBAViewPackage.HIDE_LOWER_PRIORITY___CAN_EXPAND; + case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED: + return RBAViewPackage.HIDE_LOWER_PRIORITY___GET_EXPANDED; + default: + return -1; + } + } + if (baseClass == SugarExpressionBase.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND: + return RBAViewPackage.HIDE_LOWER_PRIORITY___CAN_EXPAND; + default: + return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.HIDE_LOWER_PRIORITY___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.HIDE_LOWER_PRIORITY___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBAViewPackage.HIDE_LOWER_PRIORITY___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBAViewPackage.HIDE_LOWER_PRIORITY___CAN_EXPAND: + return canExpand(); + case RBAViewPackage.HIDE_LOWER_PRIORITY___GET_EXPANDED: + return getExpanded(); + } + return super.eInvoke(operationID, arguments); + } + +} // HideLowerPriorityImpl diff --git a/rba.model.view/src/rba/view/impl/HorizontalLayoutImpl.java b/rba.model.view/src/rba/view/impl/HorizontalLayoutImpl.java new file mode 100644 index 0000000..4c01c55 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/HorizontalLayoutImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.view.HorizontalLayout; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Horizontal Layout'. + * + * @generated + */ +public class HorizontalLayoutImpl extends AlignedLayoutImpl implements HorizontalLayout { + /** + * + * @generated + */ + protected HorizontalLayoutImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.HORIZONTAL_LAYOUT; + } + +} // HorizontalLayoutImpl diff --git a/rba.model.view/src/rba/view/impl/IsChangedDisplayImpl.java b/rba.model.view/src/rba/view/impl/IsChangedDisplayImpl.java new file mode 100644 index 0000000..783999a --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsChangedDisplayImpl.java @@ -0,0 +1,186 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.AndOperator; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.NotOperator; +import rba.core.ObjectCompare; +import rba.core.ObjectReference; +import rba.core.Operator; +import rba.core.OrOperator; +import rba.core.PreviousModifier; +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.SugarExpression; +import rba.core.SugarExpressionBase; +import rba.view.DisplayingContent; +import rba.view.IsChangedDisplay; +import rba.view.IsDisplayed; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Is Changed Display'. + * + * @generated + */ +public class IsChangedDisplayImpl extends AreaOperatorImpl implements IsChangedDisplay { + /** + * + * @generated + */ + protected IsChangedDisplayImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_CHANGED_DISPLAY; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isChangedDisplay()"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + public boolean canExpand() { + return true; + } + + /** + * + * @generated NOT + */ + public Expression getExpanded() { + OrOperator or = RBACoreFactory.eINSTANCE.createOrOperator(); + NotOperator not = RBACoreFactory.eINSTANCE.createNotOperator(); + ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare(); + DisplayingContent dispContent = RBAViewFactory.eINSTANCE.createDisplayingContent(); + PreviousModifier pre = RBACoreFactory.eINSTANCE.createPreviousModifier(); + OrOperator leftOr = RBACoreFactory.eINSTANCE.createOrOperator(); + NotOperator leftnot = RBACoreFactory.eINSTANCE.createNotOperator(); + AndOperator and = RBACoreFactory.eINSTANCE.createAndOperator(); + IsDisplayed isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + + pre.setObjReference((ObjectReference) org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + dispContent.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(pre)); + equal.getOperand().add(dispContent); + dispContent = RBAViewFactory.eINSTANCE.createDisplayingContent(); + dispContent.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + equal.getOperand().add(dispContent); + not.getOperand().add(equal); + + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(pre)); + and.getOperand().add(isDisplayed); + isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + leftnot.getOperand().add(isDisplayed); + and.getOperand().add(leftnot); + leftOr.getOperand().add(and); + + leftnot = RBACoreFactory.eINSTANCE.createNotOperator(); + isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(pre)); + leftnot.getOperand().add(isDisplayed); + isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + and = RBACoreFactory.eINSTANCE.createAndOperator(); + and.getOperand().add(leftnot); + and.getOperand().add(isDisplayed); + leftOr.getOperand().add(and); + + or.getOperand().add(not); + or.getOperand().add(leftOr); + + return or; + } + + /** + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBAViewPackage.IS_CHANGED_DISPLAY___GET_UNDERLYING_TYPE; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBAViewPackage.IS_CHANGED_DISPLAY___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == SugarExpression.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND: + return RBAViewPackage.IS_CHANGED_DISPLAY___CAN_EXPAND; + case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED: + return RBAViewPackage.IS_CHANGED_DISPLAY___GET_EXPANDED; + default: + return -1; + } + } + if (baseClass == SugarExpressionBase.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND: + return RBAViewPackage.IS_CHANGED_DISPLAY___CAN_EXPAND; + default: + return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_CHANGED_DISPLAY___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.IS_CHANGED_DISPLAY___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBAViewPackage.IS_CHANGED_DISPLAY___CAN_EXPAND: + return canExpand(); + case RBAViewPackage.IS_CHANGED_DISPLAY___GET_EXPANDED: + return getExpanded(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsChangedDisplayImpl diff --git a/rba.model.view/src/rba/view/impl/IsDisplayedImpl.java b/rba.model.view/src/rba/view/impl/IsDisplayedImpl.java new file mode 100644 index 0000000..075cf1c --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsDisplayedImpl.java @@ -0,0 +1,70 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.view.IsDisplayed; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Is Displayed'. + * + * @generated + */ +public class IsDisplayedImpl extends AreaOperatorImpl implements IsDisplayed { + /** + * + * @generated + */ + protected IsDisplayedImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_DISPLAYED; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isDisplayed()"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_DISPLAYED___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.IS_DISPLAYED___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsDisplayedImpl diff --git a/rba.model.view/src/rba/view/impl/IsDisplayedOnImpl.java b/rba.model.view/src/rba/view/impl/IsDisplayedOnImpl.java new file mode 100644 index 0000000..e8e8ec0 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsDisplayedOnImpl.java @@ -0,0 +1,191 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.AndOperator; +import rba.core.ContentOperator; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.ObjectCompare; +import rba.core.Operator; +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.SugarExpression; +import rba.core.SugarExpressionBase; +import rba.view.DisplayingContent; +import rba.view.IsDisplayed; +import rba.view.IsDisplayedOn; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; +import rba.view.ViewContentOperator; + +/** + * An implementation of the model object 'Is Displayed On'. + * + * @generated + */ +public class IsDisplayedOnImpl extends ViewContentOperatorImpl implements IsDisplayedOn { + /** + * + * @generated + */ + protected IsDisplayedOnImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_DISPLAYED_ON; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isDisplayedOn"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + EList expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("("); + expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(")"); + return expressionText.toString(); + } + + /** + * + * @generated + */ + public boolean canExpand() { + return true; + } + + /** + * + * @generated NOT + */ + public Expression getExpanded() { + AndOperator AND = RBACoreFactory.eINSTANCE.createAndOperator(); + IsDisplayed isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare(); + DisplayingContent dispContent = RBAViewFactory.eINSTANCE.createDisplayingContent(); + + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + dispContent.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + equal.getOperand().add(dispContent); + equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + + AND.getOperand().add(isDisplayed); + AND.getOperand().add(equal); + return AND; + } + + /** + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBAViewPackage.IS_DISPLAYED_ON___GET_UNDERLYING_TYPE; + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBAViewPackage.IS_DISPLAYED_ON___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBAViewPackage.IS_DISPLAYED_ON___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == ContentOperator.class) { + switch (baseOperationID) { + case RBACorePackage.CONTENT_OPERATOR___GET_EXPRESSION_TEXT: + return RBAViewPackage.IS_DISPLAYED_ON___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == ViewContentOperator.class) { + switch (baseOperationID) { + case RBAViewPackage.VIEW_CONTENT_OPERATOR___GET_UNDERLYING_TYPE: + return RBAViewPackage.IS_DISPLAYED_ON___GET_UNDERLYING_TYPE; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == SugarExpression.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND: + return RBAViewPackage.IS_DISPLAYED_ON___CAN_EXPAND; + case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED: + return RBAViewPackage.IS_DISPLAYED_ON___GET_EXPANDED; + default: + return -1; + } + } + if (baseClass == SugarExpressionBase.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND: + return RBAViewPackage.IS_DISPLAYED_ON___CAN_EXPAND; + default: + return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_DISPLAYED_ON___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.IS_DISPLAYED_ON___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBAViewPackage.IS_DISPLAYED_ON___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBAViewPackage.IS_DISPLAYED_ON___CAN_EXPAND: + return canExpand(); + case RBAViewPackage.IS_DISPLAYED_ON___GET_EXPANDED: + return getExpanded(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsDisplayedOnImpl diff --git a/rba.model.view/src/rba/view/impl/IsHiddenImpl.java b/rba.model.view/src/rba/view/impl/IsHiddenImpl.java new file mode 100644 index 0000000..293c6bf --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsHiddenImpl.java @@ -0,0 +1,70 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.view.IsHidden; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Is Hidden'. + * + * @generated + */ +public class IsHiddenImpl extends AreaOperatorImpl implements IsHidden { + /** + * + * @generated + */ + protected IsHiddenImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_HIDDEN; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isHidden()"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_HIDDEN___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.IS_HIDDEN___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsHiddenImpl diff --git a/rba.model.view/src/rba/view/impl/IsTranslatedViewToImpl.java b/rba.model.view/src/rba/view/impl/IsTranslatedViewToImpl.java new file mode 100644 index 0000000..66b5db0 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsTranslatedViewToImpl.java @@ -0,0 +1,205 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.AllocatableOperator; +import rba.core.AndOperator; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.NotOperator; +import rba.core.ObjectCompare; +import rba.core.ObjectReference; +import rba.core.Operator; +import rba.core.OrOperator; +import rba.core.PreviousModifier; +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.SugarExpression; +import rba.core.SugarExpressionBase; +import rba.view.DisplayingContent; +import rba.view.IsDisplayed; +import rba.view.IsTranslatedViewTo; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Is Translated View To'. + * + * @generated + */ +public class IsTranslatedViewToImpl extends AreaOperatorImpl implements IsTranslatedViewTo { + /** + * + * @generated + */ + protected IsTranslatedViewToImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_TRANSLATED_VIEW_TO; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isTranslatedViewTo"; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + EList expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("("); + expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(")"); + return expressionText.toString(); + } + + /** + * + * @generated + */ + public boolean canExpand() { + return true; + } + + /** + * + * @generated NOT + */ + public Expression getExpanded() { + AndOperator AND = RBACoreFactory.eINSTANCE.createAndOperator(); + IsDisplayed isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare(); + DisplayingContent dispContent = RBAViewFactory.eINSTANCE.createDisplayingContent(); + PreviousModifier pre = RBACoreFactory.eINSTANCE.createPreviousModifier(); + OrOperator or = RBACoreFactory.eINSTANCE.createOrOperator(); + NotOperator not = RBACoreFactory.eINSTANCE.createNotOperator(); + + isDisplayed.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + AND.getOperand().add(isDisplayed); + + dispContent.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + equal.getOperand().add(dispContent); + equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + AND.getOperand().add(equal); + + pre.setObjReference((ObjectReference) org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0))); + dispContent = RBAViewFactory.eINSTANCE.createDisplayingContent(); + dispContent.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(pre)); + equal = RBACoreFactory.eINSTANCE.createObjectCompare(); + equal.getOperand().add(dispContent); + equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1))); + not.getOperand().add(equal); + or.getOperand().add(not); + + isDisplayed = RBAViewFactory.eINSTANCE.createIsDisplayed(); + isDisplayed.getOperand().add(pre); + not = RBACoreFactory.eINSTANCE.createNotOperator(); + not.getOperand().add(isDisplayed); + or.getOperand().add(not); + AND.getOperand().add(or); + return AND; + } + + /** + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_UNDERLYING_TYPE; + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == AllocatableOperator.class) { + switch (baseOperationID) { + case RBACorePackage.ALLOCATABLE_OPERATOR___GET_EXPRESSION_TEXT: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == SugarExpression.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___CAN_EXPAND; + case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_EXPANDED; + default: + return -1; + } + } + if (baseClass == SugarExpressionBase.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND: + return RBAViewPackage.IS_TRANSLATED_VIEW_TO___CAN_EXPAND; + default: + return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_SYMBOL: + return getSymbol(); + case RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBAViewPackage.IS_TRANSLATED_VIEW_TO___CAN_EXPAND: + return canExpand(); + case RBAViewPackage.IS_TRANSLATED_VIEW_TO___GET_EXPANDED: + return getExpanded(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsTranslatedViewToImpl diff --git a/rba.model.view/src/rba/view/impl/IsVisibleImpl.java b/rba.model.view/src/rba/view/impl/IsVisibleImpl.java new file mode 100644 index 0000000..9eee90e --- /dev/null +++ b/rba.model.view/src/rba/view/impl/IsVisibleImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.view.IsVisible; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Is Visible'. + * + * @generated + */ +public class IsVisibleImpl extends ViewContentOperatorImpl implements IsVisible { + /** + * + * @generated + */ + protected IsVisibleImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.IS_VISIBLE; + } + + /** + * + * @generated + */ + public String getSymbol() { + return ".isVisible()"; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.IS_VISIBLE___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsVisibleImpl diff --git a/rba.model.view/src/rba/view/impl/LayoutManagerImpl.java b/rba.model.view/src/rba/view/impl/LayoutManagerImpl.java new file mode 100644 index 0000000..6859406 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/LayoutManagerImpl.java @@ -0,0 +1,63 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import rba.view.Area; +import rba.view.LayoutManager; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Layout Manager'. + * + * @generated + */ +public abstract class LayoutManagerImpl extends MinimalEObjectImpl.Container implements LayoutManager { + /** + * + * @generated + */ + protected LayoutManagerImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.LAYOUT_MANAGER; + } + + /** + * + * @generated + */ + public EList collectLeafArea() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.LAYOUT_MANAGER___COLLECT_LEAF_AREA: + return collectLeafArea(); + } + return super.eInvoke(operationID, arguments); + } + +} // LayoutManagerImpl diff --git a/rba.model.view/src/rba/view/impl/OffsetImpl.java b/rba.model.view/src/rba/view/impl/OffsetImpl.java new file mode 100644 index 0000000..5a5575d --- /dev/null +++ b/rba.model.view/src/rba/view/impl/OffsetImpl.java @@ -0,0 +1,355 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.impl.PackagableElementImpl; + +import rba.view.Offset; +import rba.view.RBAViewPackage; +import rba.view.SizeReference; + +/** + * An implementation of the model object 'Offset'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.OffsetImpl#getX X}
  • + *
  • {@link rba.view.impl.OffsetImpl#getY Y}
  • + *
  • {@link rba.view.impl.OffsetImpl#getSize Size}
  • + *
+ * + * @generated + */ +public class OffsetImpl extends PackagableElementImpl implements Offset { + /** + * The default value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected static final int X_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected int x = X_EDEFAULT; + + /** + * This is true if the X attribute has been set. + * + * @generated + * @ordered + */ + protected boolean xESet; + + /** + * The default value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected static final int Y_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected int y = Y_EDEFAULT; + + /** + * This is true if the Y attribute has been set. + * + * @generated + * @ordered + */ + protected boolean yESet; + + /** + * The cached value of the '{@link #getSize() Size}' containment reference. + * + * @see #getSize() + * @generated + * @ordered + */ + protected SizeReference size; + + /** + * + * @generated + */ + protected OffsetImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.OFFSET; + } + + /** + * + * @generated + */ + public int getX() { + return x; + } + + /** + * + * @generated + */ + public void setX(int newX) { + int oldX = x; + x = newX; + boolean oldXESet = xESet; + xESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__X, oldX, x, !oldXESet)); + } + + /** + * + * @generated + */ + public void unsetX() { + int oldX = x; + boolean oldXESet = xESet; + x = X_EDEFAULT; + xESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.OFFSET__X, oldX, X_EDEFAULT, + oldXESet)); + } + + /** + * + * @generated + */ + public boolean isSetX() { + return xESet; + } + + /** + * + * @generated + */ + public int getY() { + return y; + } + + /** + * + * @generated + */ + public void setY(int newY) { + int oldY = y; + y = newY; + boolean oldYESet = yESet; + yESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__Y, oldY, y, !oldYESet)); + } + + /** + * + * @generated + */ + public void unsetY() { + int oldY = y; + boolean oldYESet = yESet; + y = Y_EDEFAULT; + yESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.OFFSET__Y, oldY, Y_EDEFAULT, + oldYESet)); + } + + /** + * + * @generated + */ + public boolean isSetY() { + return yESet; + } + + /** + * + * @generated + */ + public SizeReference getSize() { + return size; + } + + /** + * + * @generated + */ + public NotificationChain basicSetSize(SizeReference newSize, NotificationChain msgs) { + SizeReference oldSize = size; + size = newSize; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__SIZE, + oldSize, newSize); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setSize(SizeReference newSize) { + if (newSize != size) { + NotificationChain msgs = null; + if (size != null) + msgs = ((InternalEObject) size).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.OFFSET__SIZE, null, msgs); + if (newSize != null) + msgs = ((InternalEObject) newSize).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBAViewPackage.OFFSET__SIZE, null, msgs); + msgs = basicSetSize(newSize, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__SIZE, newSize, newSize)); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.OFFSET__SIZE: + return basicSetSize(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.OFFSET__X: + return getX(); + case RBAViewPackage.OFFSET__Y: + return getY(); + case RBAViewPackage.OFFSET__SIZE: + return getSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.OFFSET__X: + setX((Integer) newValue); + return; + case RBAViewPackage.OFFSET__Y: + setY((Integer) newValue); + return; + case RBAViewPackage.OFFSET__SIZE: + setSize((SizeReference) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.OFFSET__X: + unsetX(); + return; + case RBAViewPackage.OFFSET__Y: + unsetY(); + return; + case RBAViewPackage.OFFSET__SIZE: + setSize((SizeReference) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.OFFSET__X: + return isSetX(); + case RBAViewPackage.OFFSET__Y: + return isSetY(); + case RBAViewPackage.OFFSET__SIZE: + return size != null; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (x: "); + if (xESet) + result.append(x); + else + result.append(""); + result.append(", y: "); + if (yESet) + result.append(y); + else + result.append(""); + result.append(')'); + return result.toString(); + } + +} // OffsetImpl diff --git a/rba.model.view/src/rba/view/impl/PositionContainerImpl.java b/rba.model.view/src/rba/view/impl/PositionContainerImpl.java new file mode 100644 index 0000000..0b313c9 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/PositionContainerImpl.java @@ -0,0 +1,443 @@ +/** + */ +package rba.view.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.view.Area; +import rba.view.BasePoint; +import rba.view.Offset; +import rba.view.PositionContainer; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Position Container'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.PositionContainerImpl#getX X}
  • + *
  • {@link rba.view.impl.PositionContainerImpl#getY Y}
  • + *
  • {@link rba.view.impl.PositionContainerImpl#getBasePoint Base Point}
  • + *
  • {@link rba.view.impl.PositionContainerImpl#getArea Area}
  • + *
  • {@link rba.view.impl.PositionContainerImpl#getOffset Offset}
  • + *
+ * + * @generated + */ +public class PositionContainerImpl extends MinimalEObjectImpl.Container implements PositionContainer { + /** + * The default value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected static final int X_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected int x = X_EDEFAULT; + + /** + * This is true if the X attribute has been set. + * + * @generated + * @ordered + */ + protected boolean xESet; + + /** + * The default value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected static final int Y_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected int y = Y_EDEFAULT; + + /** + * This is true if the Y attribute has been set. + * + * @generated + * @ordered + */ + protected boolean yESet; + + /** + * The default value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected static final BasePoint BASE_POINT_EDEFAULT = BasePoint.LEFT_TOP; + + /** + * The cached value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected BasePoint basePoint = BASE_POINT_EDEFAULT; + + /** + * The cached value of the '{@link #getArea() Area}' reference. + * + * @see #getArea() + * @generated + * @ordered + */ + protected Area area; + + /** + * The cached value of the '{@link #getOffset() Offset}' containment reference list. + * + * @see #getOffset() + * @generated + * @ordered + */ + protected EList offset; + + /** + * + * @generated + */ + protected PositionContainerImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.POSITION_CONTAINER; + } + + /** + * + * @generated + */ + public int getX() { + return x; + } + + /** + * + * @generated + */ + public void setX(int newX) { + int oldX = x; + x = newX; + boolean oldXESet = xESet; + xESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__X, oldX, x, + !oldXESet)); + } + + /** + * + * @generated + */ + public void unsetX() { + int oldX = x; + boolean oldXESet = xESet; + x = X_EDEFAULT; + xESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.POSITION_CONTAINER__X, oldX, + X_EDEFAULT, oldXESet)); + } + + /** + * + * @generated + */ + public boolean isSetX() { + return xESet; + } + + /** + * + * @generated + */ + public int getY() { + return y; + } + + /** + * + * @generated + */ + public void setY(int newY) { + int oldY = y; + y = newY; + boolean oldYESet = yESet; + yESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__Y, oldY, y, + !oldYESet)); + } + + /** + * + * @generated + */ + public void unsetY() { + int oldY = y; + boolean oldYESet = yESet; + y = Y_EDEFAULT; + yESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.POSITION_CONTAINER__Y, oldY, + Y_EDEFAULT, oldYESet)); + } + + /** + * + * @generated + */ + public boolean isSetY() { + return yESet; + } + + /** + * + * @generated + */ + public BasePoint getBasePoint() { + return basePoint; + } + + /** + * + * @generated + */ + public void setBasePoint(BasePoint newBasePoint) { + BasePoint oldBasePoint = basePoint; + basePoint = newBasePoint == null ? BASE_POINT_EDEFAULT : newBasePoint; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__BASE_POINT, + oldBasePoint, basePoint)); + } + + /** + * + * @generated + */ + public Area getArea() { + if (area != null && area.eIsProxy()) { + InternalEObject oldArea = (InternalEObject) area; + area = (Area) eResolveProxy(oldArea); + if (area != oldArea) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, RBAViewPackage.POSITION_CONTAINER__AREA, + oldArea, area)); + } + } + return area; + } + + /** + * + * @generated + */ + public Area basicGetArea() { + return area; + } + + /** + * + * @generated + */ + public void setArea(Area newArea) { + Area oldArea = area; + area = newArea; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__AREA, oldArea, + area)); + } + + /** + * + * @generated + */ + public EList getOffset() { + if (offset == null) { + offset = new EObjectContainmentEList(Offset.class, this, RBAViewPackage.POSITION_CONTAINER__OFFSET); + } + return offset; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return ((InternalEList) getOffset()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + return getX(); + case RBAViewPackage.POSITION_CONTAINER__Y: + return getY(); + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + return getBasePoint(); + case RBAViewPackage.POSITION_CONTAINER__AREA: + if (resolve) + return getArea(); + return basicGetArea(); + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return getOffset(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + setX((Integer) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__Y: + setY((Integer) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + setBasePoint((BasePoint) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__AREA: + setArea((Area) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + getOffset().clear(); + getOffset().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + unsetX(); + return; + case RBAViewPackage.POSITION_CONTAINER__Y: + unsetY(); + return; + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + setBasePoint(BASE_POINT_EDEFAULT); + return; + case RBAViewPackage.POSITION_CONTAINER__AREA: + setArea((Area) null); + return; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + getOffset().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + return isSetX(); + case RBAViewPackage.POSITION_CONTAINER__Y: + return isSetY(); + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + return basePoint != BASE_POINT_EDEFAULT; + case RBAViewPackage.POSITION_CONTAINER__AREA: + return area != null; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return offset != null && !offset.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (x: "); + if (xESet) + result.append(x); + else + result.append(""); + result.append(", y: "); + if (yESet) + result.append(y); + else + result.append(""); + result.append(", basePoint: "); + result.append(basePoint); + result.append(')'); + return result.toString(); + } + +} // PositionContainerImpl diff --git a/rba.model.view/src/rba/view/impl/RBAViewFactoryImpl.java b/rba.model.view/src/rba/view/impl/RBAViewFactoryImpl.java new file mode 100644 index 0000000..ee41c60 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/RBAViewFactoryImpl.java @@ -0,0 +1,390 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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 rba.view.*; + +/** + * An implementation of the model Factory. + * @generated + */ +public class RBAViewFactoryImpl extends EFactoryImpl implements RBAViewFactory { + /** + * Creates the default factory implementation. + * + * @generated + */ + public static RBAViewFactory init() { + try { + RBAViewFactory theRBAViewFactory = (RBAViewFactory) EPackage.Registry.INSTANCE + .getEFactory(RBAViewPackage.eNS_URI); + if (theRBAViewFactory != null) { + return theRBAViewFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new RBAViewFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public RBAViewFactoryImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case RBAViewPackage.VIEW_CONTENT: + return createViewContent(); + case RBAViewPackage.VIEW_CONTENT_SET: + return createViewContentSet(); + case RBAViewPackage.VIEW_CONTENT_STATE: + return createViewContentState(); + case RBAViewPackage.VERTICAL_LAYOUT: + return createVerticalLayout(); + case RBAViewPackage.HORIZONTAL_LAYOUT: + return createHorizontalLayout(); + case RBAViewPackage.FIXED_POSITION_LAYOUT: + return createFixedPositionLayout(); + case RBAViewPackage.POSITION_CONTAINER: + return createPositionContainer(); + case RBAViewPackage.DISPLAY: + return createDisplay(); + case RBAViewPackage.COMPOSITE_AREA: + return createCompositeArea(); + case RBAViewPackage.AREA: + return createArea(); + case RBAViewPackage.AREA_SET: + return createAreaSet(); + case RBAViewPackage.SIZE: + return createSize(); + case RBAViewPackage.SIZE_REFERENCE: + return createSizeReference(); + case RBAViewPackage.OFFSET: + return createOffset(); + case RBAViewPackage.IS_DISPLAYED: + return createIsDisplayed(); + case RBAViewPackage.DISPLAYING_CONTENT: + return createDisplayingContent(); + case RBAViewPackage.IS_HIDDEN: + return createIsHidden(); + case RBAViewPackage.IS_VISIBLE: + return createIsVisible(); + case RBAViewPackage.ALL_INSTANCE_OF_AREA: + return createAllInstanceOfArea(); + case RBAViewPackage.ALL_INSTANCE_OF_VIEW_CONTENT: + return createAllInstanceOfViewContent(); + case RBAViewPackage.IS_DISPLAYED_ON: + return createIsDisplayedOn(); + case RBAViewPackage.IS_CHANGED_DISPLAY: + return createIsChangedDisplay(); + case RBAViewPackage.IS_TRANSLATED_VIEW_TO: + return createIsTranslatedViewTo(); + case RBAViewPackage.HIDE_LOWER_PRIORITY: + return createHideLowerPriority(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case RBAViewPackage.BASE_POINT: + return createBasePointFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case RBAViewPackage.BASE_POINT: + return convertBasePointToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + public ViewContent createViewContent() { + ViewContentImpl viewContent = new ViewContentImpl(); + return viewContent; + } + + /** + * + * @generated + */ + public ViewContentSet createViewContentSet() { + ViewContentSetImpl viewContentSet = new ViewContentSetImpl(); + return viewContentSet; + } + + /** + * + * @generated + */ + public ViewContentState createViewContentState() { + ViewContentStateImpl viewContentState = new ViewContentStateImpl(); + return viewContentState; + } + + /** + * + * @generated + */ + public VerticalLayout createVerticalLayout() { + VerticalLayoutImpl verticalLayout = new VerticalLayoutImpl(); + return verticalLayout; + } + + /** + * + * @generated + */ + public HorizontalLayout createHorizontalLayout() { + HorizontalLayoutImpl horizontalLayout = new HorizontalLayoutImpl(); + return horizontalLayout; + } + + /** + * + * @generated + */ + public FixedPositionLayout createFixedPositionLayout() { + FixedPositionLayoutImpl fixedPositionLayout = new FixedPositionLayoutImpl(); + return fixedPositionLayout; + } + + /** + * + * @generated + */ + public PositionContainer createPositionContainer() { + PositionContainerImpl positionContainer = new PositionContainerImpl(); + return positionContainer; + } + + /** + * + * @generated + */ + public Display createDisplay() { + DisplayImpl display = new DisplayImpl(); + return display; + } + + /** + * + * @generated + */ + public CompositeArea createCompositeArea() { + CompositeAreaImpl compositeArea = new CompositeAreaImpl(); + return compositeArea; + } + + /** + * + * @generated + */ + public Area createArea() { + AreaImpl area = new AreaImpl(); + return area; + } + + /** + * + * @generated + */ + public AreaSet createAreaSet() { + AreaSetImpl areaSet = new AreaSetImpl(); + return areaSet; + } + + /** + * + * @generated + */ + public Size createSize() { + SizeImpl size = new SizeImpl(); + return size; + } + + /** + * + * @generated + */ + public SizeReference createSizeReference() { + SizeReferenceImpl sizeReference = new SizeReferenceImpl(); + return sizeReference; + } + + /** + * + * @generated + */ + public Offset createOffset() { + OffsetImpl offset = new OffsetImpl(); + return offset; + } + + /** + * + * @generated + */ + public IsDisplayed createIsDisplayed() { + IsDisplayedImpl isDisplayed = new IsDisplayedImpl(); + return isDisplayed; + } + + /** + * + * @generated + */ + public DisplayingContent createDisplayingContent() { + DisplayingContentImpl displayingContent = new DisplayingContentImpl(); + return displayingContent; + } + + /** + * + * @generated + */ + public IsHidden createIsHidden() { + IsHiddenImpl isHidden = new IsHiddenImpl(); + return isHidden; + } + + /** + * + * @generated + */ + public IsVisible createIsVisible() { + IsVisibleImpl isVisible = new IsVisibleImpl(); + return isVisible; + } + + /** + * + * @generated + */ + public AllInstanceOfArea createAllInstanceOfArea() { + AllInstanceOfAreaImpl allInstanceOfArea = new AllInstanceOfAreaImpl(); + return allInstanceOfArea; + } + + /** + * + * @generated + */ + public AllInstanceOfViewContent createAllInstanceOfViewContent() { + AllInstanceOfViewContentImpl allInstanceOfViewContent = new AllInstanceOfViewContentImpl(); + return allInstanceOfViewContent; + } + + /** + * + * @generated + */ + public IsDisplayedOn createIsDisplayedOn() { + IsDisplayedOnImpl isDisplayedOn = new IsDisplayedOnImpl(); + return isDisplayedOn; + } + + /** + * + * @generated + */ + public IsChangedDisplay createIsChangedDisplay() { + IsChangedDisplayImpl isChangedDisplay = new IsChangedDisplayImpl(); + return isChangedDisplay; + } + + /** + * + * @generated + */ + public IsTranslatedViewTo createIsTranslatedViewTo() { + IsTranslatedViewToImpl isTranslatedViewTo = new IsTranslatedViewToImpl(); + return isTranslatedViewTo; + } + + /** + * + * @generated + */ + public HideLowerPriority createHideLowerPriority() { + HideLowerPriorityImpl hideLowerPriority = new HideLowerPriorityImpl(); + return hideLowerPriority; + } + + /** + * + * @generated + */ + public BasePoint createBasePointFromString(EDataType eDataType, String initialValue) { + BasePoint result = BasePoint.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * @generated + */ + public String convertBasePointToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * @generated + */ + public RBAViewPackage getRBAViewPackage() { + return (RBAViewPackage) getEPackage(); + } + + /** + * + * @deprecated + * @generated + */ + @Deprecated + public static RBAViewPackage getPackage() { + return RBAViewPackage.eINSTANCE; + } + +} // RBAViewFactoryImpl diff --git a/rba.model.view/src/rba/view/impl/RBAViewPackageImpl.java b/rba.model.view/src/rba/view/impl/RBAViewPackageImpl.java new file mode 100644 index 0000000..3552e11 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/RBAViewPackageImpl.java @@ -0,0 +1,1430 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import rba.core.RBACorePackage; +import rba.view.AlignedLayout; +import rba.view.AllInstanceOfArea; +import rba.view.AllInstanceOfViewContent; +import rba.view.Area; +import rba.view.AreaOperator; +import rba.view.AreaSet; +import rba.view.BasePoint; +import rba.view.CompositeArea; +import rba.view.Display; +import rba.view.DisplayingContent; +import rba.view.FixedPositionLayout; +import rba.view.HideLowerPriority; +import rba.view.HorizontalLayout; +import rba.view.IsChangedDisplay; +import rba.view.IsDisplayed; +import rba.view.IsDisplayedOn; +import rba.view.IsHidden; +import rba.view.IsTranslatedViewTo; +import rba.view.IsVisible; +import rba.view.LayoutManager; +import rba.view.Offset; +import rba.view.PositionContainer; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; +import rba.view.Size; +import rba.view.SizeIdentifier; +import rba.view.SizeReference; +import rba.view.VerticalLayout; +import rba.view.ViewContent; +import rba.view.ViewContentOperator; +import rba.view.ViewContentSet; +import rba.view.ViewContentState; + +/** + * An implementation of the model Package. + * @generated + */ +public class RBAViewPackageImpl extends EPackageImpl implements RBAViewPackage { + /** + * + * @generated + */ + private EClass viewContentEClass = null; + + /** + * + * @generated + */ + private EClass viewContentSetEClass = null; + + /** + * + * @generated + */ + private EClass viewContentStateEClass = null; + + /** + * + * @generated + */ + private EClass layoutManagerEClass = null; + + /** + * + * @generated + */ + private EClass alignedLayoutEClass = null; + + /** + * + * @generated + */ + private EClass verticalLayoutEClass = null; + + /** + * + * @generated + */ + private EClass horizontalLayoutEClass = null; + + /** + * + * @generated + */ + private EClass fixedPositionLayoutEClass = null; + + /** + * + * @generated + */ + private EClass positionContainerEClass = null; + + /** + * + * @generated + */ + private EClass displayEClass = null; + + /** + * + * @generated + */ + private EClass compositeAreaEClass = null; + + /** + * + * @generated + */ + private EClass areaEClass = null; + + /** + * + * @generated + */ + private EClass areaSetEClass = null; + + /** + * + * @generated + */ + private EClass sizeIdentifierEClass = null; + + /** + * + * @generated + */ + private EClass sizeEClass = null; + + /** + * + * @generated + */ + private EClass sizeReferenceEClass = null; + + /** + * + * @generated + */ + private EClass offsetEClass = null; + + /** + * + * @generated + */ + private EClass areaOperatorEClass = null; + + /** + * + * @generated + */ + private EClass isDisplayedEClass = null; + + /** + * + * @generated + */ + private EClass displayingContentEClass = null; + + /** + * + * @generated + */ + private EClass isHiddenEClass = null; + + /** + * + * @generated + */ + private EClass viewContentOperatorEClass = null; + + /** + * + * @generated + */ + private EClass isVisibleEClass = null; + + /** + * + * @generated + */ + private EClass allInstanceOfAreaEClass = null; + + /** + * + * @generated + */ + private EClass allInstanceOfViewContentEClass = null; + + /** + * + * @generated + */ + private EClass isDisplayedOnEClass = null; + + /** + * + * @generated + */ + private EClass isChangedDisplayEClass = null; + + /** + * + * @generated + */ + private EClass isTranslatedViewToEClass = null; + + /** + * + * @generated + */ + private EClass hideLowerPriorityEClass = null; + + /** + * + * @generated + */ + private EEnum basePointEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see rba.view.RBAViewPackage#eNS_URI + * @see #init() + * @generated + */ + private RBAViewPackageImpl() { + super(eNS_URI, RBAViewFactory.eINSTANCE); + } + + /** + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link RBAViewPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static RBAViewPackage init() { + if (isInited) + return (RBAViewPackage) EPackage.Registry.INSTANCE.getEPackage(RBAViewPackage.eNS_URI); + + // Obtain or create and register package + RBAViewPackageImpl theRBAViewPackage = (RBAViewPackageImpl) (EPackage.Registry.INSTANCE + .get(eNS_URI) instanceof RBAViewPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) + : new RBAViewPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + RBACorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theRBAViewPackage.createPackageContents(); + + // Initialize created meta-data + theRBAViewPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theRBAViewPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(RBAViewPackage.eNS_URI, theRBAViewPackage); + return theRBAViewPackage; + } + + /** + * + * @generated + */ + public EClass getViewContent() { + return viewContentEClass; + } + + /** + * + * @generated + */ + public EReference getViewContent_Size() { + return (EReference) viewContentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EOperation getViewContent__GetExpressionType() { + return viewContentEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getViewContentSet() { + return viewContentSetEClass; + } + + /** + * + * @generated + */ + public EOperation getViewContentSet__GetExpressionType() { + return viewContentSetEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getViewContentState() { + return viewContentStateEClass; + } + + /** + * + * @generated + */ + public EOperation getViewContentState__GetExpressionType() { + return viewContentStateEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getLayoutManager() { + return layoutManagerEClass; + } + + /** + * + * @generated + */ + public EOperation getLayoutManager__CollectLeafArea() { + return layoutManagerEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getAlignedLayout() { + return alignedLayoutEClass; + } + + /** + * + * @generated + */ + public EReference getAlignedLayout_Subarea() { + return (EReference) alignedLayoutEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getAlignedLayout_BasePoint() { + return (EAttribute) alignedLayoutEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EOperation getAlignedLayout__CollectLeafArea() { + return alignedLayoutEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getVerticalLayout() { + return verticalLayoutEClass; + } + + /** + * + * @generated + */ + public EClass getHorizontalLayout() { + return horizontalLayoutEClass; + } + + /** + * + * @generated + */ + public EClass getFixedPositionLayout() { + return fixedPositionLayoutEClass; + } + + /** + * + * @generated + */ + public EReference getFixedPositionLayout_SubAreaPosition() { + return (EReference) fixedPositionLayoutEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EOperation getFixedPositionLayout__CollectLeafArea() { + return fixedPositionLayoutEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getPositionContainer() { + return positionContainerEClass; + } + + /** + * + * @generated + */ + public EAttribute getPositionContainer_X() { + return (EAttribute) positionContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getPositionContainer_Y() { + return (EAttribute) positionContainerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getPositionContainer_BasePoint() { + return (EAttribute) positionContainerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EReference getPositionContainer_Area() { + return (EReference) positionContainerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * @generated + */ + public EReference getPositionContainer_Offset() { + return (EReference) positionContainerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * @generated + */ + public EClass getDisplay() { + return displayEClass; + } + + /** + * + * @generated + */ + public EReference getDisplay_Root() { + return (EReference) displayEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getDisplay_Size() { + return (EReference) displayEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getCompositeArea() { + return compositeAreaEClass; + } + + /** + * + * @generated + */ + public EReference getCompositeArea_Layout() { + return (EReference) compositeAreaEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EOperation getCompositeArea__CollectLeafArea() { + return compositeAreaEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getCompositeArea__GetExpressionType() { + return compositeAreaEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getArea() { + return areaEClass; + } + + /** + * + * @generated + */ + public EReference getArea_Zorder() { + return (EReference) areaEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getArea_Size() { + return (EReference) areaEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EOperation getArea__GetExpressionType() { + return areaEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getAreaSet() { + return areaSetEClass; + } + + /** + * + * @generated + */ + public EOperation getAreaSet__GetExpressionType() { + return areaSetEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getSizeIdentifier() { + return sizeIdentifierEClass; + } + + /** + * + * @generated + */ + public EClass getSize() { + return sizeEClass; + } + + /** + * + * @generated + */ + public EAttribute getSize_Width() { + return (EAttribute) sizeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getSize_Height() { + return (EAttribute) sizeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getSizeReference() { + return sizeReferenceEClass; + } + + /** + * + * @generated + */ + public EReference getSizeReference_Size() { + return (EReference) sizeReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getOffset() { + return offsetEClass; + } + + /** + * + * @generated + */ + public EAttribute getOffset_X() { + return (EAttribute) offsetEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getOffset_Y() { + return (EAttribute) offsetEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EReference getOffset_Size() { + return (EReference) offsetEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getAreaOperator() { + return areaOperatorEClass; + } + + /** + * + * @generated + */ + public EClass getIsDisplayed() { + return isDisplayedEClass; + } + + /** + * + * @generated + */ + public EOperation getIsDisplayed__GetSymbol() { + return isDisplayedEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getIsDisplayed__GetUnderlyingType() { + return isDisplayedEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getDisplayingContent() { + return displayingContentEClass; + } + + /** + * + * @generated + */ + public EOperation getDisplayingContent__GetSymbol() { + return displayingContentEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getDisplayingContent__GetUnderlyingType() { + return displayingContentEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getIsHidden() { + return isHiddenEClass; + } + + /** + * + * @generated + */ + public EOperation getIsHidden__GetSymbol() { + return isHiddenEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getIsHidden__GetUnderlyingType() { + return isHiddenEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getViewContentOperator() { + return viewContentOperatorEClass; + } + + /** + * + * @generated + */ + public EOperation getViewContentOperator__GetUnderlyingType() { + return viewContentOperatorEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getIsVisible() { + return isVisibleEClass; + } + + /** + * + * @generated + */ + public EOperation getIsVisible__GetSymbol() { + return isVisibleEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EClass getAllInstanceOfArea() { + return allInstanceOfAreaEClass; + } + + /** + * + * @generated + */ + public EOperation getAllInstanceOfArea__GetExpressionText() { + return allInstanceOfAreaEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getAllInstanceOfArea__GetUnderlyingType() { + return allInstanceOfAreaEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getAllInstanceOfViewContent() { + return allInstanceOfViewContentEClass; + } + + /** + * + * @generated + */ + public EOperation getAllInstanceOfViewContent__GetExpressionText() { + return allInstanceOfViewContentEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getAllInstanceOfViewContent__GetUnderlyingType() { + return allInstanceOfViewContentEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getIsDisplayedOn() { + return isDisplayedOnEClass; + } + + /** + * + * @generated + */ + public EOperation getIsDisplayedOn__GetSymbol() { + return isDisplayedOnEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getIsDisplayedOn__GetUnderlyingType() { + return isDisplayedOnEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EOperation getIsDisplayedOn__GetExpressionText() { + return isDisplayedOnEClass.getEOperations().get(2); + } + + /** + * + * @generated + */ + public EClass getIsChangedDisplay() { + return isChangedDisplayEClass; + } + + /** + * + * @generated + */ + public EOperation getIsChangedDisplay__GetSymbol() { + return isChangedDisplayEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getIsChangedDisplay__GetUnderlyingType() { + return isChangedDisplayEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EClass getIsTranslatedViewTo() { + return isTranslatedViewToEClass; + } + + /** + * + * @generated + */ + public EOperation getIsTranslatedViewTo__GetSymbol() { + return isTranslatedViewToEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getIsTranslatedViewTo__GetUnderlyingType() { + return isTranslatedViewToEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EOperation getIsTranslatedViewTo__GetExpressionText() { + return isTranslatedViewToEClass.getEOperations().get(2); + } + + /** + * + * @generated + */ + public EClass getHideLowerPriority() { + return hideLowerPriorityEClass; + } + + /** + * + * @generated + */ + public EOperation getHideLowerPriority__GetSymbol() { + return hideLowerPriorityEClass.getEOperations().get(0); + } + + /** + * + * @generated + */ + public EOperation getHideLowerPriority__GetUnderlyingType() { + return hideLowerPriorityEClass.getEOperations().get(1); + } + + /** + * + * @generated + */ + public EOperation getHideLowerPriority__GetExpressionText() { + return hideLowerPriorityEClass.getEOperations().get(2); + } + + /** + * + * @generated + */ + public EEnum getBasePoint() { + return basePointEEnum; + } + + /** + * + * @generated + */ + public RBAViewFactory getRBAViewFactory() { + return (RBAViewFactory) getEFactoryInstance(); + } + + /** + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + viewContentEClass = createEClass(VIEW_CONTENT); + createEReference(viewContentEClass, VIEW_CONTENT__SIZE); + createEOperation(viewContentEClass, VIEW_CONTENT___GET_EXPRESSION_TYPE); + + viewContentSetEClass = createEClass(VIEW_CONTENT_SET); + createEOperation(viewContentSetEClass, VIEW_CONTENT_SET___GET_EXPRESSION_TYPE); + + viewContentStateEClass = createEClass(VIEW_CONTENT_STATE); + createEOperation(viewContentStateEClass, VIEW_CONTENT_STATE___GET_EXPRESSION_TYPE); + + layoutManagerEClass = createEClass(LAYOUT_MANAGER); + createEOperation(layoutManagerEClass, LAYOUT_MANAGER___COLLECT_LEAF_AREA); + + alignedLayoutEClass = createEClass(ALIGNED_LAYOUT); + createEReference(alignedLayoutEClass, ALIGNED_LAYOUT__SUBAREA); + createEAttribute(alignedLayoutEClass, ALIGNED_LAYOUT__BASE_POINT); + createEOperation(alignedLayoutEClass, ALIGNED_LAYOUT___COLLECT_LEAF_AREA); + + verticalLayoutEClass = createEClass(VERTICAL_LAYOUT); + + horizontalLayoutEClass = createEClass(HORIZONTAL_LAYOUT); + + fixedPositionLayoutEClass = createEClass(FIXED_POSITION_LAYOUT); + createEReference(fixedPositionLayoutEClass, FIXED_POSITION_LAYOUT__SUB_AREA_POSITION); + createEOperation(fixedPositionLayoutEClass, FIXED_POSITION_LAYOUT___COLLECT_LEAF_AREA); + + positionContainerEClass = createEClass(POSITION_CONTAINER); + createEAttribute(positionContainerEClass, POSITION_CONTAINER__X); + createEAttribute(positionContainerEClass, POSITION_CONTAINER__Y); + createEAttribute(positionContainerEClass, POSITION_CONTAINER__BASE_POINT); + createEReference(positionContainerEClass, POSITION_CONTAINER__AREA); + createEReference(positionContainerEClass, POSITION_CONTAINER__OFFSET); + + displayEClass = createEClass(DISPLAY); + createEReference(displayEClass, DISPLAY__ROOT); + createEReference(displayEClass, DISPLAY__SIZE); + + compositeAreaEClass = createEClass(COMPOSITE_AREA); + createEReference(compositeAreaEClass, COMPOSITE_AREA__LAYOUT); + createEOperation(compositeAreaEClass, COMPOSITE_AREA___COLLECT_LEAF_AREA); + createEOperation(compositeAreaEClass, COMPOSITE_AREA___GET_EXPRESSION_TYPE); + + areaEClass = createEClass(AREA); + createEReference(areaEClass, AREA__ZORDER); + createEReference(areaEClass, AREA__SIZE); + createEOperation(areaEClass, AREA___GET_EXPRESSION_TYPE); + + areaSetEClass = createEClass(AREA_SET); + createEOperation(areaSetEClass, AREA_SET___GET_EXPRESSION_TYPE); + + sizeIdentifierEClass = createEClass(SIZE_IDENTIFIER); + + sizeEClass = createEClass(SIZE); + createEAttribute(sizeEClass, SIZE__WIDTH); + createEAttribute(sizeEClass, SIZE__HEIGHT); + + sizeReferenceEClass = createEClass(SIZE_REFERENCE); + createEReference(sizeReferenceEClass, SIZE_REFERENCE__SIZE); + + offsetEClass = createEClass(OFFSET); + createEAttribute(offsetEClass, OFFSET__X); + createEAttribute(offsetEClass, OFFSET__Y); + createEReference(offsetEClass, OFFSET__SIZE); + + areaOperatorEClass = createEClass(AREA_OPERATOR); + + isDisplayedEClass = createEClass(IS_DISPLAYED); + createEOperation(isDisplayedEClass, IS_DISPLAYED___GET_SYMBOL); + createEOperation(isDisplayedEClass, IS_DISPLAYED___GET_UNDERLYING_TYPE); + + displayingContentEClass = createEClass(DISPLAYING_CONTENT); + createEOperation(displayingContentEClass, DISPLAYING_CONTENT___GET_SYMBOL); + createEOperation(displayingContentEClass, DISPLAYING_CONTENT___GET_UNDERLYING_TYPE); + + isHiddenEClass = createEClass(IS_HIDDEN); + createEOperation(isHiddenEClass, IS_HIDDEN___GET_SYMBOL); + createEOperation(isHiddenEClass, IS_HIDDEN___GET_UNDERLYING_TYPE); + + viewContentOperatorEClass = createEClass(VIEW_CONTENT_OPERATOR); + createEOperation(viewContentOperatorEClass, VIEW_CONTENT_OPERATOR___GET_UNDERLYING_TYPE); + + isVisibleEClass = createEClass(IS_VISIBLE); + createEOperation(isVisibleEClass, IS_VISIBLE___GET_SYMBOL); + + allInstanceOfAreaEClass = createEClass(ALL_INSTANCE_OF_AREA); + createEOperation(allInstanceOfAreaEClass, ALL_INSTANCE_OF_AREA___GET_EXPRESSION_TEXT); + createEOperation(allInstanceOfAreaEClass, ALL_INSTANCE_OF_AREA___GET_UNDERLYING_TYPE); + + allInstanceOfViewContentEClass = createEClass(ALL_INSTANCE_OF_VIEW_CONTENT); + createEOperation(allInstanceOfViewContentEClass, ALL_INSTANCE_OF_VIEW_CONTENT___GET_EXPRESSION_TEXT); + createEOperation(allInstanceOfViewContentEClass, ALL_INSTANCE_OF_VIEW_CONTENT___GET_UNDERLYING_TYPE); + + isDisplayedOnEClass = createEClass(IS_DISPLAYED_ON); + createEOperation(isDisplayedOnEClass, IS_DISPLAYED_ON___GET_SYMBOL); + createEOperation(isDisplayedOnEClass, IS_DISPLAYED_ON___GET_UNDERLYING_TYPE); + createEOperation(isDisplayedOnEClass, IS_DISPLAYED_ON___GET_EXPRESSION_TEXT); + + isChangedDisplayEClass = createEClass(IS_CHANGED_DISPLAY); + createEOperation(isChangedDisplayEClass, IS_CHANGED_DISPLAY___GET_SYMBOL); + createEOperation(isChangedDisplayEClass, IS_CHANGED_DISPLAY___GET_UNDERLYING_TYPE); + + isTranslatedViewToEClass = createEClass(IS_TRANSLATED_VIEW_TO); + createEOperation(isTranslatedViewToEClass, IS_TRANSLATED_VIEW_TO___GET_SYMBOL); + createEOperation(isTranslatedViewToEClass, IS_TRANSLATED_VIEW_TO___GET_UNDERLYING_TYPE); + createEOperation(isTranslatedViewToEClass, IS_TRANSLATED_VIEW_TO___GET_EXPRESSION_TEXT); + + hideLowerPriorityEClass = createEClass(HIDE_LOWER_PRIORITY); + createEOperation(hideLowerPriorityEClass, HIDE_LOWER_PRIORITY___GET_SYMBOL); + createEOperation(hideLowerPriorityEClass, HIDE_LOWER_PRIORITY___GET_UNDERLYING_TYPE); + createEOperation(hideLowerPriorityEClass, HIDE_LOWER_PRIORITY___GET_EXPRESSION_TEXT); + + // Create enums + basePointEEnum = createEEnum(BASE_POINT); + } + + /** + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + RBACorePackage theRBACorePackage = (RBACorePackage) EPackage.Registry.INSTANCE + .getEPackage(RBACorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + viewContentEClass.getESuperTypes().add(theRBACorePackage.getContent()); + viewContentSetEClass.getESuperTypes().add(theRBACorePackage.getContentSet()); + viewContentStateEClass.getESuperTypes().add(theRBACorePackage.getContentState()); + alignedLayoutEClass.getESuperTypes().add(this.getLayoutManager()); + verticalLayoutEClass.getESuperTypes().add(this.getAlignedLayout()); + horizontalLayoutEClass.getESuperTypes().add(this.getAlignedLayout()); + fixedPositionLayoutEClass.getESuperTypes().add(this.getLayoutManager()); + displayEClass.getESuperTypes().add(theRBACorePackage.getPackagableElement()); + compositeAreaEClass.getESuperTypes().add(theRBACorePackage.getPackagableElement()); + areaEClass.getESuperTypes().add(theRBACorePackage.getAllocatable()); + areaSetEClass.getESuperTypes().add(theRBACorePackage.getAllocatableSet()); + sizeEClass.getESuperTypes().add(theRBACorePackage.getPackagableElement()); + sizeEClass.getESuperTypes().add(this.getSizeIdentifier()); + sizeReferenceEClass.getESuperTypes().add(this.getSizeIdentifier()); + offsetEClass.getESuperTypes().add(theRBACorePackage.getPackagableElement()); + areaOperatorEClass.getESuperTypes().add(theRBACorePackage.getAllocatableOperator()); + isDisplayedEClass.getESuperTypes().add(this.getAreaOperator()); + displayingContentEClass.getESuperTypes().add(this.getAreaOperator()); + isHiddenEClass.getESuperTypes().add(this.getAreaOperator()); + viewContentOperatorEClass.getESuperTypes().add(theRBACorePackage.getContentOperator()); + isVisibleEClass.getESuperTypes().add(this.getViewContentOperator()); + allInstanceOfAreaEClass.getESuperTypes().add(theRBACorePackage.getSetExpression()); + allInstanceOfViewContentEClass.getESuperTypes().add(theRBACorePackage.getSetExpression()); + isDisplayedOnEClass.getESuperTypes().add(this.getViewContentOperator()); + isDisplayedOnEClass.getESuperTypes().add(theRBACorePackage.getSugarExpressionBase()); + isChangedDisplayEClass.getESuperTypes().add(this.getAreaOperator()); + isChangedDisplayEClass.getESuperTypes().add(theRBACorePackage.getSugarExpressionBase()); + isTranslatedViewToEClass.getESuperTypes().add(this.getAreaOperator()); + isTranslatedViewToEClass.getESuperTypes().add(theRBACorePackage.getSugarExpressionBase()); + hideLowerPriorityEClass.getESuperTypes().add(theRBACorePackage.getOperator()); + hideLowerPriorityEClass.getESuperTypes().add(theRBACorePackage.getSugarExpressionBase()); + + // Initialize classes, features, and operations; add parameters + initEClass(viewContentEClass, ViewContent.class, "ViewContent", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getViewContent_Size(), this.getSizeIdentifier(), null, "size", null, 0, -1, ViewContent.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getViewContent__GetExpressionType(), theRBACorePackage.getExpressionType(), "getExpressionType", + 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(viewContentSetEClass, ViewContentSet.class, "ViewContentSet", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getViewContentSet__GetExpressionType(), theRBACorePackage.getExpressionType(), + "getExpressionType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(viewContentStateEClass, ViewContentState.class, "ViewContentState", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getViewContentState__GetExpressionType(), theRBACorePackage.getExpressionType(), + "getExpressionType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(layoutManagerEClass, LayoutManager.class, "LayoutManager", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getLayoutManager__CollectLeafArea(), this.getArea(), "collectLeafArea", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEClass(alignedLayoutEClass, AlignedLayout.class, "AlignedLayout", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAlignedLayout_Subarea(), this.getArea(), null, "subarea", null, 0, -1, AlignedLayout.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAlignedLayout_BasePoint(), this.getBasePoint(), "basePoint", null, 0, 1, AlignedLayout.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAlignedLayout__CollectLeafArea(), this.getArea(), "collectLeafArea", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEClass(verticalLayoutEClass, VerticalLayout.class, "VerticalLayout", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(horizontalLayoutEClass, HorizontalLayout.class, "HorizontalLayout", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(fixedPositionLayoutEClass, FixedPositionLayout.class, "FixedPositionLayout", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFixedPositionLayout_SubAreaPosition(), this.getPositionContainer(), null, "subAreaPosition", + null, 0, -1, FixedPositionLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getFixedPositionLayout__CollectLeafArea(), this.getArea(), "collectLeafArea", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEClass(positionContainerEClass, PositionContainer.class, "PositionContainer", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPositionContainer_X(), ecorePackage.getEInt(), "x", null, 1, 1, PositionContainer.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPositionContainer_Y(), ecorePackage.getEInt(), "y", null, 1, 1, PositionContainer.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPositionContainer_BasePoint(), this.getBasePoint(), "basePoint", null, 0, 1, + PositionContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getPositionContainer_Area(), this.getArea(), null, "area", null, 1, 1, PositionContainer.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPositionContainer_Offset(), this.getOffset(), null, "offset", null, 0, -1, + PositionContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(displayEClass, Display.class, "Display", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDisplay_Root(), this.getCompositeArea(), null, "root", null, 0, 1, Display.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDisplay_Size(), this.getSizeIdentifier(), null, "size", null, 1, 1, Display.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositeAreaEClass, CompositeArea.class, "CompositeArea", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositeArea_Layout(), this.getLayoutManager(), null, "layout", null, 0, 1, + CompositeArea.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getCompositeArea__CollectLeafArea(), this.getArea(), "collectLeafArea", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEOperation(getCompositeArea__GetExpressionType(), theRBACorePackage.getExpressionType(), + "getExpressionType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(areaEClass, Area.class, "Area", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getArea_Zorder(), theRBACorePackage.getExpression(), null, "zorder", null, 0, 1, Area.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getArea_Size(), this.getSizeIdentifier(), null, "size", null, 0, -1, Area.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEOperation(getArea__GetExpressionType(), theRBACorePackage.getExpressionType(), "getExpressionType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(areaSetEClass, AreaSet.class, "AreaSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAreaSet__GetExpressionType(), theRBACorePackage.getExpressionType(), "getExpressionType", 0, + 1, IS_UNIQUE, IS_ORDERED); + + initEClass(sizeIdentifierEClass, SizeIdentifier.class, "SizeIdentifier", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(sizeEClass, Size.class, "Size", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSize_Width(), ecorePackage.getEInt(), "width", null, 1, 1, Size.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSize_Height(), ecorePackage.getEInt(), "height", null, 1, 1, Size.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(sizeReferenceEClass, SizeReference.class, "SizeReference", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getSizeReference_Size(), this.getSize(), null, "size", null, 0, 1, SizeReference.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(offsetEClass, Offset.class, "Offset", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getOffset_X(), ecorePackage.getEInt(), "x", null, 1, 1, Offset.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOffset_Y(), ecorePackage.getEInt(), "y", null, 1, 1, Offset.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOffset_Size(), this.getSizeReference(), null, "size", null, 1, 1, Offset.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(areaOperatorEClass, AreaOperator.class, "AreaOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(isDisplayedEClass, IsDisplayed.class, "IsDisplayed", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsDisplayed__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsDisplayed__GetUnderlyingType(), theRBACorePackage.getExpressionType(), "getUnderlyingType", + 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(displayingContentEClass, DisplayingContent.class, "DisplayingContent", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getDisplayingContent__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getDisplayingContent__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(isHiddenEClass, IsHidden.class, "IsHidden", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsHidden__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsHidden__GetUnderlyingType(), theRBACorePackage.getExpressionType(), "getUnderlyingType", 0, + 1, IS_UNIQUE, IS_ORDERED); + + initEClass(viewContentOperatorEClass, ViewContentOperator.class, "ViewContentOperator", IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getViewContentOperator__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(isVisibleEClass, IsVisible.class, "IsVisible", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsVisible__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(allInstanceOfAreaEClass, AllInstanceOfArea.class, "AllInstanceOfArea", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAllInstanceOfArea__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getAllInstanceOfArea__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(allInstanceOfViewContentEClass, AllInstanceOfViewContent.class, "AllInstanceOfViewContent", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAllInstanceOfViewContent__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", + 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getAllInstanceOfViewContent__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(isDisplayedOnEClass, IsDisplayedOn.class, "IsDisplayedOn", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsDisplayedOn__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsDisplayedOn__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsDisplayedOn__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isChangedDisplayEClass, IsChangedDisplay.class, "IsChangedDisplay", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsChangedDisplay__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsChangedDisplay__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(isTranslatedViewToEClass, IsTranslatedViewTo.class, "IsTranslatedViewTo", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsTranslatedViewTo__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsTranslatedViewTo__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsTranslatedViewTo__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(hideLowerPriorityEClass, HideLowerPriority.class, "HideLowerPriority", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getHideLowerPriority__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getHideLowerPriority__GetUnderlyingType(), theRBACorePackage.getExpressionType(), + "getUnderlyingType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getHideLowerPriority__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(basePointEEnum, BasePoint.class, "BasePoint"); + addEEnumLiteral(basePointEEnum, BasePoint.LEFT_TOP); + addEEnumLiteral(basePointEEnum, BasePoint.LEFT_MIDDLE); + addEEnumLiteral(basePointEEnum, BasePoint.LEFT_BOTTOM); + addEEnumLiteral(basePointEEnum, BasePoint.RIGHT_TOP); + addEEnumLiteral(basePointEEnum, BasePoint.RIGHT_MIDDLE); + addEEnumLiteral(basePointEEnum, BasePoint.RIGHT_BOTTOM); + addEEnumLiteral(basePointEEnum, BasePoint.CENTER_TOP); + addEEnumLiteral(basePointEEnum, BasePoint.CENTER_MIDDLE); + addEEnumLiteral(basePointEEnum, BasePoint.CENTER_BOTTOM); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/OCL/Import + createImportAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/OCL/Import. + * + * @generated + */ + protected void createImportAnnotations() { + String source = "http://www.eclipse.org/OCL/Import"; + addAnnotation(this, source, new String[] { "RbaCore", "../../rba.model.core/model/rbacore.ecore#/", "ecore", + "http://www.eclipse.org/emf/2002/Ecore" }); + } + +} // RBAViewPackageImpl diff --git a/rba.model.view/src/rba/view/impl/SizeIdentifierImpl.java b/rba.model.view/src/rba/view/impl/SizeIdentifierImpl.java new file mode 100644 index 0000000..8ca07ca --- /dev/null +++ b/rba.model.view/src/rba/view/impl/SizeIdentifierImpl.java @@ -0,0 +1,35 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import rba.view.RBAViewPackage; +import rba.view.SizeIdentifier; + +/** + * An implementation of the model object 'Size Identifier'. + * + * @generated + */ +public abstract class SizeIdentifierImpl extends MinimalEObjectImpl.Container implements SizeIdentifier { + /** + * + * @generated + */ + protected SizeIdentifierImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.SIZE_IDENTIFIER; + } + +} // SizeIdentifierImpl diff --git a/rba.model.view/src/rba/view/impl/SizeImpl.java b/rba.model.view/src/rba/view/impl/SizeImpl.java new file mode 100644 index 0000000..f320ca4 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/SizeImpl.java @@ -0,0 +1,274 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.impl.PackagableElementImpl; + +import rba.view.RBAViewPackage; +import rba.view.Size; + +/** + * An implementation of the model object 'Size'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.SizeImpl#getWidth Width}
  • + *
  • {@link rba.view.impl.SizeImpl#getHeight Height}
  • + *
+ * + * @generated + */ +public class SizeImpl extends PackagableElementImpl implements Size { + /** + * The default value of the '{@link #getWidth() Width}' attribute. + * + * @see #getWidth() + * @generated + * @ordered + */ + protected static final int WIDTH_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getWidth() Width}' attribute. + * + * @see #getWidth() + * @generated + * @ordered + */ + protected int width = WIDTH_EDEFAULT; + + /** + * This is true if the Width attribute has been set. + * + * @generated + * @ordered + */ + protected boolean widthESet; + + /** + * The default value of the '{@link #getHeight() Height}' attribute. + * + * @see #getHeight() + * @generated + * @ordered + */ + protected static final int HEIGHT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getHeight() Height}' attribute. + * + * @see #getHeight() + * @generated + * @ordered + */ + protected int height = HEIGHT_EDEFAULT; + + /** + * This is true if the Height attribute has been set. + * + * @generated + * @ordered + */ + protected boolean heightESet; + + /** + * + * @generated + */ + protected SizeImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.SIZE; + } + + /** + * + * @generated + */ + public int getWidth() { + return width; + } + + /** + * + * @generated + */ + public void setWidth(int newWidth) { + int oldWidth = width; + width = newWidth; + boolean oldWidthESet = widthESet; + widthESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.SIZE__WIDTH, oldWidth, width, + !oldWidthESet)); + } + + /** + * + * @generated + */ + public void unsetWidth() { + int oldWidth = width; + boolean oldWidthESet = widthESet; + width = WIDTH_EDEFAULT; + widthESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.SIZE__WIDTH, oldWidth, + WIDTH_EDEFAULT, oldWidthESet)); + } + + /** + * + * @generated + */ + public boolean isSetWidth() { + return widthESet; + } + + /** + * + * @generated + */ + public int getHeight() { + return height; + } + + /** + * + * @generated + */ + public void setHeight(int newHeight) { + int oldHeight = height; + height = newHeight; + boolean oldHeightESet = heightESet; + heightESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.SIZE__HEIGHT, oldHeight, height, + !oldHeightESet)); + } + + /** + * + * @generated + */ + public void unsetHeight() { + int oldHeight = height; + boolean oldHeightESet = heightESet; + height = HEIGHT_EDEFAULT; + heightESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.SIZE__HEIGHT, oldHeight, + HEIGHT_EDEFAULT, oldHeightESet)); + } + + /** + * + * @generated + */ + public boolean isSetHeight() { + return heightESet; + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.SIZE__WIDTH: + return getWidth(); + case RBAViewPackage.SIZE__HEIGHT: + return getHeight(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.SIZE__WIDTH: + setWidth((Integer) newValue); + return; + case RBAViewPackage.SIZE__HEIGHT: + setHeight((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.SIZE__WIDTH: + unsetWidth(); + return; + case RBAViewPackage.SIZE__HEIGHT: + unsetHeight(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.SIZE__WIDTH: + return isSetWidth(); + case RBAViewPackage.SIZE__HEIGHT: + return isSetHeight(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (width: "); + if (widthESet) + result.append(width); + else + result.append(""); + result.append(", height: "); + if (heightESet) + result.append(height); + else + result.append(""); + result.append(')'); + return result.toString(); + } + +} // SizeImpl diff --git a/rba.model.view/src/rba/view/impl/SizeReferenceImpl.java b/rba.model.view/src/rba/view/impl/SizeReferenceImpl.java new file mode 100644 index 0000000..3903a1d --- /dev/null +++ b/rba.model.view/src/rba/view/impl/SizeReferenceImpl.java @@ -0,0 +1,146 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.view.RBAViewPackage; +import rba.view.Size; +import rba.view.SizeReference; + +/** + * An implementation of the model object 'Size Reference'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.SizeReferenceImpl#getSize Size}
  • + *
+ * + * @generated + */ +public class SizeReferenceImpl extends SizeIdentifierImpl implements SizeReference { + /** + * The cached value of the '{@link #getSize() Size}' reference. + * + * @see #getSize() + * @generated + * @ordered + */ + protected Size size; + + /** + * + * @generated + */ + protected SizeReferenceImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.SIZE_REFERENCE; + } + + /** + * + * @generated + */ + public Size getSize() { + if (size != null && size.eIsProxy()) { + InternalEObject oldSize = (InternalEObject) size; + size = (Size) eResolveProxy(oldSize); + if (size != oldSize) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, RBAViewPackage.SIZE_REFERENCE__SIZE, + oldSize, size)); + } + } + return size; + } + + /** + * + * @generated + */ + public Size basicGetSize() { + return size; + } + + /** + * + * @generated + */ + public void setSize(Size newSize) { + Size oldSize = size; + size = newSize; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.SIZE_REFERENCE__SIZE, oldSize, size)); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.SIZE_REFERENCE__SIZE: + if (resolve) + return getSize(); + return basicGetSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.SIZE_REFERENCE__SIZE: + setSize((Size) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.SIZE_REFERENCE__SIZE: + setSize((Size) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.SIZE_REFERENCE__SIZE: + return size != null; + } + return super.eIsSet(featureID); + } + +} // SizeReferenceImpl diff --git a/rba.model.view/src/rba/view/impl/VerticalLayoutImpl.java b/rba.model.view/src/rba/view/impl/VerticalLayoutImpl.java new file mode 100644 index 0000000..bac8918 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/VerticalLayoutImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.view.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.view.RBAViewPackage; +import rba.view.VerticalLayout; + +/** + * An implementation of the model object 'Vertical Layout'. + * + * @generated + */ +public class VerticalLayoutImpl extends AlignedLayoutImpl implements VerticalLayout { + /** + * + * @generated + */ + protected VerticalLayoutImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.VERTICAL_LAYOUT; + } + +} // VerticalLayoutImpl diff --git a/rba.model.view/src/rba/view/impl/ViewContentImpl.java b/rba.model.view/src/rba/view/impl/ViewContentImpl.java new file mode 100644 index 0000000..e2a1688 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/ViewContentImpl.java @@ -0,0 +1,160 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.ExpressionType; +import rba.core.impl.ContentImpl; +import rba.view.RBAViewPackage; +import rba.view.SizeIdentifier; +import rba.view.ViewContent; + +/** + * An implementation of the model object 'View Content'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link rba.view.impl.ViewContentImpl#getSize Size}
  • + *
+ * + * @generated + */ +public class ViewContentImpl extends ContentImpl implements ViewContent { + /** + * The cached value of the '{@link #getSize() Size}' containment reference list. + * + * @see #getSize() + * @generated + * @ordered + */ + protected EList size; + + /** + * + * @generated + */ + protected ViewContentImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.VIEW_CONTENT; + } + + /** + * + * @generated + */ + public EList getSize() { + if (size == null) { + size = new EObjectContainmentEList(SizeIdentifier.class, this, + RBAViewPackage.VIEW_CONTENT__SIZE); + } + return size; + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.CONTENT; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + return ((InternalEList) getSize()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + return getSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + getSize().clear(); + getSize().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + getSize().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + return size != null && !size.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.VIEW_CONTENT___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ViewContentImpl diff --git a/rba.model.view/src/rba/view/impl/ViewContentOperatorImpl.java b/rba.model.view/src/rba/view/impl/ViewContentOperatorImpl.java new file mode 100644 index 0000000..d3a6b8c --- /dev/null +++ b/rba.model.view/src/rba/view/impl/ViewContentOperatorImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.core.impl.ContentOperatorImpl; + +import rba.view.RBAViewPackage; +import rba.view.ViewContentOperator; + +/** + * An implementation of the model object 'View Content Operator'. + * + * @generated + */ +public abstract class ViewContentOperatorImpl extends ContentOperatorImpl implements ViewContentOperator { + /** + * + * @generated + */ + protected ViewContentOperatorImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.VIEW_CONTENT_OPERATOR; + } + + /** + * + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.VIEW_CONTENT_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ViewContentOperatorImpl diff --git a/rba.model.view/src/rba/view/impl/ViewContentSetImpl.java b/rba.model.view/src/rba/view/impl/ViewContentSetImpl.java new file mode 100644 index 0000000..2454031 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/ViewContentSetImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.core.impl.ContentSetImpl; + +import rba.view.RBAViewPackage; +import rba.view.ViewContentSet; + +/** + * An implementation of the model object 'View Content Set'. + * + * @generated + */ +public class ViewContentSetImpl extends ContentSetImpl implements ViewContentSet { + /** + * + * @generated + */ + protected ViewContentSetImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.VIEW_CONTENT_SET; + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.SET_OF_CONTENT; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.VIEW_CONTENT_SET___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ViewContentSetImpl diff --git a/rba.model.view/src/rba/view/impl/ViewContentStateImpl.java b/rba.model.view/src/rba/view/impl/ViewContentStateImpl.java new file mode 100644 index 0000000..7dbdbd4 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/ViewContentStateImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.view.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; + +import rba.core.impl.ContentStateImpl; + +import rba.view.RBAViewPackage; +import rba.view.ViewContentState; + +/** + * An implementation of the model object 'View Content State'. + * + * @generated + */ +public class ViewContentStateImpl extends ContentStateImpl implements ViewContentState { + /** + * + * @generated + */ + protected ViewContentStateImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.VIEW_CONTENT_STATE; + } + + /** + * + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.CONTENT_STATE; + } + + /** + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case RBAViewPackage.VIEW_CONTENT_STATE___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ViewContentStateImpl -- cgit 1.2.3-korg