コード例 #1
0
  public void relateAcrossR805To(Variable_c target, boolean notifyChanges) {
    if (target == null) return;

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

    if (ReferencesVariable != target) {

      Object oldKey = getInstanceKey();

      if (ReferencesVariable != null) {

        ReferencesVariable.clearBackPointerR805To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "TransientValueReference_c.relateAcrossR805To(Variable_c target)",
              "Relate performed across R805 from Transient Value Reference to Variable without unrelate of prior instance.");
        }
      }

      ReferencesVariable = target;
      m_var_id = target.getVar_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR805To(this);
      target.addRef();
    }
  }
コード例 #2
0
  public void unrelateAcrossR805From(Variable_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (ReferencesVariable != null) {

      m_var_id = ReferencesVariable.getVar_id();
      ReferencesVariable = null;
      target.removeRef();
    }
  }
コード例 #3
0
 public boolean evaluate(Object candidate) {
   Variable_c selected = (Variable_c) candidate;
   boolean retval = false;
   retval = (selected.getVar_id().equals(m_p37428));
   return retval;
 }
コード例 #4
0
 public java.util.UUID getVar_id() {
   if (ReferencesVariable != null) {
     return ReferencesVariable.getVar_id();
   }
   return IdAssigner.NULL_UUID;
 }