コード例 #1
0
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Component Result Set.dispose call: ";
    ComponentVisibility_c testR8008Inst = ComponentVisibility_c.getOnePE_CVSOnR8008(this, false);

    if (testR8008Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "8008 ";
    }
    Component_c testR8007Inst = Component_c.getOneC_COnR8007(this, false);

    if (testR8007Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "8007 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Component Result Set", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
コード例 #2
0
  // 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