コード例 #1
0
 /** @generated */
 protected boolean canReorientTarget() {
   if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
     return false;
   }
   Element source = getLink().getOwner();
   if (!(getLink().eContainer() instanceof Interaction)) {
     return false;
   }
   Interaction container = (Interaction) getLink().eContainer();
   return UMLBaseItemSemanticEditPolicy.getLinkConstraints()
       .canExistMessage_8009(container, getLink(), source, getNewTarget());
 }
コード例 #2
0
 /** @generated */
 protected boolean canReorientSource() {
   if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
     return false;
   }
   if (getLink().getOwnedElements().size() != 1) {
     return false;
   }
   Element target = (Element) getLink().getOwnedElements().get(0);
   if (!(getLink().eContainer() instanceof Interaction)) {
     return false;
   }
   Interaction container = (Interaction) getLink().eContainer();
   return UMLBaseItemSemanticEditPolicy.getLinkConstraints()
       .canExistMessage_8009(container, getLink(), getNewSource(), target);
 }