Skip to content

Commit

Permalink
Fix ObeoNetwork#857 could not delete property
Browse files Browse the repository at this point in the history
Make possible to delete a property in an AssociationClass
  • Loading branch information
fbats committed Jul 8, 2016
1 parent da7715c commit 5078696
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.uml2.common.util.UML2Util;
import org.eclipse.uml2.uml.AssociationClass;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Relationship;
import org.eclipse.uml2.uml.Type;
Expand Down Expand Up @@ -137,7 +138,8 @@ private void removeReferences(EObject eObject, EObject ancestorEObject) {
if (inverseReference.getEStructuralFeature().isChangeable() && (ancestorEObject == null
|| !EcoreUtil.isAncestor(ancestorEObject, inverseReference.getEObject()))) {
EcoreUtil.remove(inverseReference, eObject);
if (inverseReference.getEObject() instanceof Relationship) {
if (!(inverseReference.getEObject() instanceof AssociationClass)
&& inverseReference.getEObject() instanceof Relationship) {
destroy(inverseReference.getEObject());
}
}
Expand Down

0 comments on commit 5078696

Please sign in to comment.