Пример #1
0
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the GraphNode.dispose call: ";
    Graphelement_c testR301Inst1 = Graphelement_c.getOneDIM_GEOnR301(this, false);

    if (testR301Inst1 != null) {
      delete_error = true;
      errorMsg = errorMsg + "301 ";
    }
    Shape_c testR19Inst1 = Shape_c.getOneGD_SHPOnR19(this, false);

    if (testR19Inst1 != null) {
      delete_error = true;
      errorMsg = errorMsg + "19 ";
    }
    FloatingText_c testR19Inst2 = FloatingText_c.getOneGD_CTXTOnR19(this, false);

    if (testR19Inst2 != null) {
      delete_error = true;
      errorMsg = errorMsg + "19 ";
    }
    if (delete_error == true) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(ILogger.DELETE, "GraphNode", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CanvasPlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
Пример #2
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