public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Bridge Invocation.dispose call: ";
    ActualParameter_c testR628Inst = ActualParameter_c.getOneV_PAROnR628(this, false);

    if (testR628Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "628 ";
    }
    Statement_c testR603Inst7 = Statement_c.getOneACT_SMTOnR603(this, false);

    if (testR603Inst7 != null) {
      delete_error = true;
      errorMsg = errorMsg + "603 ";
    }
    Bridge_c testR674Inst = Bridge_c.getOneS_BRGOnR674(this, false);

    if (testR674Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "674 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Bridge Invocation", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Instance State Machine.dispose call: ";
    ModelClass_c testR518Inst = ModelClass_c.getOneO_OBJOnR518(this, false);

    if (testR518Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "518 ";
    }
    StateMachine_c testR517Inst1 = StateMachine_c.getOneSM_SMOnR517(this, false);

    if (testR517Inst1 != null) {
      delete_error = true;
      errorMsg = errorMsg + "517 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Instance State Machine", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Component in Component.dispose call: ";
    Component_c testR4202Inst = Component_c.getOneC_COnR4202(this, false);

    if (testR4202Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "4202 ";
    }
    Component_c testR4203Inst = Component_c.getOneC_COnR4203(this, false);

    if (testR4203Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "4203 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Component in Component", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  private void COMM_COMM_NewClassParticipant(IStructuredSelection selection) {
    // Assign the context selection variables with the action context
    // Assign the context selection variable with the action context
    Object context = selection.iterator().next();
    Communication_c v_comm = (Communication_c) context;
    PersistableModelComponent.ensureCoreDataTypesAvailable(v_comm.getModelRoot());

    TransactionUtil.TransactionGroup transactionGroup =
        TransactionUtil.startTransactionsOnSelectedModelRoots("New Class Participant");
    try {
      // Ensure that actions take place between Verifier Activity executions
      Ooaofooa.beginSaveOperation();
      if (((v_comm != null))) {

        if (v_comm != null) {
          v_comm.Newclassparticipant();
        } else {
          Throwable t = new Throwable();
          t.fillInStackTrace();
          CorePlugin.logError("Attempted to call an operation on a null instance.", t);
        }
      }

      // end critical section
      Ooaofooa.endSaveOperation();
      // catch all exceptions and cancel the transactions
    } catch (Exception e) {
      Ooaofooa.endSaveOperation();
      TransactionUtil.cancelTransactions(transactionGroup, e);
      CorePlugin.logError("Transaction: New Class Participant failed", e); // $NON-NLS-1$
    }
    TransactionUtil.endTransactions(transactionGroup);
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Transient Value Reference.dispose call: ";
    Variable_c testR805Inst = Variable_c.getOneV_VAROnR805(this, false);

    if (testR805Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "805 ";
    }
    Value_c testR801Inst13 = Value_c.getOneV_VALOnR801(this, false);

    if (testR801Inst13 != null) {
      delete_error = true;
      errorMsg = errorMsg + "801 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Transient Value Reference", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Assign to Member.dispose call: ";
    Value_c testR609Inst = Value_c.getOneV_VALOnR609(this, false);

    if (testR609Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "609 ";
    }
    Value_c testR689Inst = Value_c.getOneV_VALOnR689(this, false);

    if (testR689Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "689 ";
    }
    Statement_c testR603Inst11 = Statement_c.getOneACT_SMTOnR603(this, false);

    if (testR603Inst11 != null) {
      delete_error = true;
      errorMsg = errorMsg + "603 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Assign to Member", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Data Type in Package.dispose call: ";
    DataType_c testR39Inst = DataType_c.getOneS_DTOnR39(this, false);

    if (testR39Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "39 ";
    }

    DataTypePackage_c testR39InstOth = DataTypePackage_c.getOneS_DPKOnR39(this, false);

    if (testR39InstOth != null) {
      delete_error = true;
      errorMsg = errorMsg + "39 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Data Type in Package", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
示例#8
0
  // declare transform functions
  public void Dispose() {
    Ooaofgraphics.log.println(
        ILogger.OPERATION, "GraphNode", " Operation entered: Graphnode::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Graphelement_c v_element = Graphelement_c.getOneDIM_GEOnR301(this);

    if (((v_element != null))) {

      if (v_element != null) {
        v_element.Dispose();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }

    } else {

      Shape_c v_shape = Shape_c.getOneGD_SHPOnR19(this);

      if (((v_shape != null))) {

        this.unrelateAcrossR19From(v_shape);

        if (v_shape != null) {
          v_shape.Dispose();
        } else {
          Throwable t = new Throwable();
          t.fillInStackTrace();
          CorePlugin.logError("Attempted to call an operation on a null instance.", t);
        }
      }

      FloatingText_c v_ctxt = FloatingText_c.getOneGD_CTXTOnR19(this);

      if (((v_ctxt != null))) {

        this.unrelateAcrossR19From(v_ctxt);

        if (v_ctxt != null) {
          v_ctxt.Dispose();
        } else {
          Throwable t = new Throwable();
          t.fillInStackTrace();
          CorePlugin.logError("Attempted to call an operation on a null instance.", t);
        }
      }

      if (delete()) {
        Ooaofgraphics.getDefaultInstance()
            .fireModelElementDeleted(
                new BaseModelDelta(Modeleventnotification_c.DELTA_DELETE, this));
      }
    }
  } // End dispose
 // public for unit test
 public WizardDialog MSG_SM_CommunicationClassOperationFormalize(IStructuredSelection selection) {
   CommunicationClassOperationFormalizeOnMSG_SMWizard wizard =
       new CommunicationClassOperationFormalizeOnMSG_SMWizard();
   wizard.init(CorePlugin.getDefault().getWorkbench(), selection, null);
   // Instantiates the wizard container with the wizard and opens it
   WizardDialog dialog = new WizardDialog(m_part.getSite().getShell(), wizard);
   dialog.create();
   ImageDescriptor descr = CorePlugin.getImageDescriptor("green-bp.gif");
   dialog.getShell().setImage(descr.createImage());
   return dialog;
 }
 // public for unit test
 public WizardDialog SQ_CP_SpecializedPackageClassFormalize(IStructuredSelection selection) {
   SpecializedPackageClassFormalizeOnSQ_CPWizard wizard =
       new SpecializedPackageClassFormalizeOnSQ_CPWizard();
   wizard.init(CorePlugin.getDefault().getWorkbench(), selection, null);
   // Instantiates the wizard container with the wizard and opens it
   WizardDialog dialog = new WizardDialog(m_part.getSite().getShell(), wizard);
   dialog.create();
   ImageDescriptor descr = CorePlugin.getImageDescriptor("green-bp.gif");
   dialog.getShell().setImage(descr.createImage());
   return dialog;
 }
  // declare transform functions
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Component Result Set",
        " Operation entered: ComponentResultSet::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Component_c v_component = Component_c.getOneC_COnR8007(this);

    ComponentVisibility_c[] v_elemVis = ComponentVisibility_c.getManyPE_CVSsOnR8008(this);

    ComponentVisibility_c v_elemV = null;
    for (int i37247 = 0; i37247 < v_elemVis.length; i37247++) {
      v_elemV = v_elemVis[i37247];

      PackageableElement_c v_pe = PackageableElement_c.getOnePE_PEOnR8004(v_elemV);

      if (v_elemV != null) {
        v_elemV.unrelateAcrossR8004From(v_component);
        v_elemV.unrelateAcrossR8004From(v_pe);
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Unrelate using attempted on null link class instance.", t);
      }

      this.unrelateAcrossR8008From(v_elemV);

      if (v_elemV != null) {
        // get the location of this element in the instance list
        // before deleting
        if (v_elemV.delete()) {
          Ooaofooa.getDefaultInstance()
              .fireModelElementDeleted(
                  new BaseModelDelta(Modeleventnotification_c.DELTA_DELETE, v_elemV));
        }
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Delete attempted on null instance.", t);
      }
    }

    this.unrelateAcrossR8007From(v_component);

    if (delete()) {
      Ooaofooa.getDefaultInstance()
          .fireModelElementDeleted(new BaseModelDelta(Modeleventnotification_c.DELTA_DELETE, this));
    }
  } // End dispose
  // declare transform functions
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION, "Bridge Invocation", " Operation entered: BridgeInvocation::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Bridge_c v_brg = Bridge_c.getOneS_BRGOnR674(this);

    if ((!(v_brg == null))) {

      this.unrelateAcrossR674From(v_brg);
    }

    ActualParameter_c[] v_parm_set = ActualParameter_c.getManyV_PARsOnR628(this);

    ActualParameter_c v_parm = null;
    for (int i37268 = 0; i37268 < v_parm_set.length; i37268++) {
      v_parm = v_parm_set[i37268];

      this.unrelateAcrossR628From(v_parm);

      if (v_parm != null) {
        v_parm.Dispose();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }
    }

    delete();
  } // End dispose
示例#13
0
  public void unrelateAcrossR39From(DataType_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (ContainsDataType != null) {

      m_dt_id = ContainsDataType.getDt_id();
      if (IdAssigner.NULL_UUID.equals(m_dt_id)) {
        m_dt_id = ContainsDataType.getDt_idCachedValue();
      }
      ContainsDataType = null;
      target.removeRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "39", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
  public static InstanceStateMachine_c getOneSM_ISMOnR518(
      ModelRoot modelRoot, ModelClass_c target, ClassQueryInterface_c test, boolean loadComponent) {
    InstanceStateMachine_c result = null;

    result = find_getOneSM_ISMOnR518(modelRoot, target, test);
    if (result == null && (loadComponent)) {
      // Containment Relation
      List comps =
          PersistenceManager.findAllChildComponents(
              target.getPersistableComponent(), modelRoot, InstanceStateMachine_c.class);
      for (int i = 0; i < comps.size(); i++) {
        PersistableModelComponent component = (PersistableModelComponent) comps.get(i);
        if (!component.isLoaded()) {
          try {
            component.load(new NullProgressMonitor());
            result = find_getOneSM_ISMOnR518(modelRoot, target, test);
            if (result != null) return result;
          } catch (Exception e) {
            CorePlugin.logError("Error Loading component", e);
          }
        }
      }
    }

    return result;
  }
  public void unrelateAcrossR518From(ModelClass_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (ModelClass != null) {

      m_obj_id = ModelClass.getObj_id();
      if (IdAssigner.NULL_UUID.equals(m_obj_id)) {
        m_obj_id = ModelClass.getObj_idCachedValue();
      }
      ModelClass = null;
      target.removeRef();
      UmlProblem.removeXtUMLProblem(this, target);
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "518", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
示例#16
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);
      }
    }
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Description Query.dispose call: ";
    Query_c testR9600Inst3 = Query_c.getOneSQU_QOnR9600(this, false);

    if (testR9600Inst3 != null) {
      delete_error = true;
      errorMsg = errorMsg + "9600 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Description Query", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
示例#18
0
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Informal Argument.dispose call: ";
    MessageArgument_c testR1013Inst5 = MessageArgument_c.getOneMSG_AOnR1013(this, false);

    if (testR1013Inst5 != null) {
      delete_error = true;
      errorMsg = errorMsg + "1013 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Informal Argument", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  // declare transform functions
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION, "Assign to Member", " Operation entered: AssignToMember::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Value_c v_value = Value_c.getOneV_VALOnR609(this);

    if (((v_value != null))) {

      this.unrelateAcrossR609From(v_value);

      if (v_value != null) {
        v_value.Dispose();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }
    }

    v_value = Value_c.getOneV_VALOnR689(this);

    if (((v_value != null))) {

      this.unrelateAcrossR689From(v_value);

      if (v_value != null) {
        v_value.Dispose();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }
    }

    delete();
  } // End dispose
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Instance State Machine",
        " Operation entered: InstanceStateMachine::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    StateMachine_c v_sm = StateMachine_c.getOneSM_SMOnR517(this);

    if (v_sm != null) {
      v_sm.Dispose();
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attempted to call an operation on a null instance.", t);
    }
  } // End dispose
  public void Pastestatemachineevent(final java.util.UUID p_Id) {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Instance State Machine",
        " Operation entered: InstanceStateMachine::Pastestatemachineevent");
    final ModelRoot modelRoot = getModelRoot();
    StateMachine_c v_sm = StateMachine_c.getOneSM_SMOnR517(this);

    if (v_sm != null) {
      v_sm.Pastestatemachineevent(p_Id);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attempted to call an operation on a null instance.", t);
    }
  } // End pasteStateMachineEvent
  /* (non-Javadoc)
   * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
   */
  public void setPropertyValue(Object id, Object value) {
    boolean value_changed = false;
    String trans_name = "";
    Transaction tr = null;
    Ooaofooa modelRoot = (Ooaofooa) m_inst.getModelRoot();
    TransactionManager tm = TransactionManager.getSingleton();
    try {
      if (id.equals("Descrip")) {
        if (!value.toString().equals(m_inst.getDescrip())) {
          trans_name = "Change in property: 'Descrip' of Fork Join Node"; // $NON-NLS-1$
          tr = tm.startTransaction(trans_name, Ooaofooa.getDefaultInstance());
          value_changed = true;
          m_inst.setDescrip(value.toString());
        }
      } else if (id.equals("GuardCondition")) {
        if (!value.toString().equals(m_inst.getGuardcondition())) {
          trans_name = "Change in property: 'GuardCondition' of Fork Join Node"; // $NON-NLS-1$
          tr = tm.startTransaction(trans_name, Ooaofooa.getDefaultInstance());
          value_changed = true;
          m_inst.setGuardcondition(value.toString());
        }
      }

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      // this can be null if there was
      // an exception starting the
      // transaction
      if (tr != null) {
        tm.cancelTransaction(tr, e);
        tr = null;
      }
      CorePlugin.logError("Transaction: " + trans_name + " could not complete", e);
    }
    if (tr != null) {
      if (value_changed) tm.endTransaction(tr);
      else tm.cancelTransaction(tr);
    }
  }
示例#23
0
 public static InformalArgument_c InformalArgumentInstance(
     ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) {
   InformalArgument_c result = findInformalArgumentInstance(modelRoot, test, loadComponent);
   if (result == null && loadComponent) {
     List pmcs = PersistenceManager.findAllComponents(modelRoot, InformalArgument_c.class);
     for (int i = 0; i < pmcs.size(); i++) {
       PersistableModelComponent component = (PersistableModelComponent) pmcs.get(i);
       if (!component.isLoaded()) {
         try {
           component.load(new NullProgressMonitor());
           result = findInformalArgumentInstance(modelRoot, test, loadComponent);
           if (result != null) return result;
         } catch (Exception e) {
           CorePlugin.logError("Error Loading component", e);
         }
       }
     }
   }
   if (result != null && loadComponent) {
     result.loadProxy();
   }
   return result;
 }
  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();
    }
  }
  public void unrelateAcrossR674From(Bridge_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (IsAnInvocationOfBridge != null) {

      m_brg_id = IsAnInvocationOfBridge.getBrg_id();
      IsAnInvocationOfBridge = null;
      target.removeRef();
    }
  }
  public void unrelateAcrossR689From(Value_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (WritesValue != null) {

      m_l_value_id = WritesValue.getValue_id();
      WritesValue = null;
      target.removeRef();
    }
  }
  public void unrelateAcrossR603From(Statement_c target, boolean notifyChanges) {
    if (target == null) return;

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

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

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

    if (IsSupertypeStatement != null) {

      m_statement_id = IsSupertypeStatement.getStatement_id();
      IsSupertypeStatement = null;
      target.removeRef();
    }
  }
示例#28
0
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Informal Argument", //$NON-NLS-1$
        " Operation entered: Informal Argument::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class InformalArgument_c_test39587_c implements ClassQueryInterface_c {
      InformalArgument_c_test39587_c(java.util.UUID p39588) {
        m_p39588 = p39588;
      }

      private java.util.UUID m_p39588;

      public boolean evaluate(Object candidate) {
        InformalArgument_c selected = (InformalArgument_c) candidate;
        boolean retval = false;
        retval = (selected.getArg_id().equals(m_p39588));
        return retval;
      }
    }

    InformalArgument_c[] objs39586 =
        InformalArgument_c.InformalArgumentInstances(
            modelRoot, new InformalArgument_c_test39587_c(getArg_id()));

    if (((objs39586.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39586.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length),
            e);
      }
      retval = false;
    }

    if (((objs39586.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length)
                + " Arg_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length)
                + " Arg_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Informal Argument is a subtype in association: rel.Numb = 1013
    // The supertype class is: Message Argument
    class MessageArgument_c_test39592_c implements ClassQueryInterface_c {
      MessageArgument_c_test39592_c(java.util.UUID p39593) {
        m_p39593 = p39593;
      }

      private java.util.UUID m_p39593;

      public boolean evaluate(Object candidate) {
        MessageArgument_c selected = (MessageArgument_c) candidate;
        boolean retval = false;
        retval = (selected.getArg_id().equals(m_p39593));
        return retval;
      }
    }

    MessageArgument_c[] objs39591 =
        MessageArgument_c.MessageArgumentInstances(
            modelRoot, new MessageArgument_c_test39592_c(getArg_id()));

    if (((objs39591.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39591.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39591.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
示例#29
0
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Data Type in Package", //$NON-NLS-1$
        " Operation entered: Data Type in Package::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class DataTypeInPackage_c_test55160_c implements ClassQueryInterface_c {
      DataTypeInPackage_c_test55160_c(java.util.UUID p55161, java.util.UUID p55162) {
        m_p55161 = p55161;
        m_p55162 = p55162;
      }

      private java.util.UUID m_p55161;
      private java.util.UUID m_p55162;

      public boolean evaluate(Object candidate) {
        DataTypeInPackage_c selected = (DataTypeInPackage_c) candidate;
        boolean retval = false;
        retval =
            (selected.getPackage_id().equals(m_p55161)) & (selected.getDt_id().equals(m_p55162));
        return retval;
      }
    }

    DataTypeInPackage_c[] objs55159 =
        DataTypeInPackage_c.DataTypeInPackageInstances(
            modelRoot, new DataTypeInPackage_c_test55160_c(getPackage_id(), getDt_id()));

    if (((objs55159.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55159.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length),
            e);
      }
      retval = false;
    }

    if (((objs55159.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length)
                + " Package_ID: "
                + "Not Printable"
                + " DT_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length)
                + " Package_ID: "
                + "Not Printable"
                + " DT_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Data Type in Package is a link class in association: rel.Numb = 39
    // Other side
    // The other side class in the association is: Data Type Package
    class DataTypePackage_c_test55166_c implements ClassQueryInterface_c {
      DataTypePackage_c_test55166_c(java.util.UUID p55167) {
        m_p55167 = p55167;
      }

      private java.util.UUID m_p55167;

      public boolean evaluate(Object candidate) {
        DataTypePackage_c selected = (DataTypePackage_c) candidate;
        boolean retval = false;
        retval = (selected.getPackage_id().equals(m_p55167));
        return retval;
      }
    }

    DataTypePackage_c[] objs55165 =
        DataTypePackage_c.DataTypePackageInstances(
            modelRoot, new DataTypePackage_c_test55166_c(getPackage_id()));

    if (((objs55165.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Association: 39: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55165.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Association: 39: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55165.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
 /** @see IActionDelegate#selectionChanged(IAction, ISelection) */
 public void selectionChanged(IAction action, ISelection selection) {
   action.setImageDescriptor(CorePlugin.getImageDescriptorFor("ClassParticipant_c", false));
 }