From 6bd475a3eced9d9a912f76e24f91d2ad8da13d54 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Mon, 25 Jun 2018 00:16:48 +0200 Subject: Fixing multiple true/false + bug preventing generation without PS --- .../impl/PartialTypeInterpratationImpl.java | 68 ++++++++++++++++++++++ .../impl/PartialinterpretationPackageImpl.java | 13 ++++- .../partialinterpretation/impl/ScopeImpl.java | 59 ++++++++++++++++++- 3 files changed, 136 insertions(+), 4 deletions(-) (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl') diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java index beb45529..da9b1472 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java @@ -6,11 +6,16 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope; 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.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; /** * @@ -21,6 +26,7 @@ import org.eclipse.emf.ecore.util.EObjectResolvingEList; *

* * * @generated @@ -36,6 +42,16 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C */ protected EList elements; + /** + * The cached value of the '{@link #getScopes() Scopes}' reference list. + * + * + * @see #getScopes() + * @generated + * @ordered + */ + protected EList scopes; + /** * * @@ -67,6 +83,47 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C return elements; } + /** + * + * + * @generated + */ + public EList getScopes() { + if (scopes == null) { + scopes = new EObjectWithInverseResolvingEList(Scope.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION); + } + return scopes; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + return ((InternalEList)(InternalEList)getScopes()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + return ((InternalEList)getScopes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + /** * * @@ -77,6 +134,8 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C switch (featureID) { case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: return getElements(); + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + return getScopes(); } return super.eGet(featureID, resolve, coreType); } @@ -94,6 +153,10 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C getElements().clear(); getElements().addAll((Collection)newValue); return; + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + getScopes().clear(); + getScopes().addAll((Collection)newValue); + return; } super.eSet(featureID, newValue); } @@ -109,6 +172,9 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: getElements().clear(); return; + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + getScopes().clear(); + return; } super.eUnset(featureID); } @@ -123,6 +189,8 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C switch (featureID) { case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: return elements != null && !elements.isEmpty(); + case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: + return scopes != null && !scopes.isEmpty(); } return super.eIsSet(featureID); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java index c0515c43..a21dc306 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java @@ -471,6 +471,15 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(0); } + /** + * + * + * @generated + */ + public EReference getPartialTypeInterpratation_Scopes() { + return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -823,6 +832,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa partialTypeInterpratationEClass = createEClass(PARTIAL_TYPE_INTERPRATATION); createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__ELEMENTS); + createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__SCOPES); relationLinkEClass = createEClass(RELATION_LINK); @@ -950,6 +960,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa initEClass(partialTypeInterpratationEClass, PartialTypeInterpratation.class, "PartialTypeInterpratation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPartialTypeInterpratation_Elements(), theLogiclanguagePackage.getDefinedElement(), null, "elements", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPartialTypeInterpratation_Scopes(), this.getScope(), this.getScope_TargetTypeInterpretation(), "scopes", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationLinkEClass, RelationLink.class, "RelationLink", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -985,7 +996,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa initEClass(scopeEClass, Scope.class, "Scope", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getScope_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getScope_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), null, "targetTypeInterpretation", null, 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), this.getPartialTypeInterpratation_Scopes(), "targetTypeInterpretation", null, 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java index 4699aef6..d8ade871 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java @@ -8,6 +8,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par 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; @@ -172,11 +173,63 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ - public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { + public NotificationChain basicSetTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation, NotificationChain msgs) { PartialTypeInterpratation oldTargetTypeInterpretation = targetTypeInterpretation; targetTypeInterpretation = newTargetTypeInterpretation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, oldTargetTypeInterpretation, targetTypeInterpretation)); + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, oldTargetTypeInterpretation, newTargetTypeInterpretation); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { + if (newTargetTypeInterpretation != targetTypeInterpretation) { + NotificationChain msgs = null; + if (targetTypeInterpretation != null) + msgs = ((InternalEObject)targetTypeInterpretation).eInverseRemove(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); + if (newTargetTypeInterpretation != null) + msgs = ((InternalEObject)newTargetTypeInterpretation).eInverseAdd(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); + msgs = basicSetTargetTypeInterpretation(newTargetTypeInterpretation, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, newTargetTypeInterpretation, newTargetTypeInterpretation)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: + if (targetTypeInterpretation != null) + msgs = ((InternalEObject)targetTypeInterpretation).eInverseRemove(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); + return basicSetTargetTypeInterpretation((PartialTypeInterpratation)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: + return basicSetTargetTypeInterpretation(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); } /** -- cgit v1.2.3-70-g09d2