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);
  }
  // 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
  // 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
  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
  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
Ejemplo n.º 6
0
  // 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
Ejemplo n.º 7
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 boolean performFinish() {
    TransactionUtil.TransactionGroup transactionGroup = null;
    ModelRoot modelRoot = v_syncMessage.getModelRoot();
    try {
      transactionGroup =
          TransactionUtil.startTransactionsOnSelectedModelRoots(
              "Interface Operation Formalize"); //$NON-NLS-1$
      Message_c v_message = Message_c.getOneMSG_MOnR1018(v_syncMessage);

      InteractionParticipant_c v_participant =
          InteractionParticipant_c.getOneSQ_POnR1007(v_message);

      ComponentParticipant_c v_cop = ComponentParticipant_c.getOneSQ_COPOnR930(v_participant);

      if (((v_cop == null))) {

        v_cop =
            ComponentParticipant_c.getOneSQ_COPOnR930(
                InteractionParticipant_c.getOneSQ_POnR940(
                    Lifespan_c.getOneSQ_LSOnR930(v_participant)));
      }

      Component_c v_component =
          (Component_c)
              modelRoot.getInstanceList(Component_c.class).getGlobal(null, Gd_c.Null_unique_id());

      if (((v_cop != null))) {

        v_component = Component_c.getOneC_COnR955(v_cop);
      }

      if (((v_component != null))) {

        if (((v_Operation != null))) {

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

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      if (transactionGroup != null) TransactionUtil.cancelTransactions(transactionGroup, e);
      CorePlugin.logError("Transaction: Interface Operation Formalize failed", e); // $NON-NLS-1$
      // return true so that the wizard will
      // close
      return true;
    }
    if (transactionGroup != null) TransactionUtil.endTransactions(transactionGroup);
    if (m_viewer != null) {
      if (m_viewer instanceof StructuredViewer) {
        ((StructuredViewer) m_viewer).refresh(v_syncMessage);
      } else {
        m_viewer.refresh();
      }
    }
    return true;
  }
  public boolean performFinish() {
    TransactionUtil.TransactionGroup transactionGroup = null;
    ModelRoot modelRoot = v_asyncMessage.getModelRoot();
    try {
      transactionGroup =
          TransactionUtil.startTransactionsOnSelectedModelRoots(
              "Instance Event Formalize"); //$NON-NLS-1$
      Message_c v_message = Message_c.getOneMSG_MOnR1018(v_asyncMessage);

      InteractionParticipant_c v_participant =
          InteractionParticipant_c.getOneSQ_POnR1007(v_message);

      Lifespan_c v_ls = Lifespan_c.getOneSQ_LSOnR930(v_participant);

      ClassInstanceParticipant_c v_cip =
          ClassInstanceParticipant_c.getOneSQ_CIPOnR930(
              InteractionParticipant_c.getOneSQ_POnR940(v_ls));

      ModelClass_c v_cipclass =
          (ModelClass_c)
              modelRoot.getInstanceList(ModelClass_c.class).getGlobal(null, Gd_c.Null_unique_id());

      if (((v_cip != null))) {

        v_cipclass = ModelClass_c.getOneO_OBJOnR934(v_cip);

      } else {

        v_cip =
            ClassInstanceParticipant_c.getOneSQ_CIPOnR930(
                InteractionParticipant_c.getOneSQ_POnR1007(v_message));

        if (((v_cip != null))) {

          Communication_c v_communication =
              Communication_c.getOneCOMM_COMMOnR1126(
                  ParticipantInCommunication_c.getOneCOMM_PICOnR1126(
                      InteractionParticipant_c.getOneSQ_POnR930(v_cip)));

          if (((v_communication != null))) {

            v_cipclass = ModelClass_c.getOneO_OBJOnR934(v_cip);
          }
        }
      }

      if (((v_cipclass != null))) {

        StateMachineEvent_c v_evt =
            StateMachineEvent_c.getOneSM_EVTOnR1009(
                EventMessage_c.getOneMSG_EOnR1019(v_asyncMessage));

        java.util.UUID v_existingId = Gd_c.Null_unique_id();

        if (((v_evt != null))) {

          v_existingId = v_evt.getSmevt_id();
        }

        StateMachine_c v_stateMachine =
            StateMachine_c.getOneSM_SMOnR517(InstanceStateMachine_c.getOneSM_ISMOnR518(v_cipclass));

        StateMachine_c[] v_machines =
            StateMachine_c.getManySM_SMsOnR517(
                InstanceStateMachine_c.getManySM_ISMsOnR518(
                    ModelClass_c.getManyO_OBJsOnR8001(
                        PackageableElement_c.getManyPE_PEsOnR8000(
                            Package_c.getManyEP_PKGsOnR1405(
                                SystemModel_c.getManyS_SYSsOnR1405(
                                    Package_c.getManyEP_PKGsOnR8000(
                                        PackageableElement_c.getManyPE_PEsOnR8001(
                                            v_cipclass))))))));

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

          v_machines =
              StateMachine_c.getManySM_SMsOnR517(
                  InstanceStateMachine_c.getManySM_ISMsOnR518(
                      ModelClass_c.getManyO_OBJsOnR2(
                          Subsystem_c.getManyS_SSsOnR1(
                              Domain_c.getManyS_DOMsOnR1(
                                  Subsystem_c.getManyS_SSsOnR2(v_cipclass))))));
        }

        if (((v_Message != null))) {

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

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      if (transactionGroup != null) TransactionUtil.cancelTransactions(transactionGroup, e);
      CorePlugin.logError("Transaction: Instance Event Formalize failed", e); // $NON-NLS-1$
      // return true so that the wizard will
      // close
      return true;
    }
    if (transactionGroup != null) TransactionUtil.endTransactions(transactionGroup);
    if (m_viewer != null) {
      if (m_viewer instanceof StructuredViewer) {
        ((StructuredViewer) m_viewer).refresh(v_asyncMessage);
      } else {
        m_viewer.refresh();
      }
    }
    return true;
  }
  public void Createparticipant(
      final String p_Classname,
      final Object p_Elementid,
      final String p_Modelrootid,
      final String p_Searchablevalue) {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Description Query",
        " Operation entered: DescriptionQuery::Createparticipant");
    final ModelRoot modelRoot = getModelRoot();
    SearchParticipant_c v_participant = new SearchParticipant_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_participant));

    SearchableElement_c v_searchable = new SearchableElement_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_searchable));

    DescriptionSearchable_c v_descriptionParticipant = new DescriptionSearchable_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_descriptionParticipant));

    if (v_searchable != null) {
      v_searchable.relateAcrossR9700To(v_participant);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setModelrootid(p_Modelrootid);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setElementid(p_Elementid);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setClassname(p_Classname);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_descriptionParticipant != null) {
      v_descriptionParticipant.setSearchablevalue(p_Searchablevalue);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_descriptionParticipant != null) {
      v_descriptionParticipant.relateAcrossR9702To(v_searchable);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }

    SearchEngine_c v_engine = SearchEngine_c.getOneSEN_EOnR9500(Query_c.getOneSQU_QOnR9600(this));

    if (v_engine != null) {
      v_engine.relateAcrossR9502To(v_participant);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }
  } // End createParticipant
  private void CNST_CSP_NewConstant(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();
    ConstantSpecification_c v_csp = (ConstantSpecification_c) context;
    PersistableModelComponent.ensureCoreDataTypesAvailable(v_csp.getModelRoot());

    TransactionUtil.TransactionGroup transactionGroup =
        TransactionUtil.startTransactionsOnSelectedModelRoots("New Constant");
    boolean abortTransaction = false;
    try {
      // Ensure that actions take place between Verifier Activity executions
      Ooaofooa.beginSaveOperation();
      if (v_csp != null) {
        v_csp.Newliteralsymbolicconstant();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }

      NonRootModelElement[] children =
          LiteralSymbolicConstant_c.getManyCNST_LSCsOnR1503(
              LeafSymbolicConstant_c.getManyCNST_LFSCsOnR1502(
                  SymbolicConstant_c.getManyCNST_SYCsOnR1504(v_csp)));

      NonRootModelElement newElement = children[children.length - 1];
      IPreferenceStore store = CorePlugin.getDefault().getPreferenceStore();
      boolean option = store.getBoolean(BridgePointPreferencesStore.USE_DEFAULT_NAME_FOR_CREATION);
      if (!option) {
        String oldName = RenameActionUtil.getElementName(newElement);
        boolean performRename =
            UIUtil.inputDialog(
                null,
                "Element Creation",
                "Enter the name:",
                oldName,
                UIUtil.newRenameValidator(newElement));
        if (performRename) {
          String proposedName = UIUtil.inputDialogResult;
          RenameActionUtil.setElementName(newElement, proposedName);
          newElement.setComponent(null);
        } else {
          abortTransaction = true;
        }
      }
      // 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 Constant failed", e); // $NON-NLS-1$
    }
    if ((!CorePlugin.getDefault()
            .getPreferenceStore()
            .getBoolean(BridgePointPreferencesStore.USE_DEFAULT_NAME_FOR_CREATION))
        && abortTransaction) {
      TransactionUtil.cancelTransactions(transactionGroup);
    } else {
      TransactionUtil.endTransactions(transactionGroup);
    }
  }