Ejemplo n.º 1
0
  public void unrelateAcrossR1013From(MessageArgument_c target, boolean notifyChanges) {
    if (target == null) return;

    if (IsSupertypeMessageArgument == null) return; // already unrelated

    if (target != IsSupertypeMessageArgument) {
      Exception e = new Exception();
      e.fillInStackTrace();
      CorePlugin.logError("Tried to unrelate from non-related instance across R1013", e);
      return;
    }

    if (target != null) {
      target.clearBackPointerR1013To(this);
    }

    if (IsSupertypeMessageArgument != null) {

      m_arg_id = IsSupertypeMessageArgument.getArg_id();
      IsSupertypeMessageArgument = null;
      target.removeRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "1013", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Ejemplo n.º 2
0
  public void relateAcrossR1013To(MessageArgument_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsSupertypeMessageArgument) return; // already related

    if (IsSupertypeMessageArgument != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeMessageArgument != null) {

        IsSupertypeMessageArgument.clearBackPointerR1013To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "InformalArgument_c.relateAcrossR1013To(MessageArgument_c target)",
              "Relate performed across R1013 from Informal Argument to Message Argument without unrelate of prior instance.");
        }
      }

      IsSupertypeMessageArgument = target;
      m_arg_id = target.getArg_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR1013To(this);
      target.addRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "1013", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Ejemplo n.º 3
0
 public boolean evaluate(Object candidate) {
   MessageArgument_c selected = (MessageArgument_c) candidate;
   boolean retval = false;
   retval = (selected.getArg_id().equals(m_p39593));
   return retval;
 }
Ejemplo n.º 4
0
 public java.util.UUID getArg_id() {
   if (IsSupertypeMessageArgument != null) {
     return IsSupertypeMessageArgument.getArg_id();
   }
   return IdAssigner.NULL_UUID;
 }