/**
   * Move bendpoints after the resize operation took place
   *
   * @param context
   */
  @Deprecated
  protected void moveAllBendpoints(IResizeShapeContext context) {

    Shape shape = context.getShape();

    IRectangle postResizeBounds = LayoutUtil.getAbsoluteBounds(shape);

    if (postResizeBounds.getX() == preResizeBounds.getX()
        && postResizeBounds.getY() == preResizeBounds.getY()) {

      // no resize from top left
      // no need to adjust bendpoints
      return;
    }

    int deltaX = (postResizeBounds.getX() - preResizeBounds.getX());
    int deltaY = (postResizeBounds.getY() - preResizeBounds.getY());

    Set<Connection> connectionsToMove = new HashSet<Connection>();

    // move connections contained in the resized shape
    connectionsToMove.addAll(calculateContainerConnections(context));

    for (Connection connection : connectionsToMove) {

      if (connection instanceof FreeFormConnection) {
        Layouter.layoutConnectionAfterShapeMove(connection, getFeatureProvider());
        moveConnectionBendpoints((FreeFormConnection) connection, deltaX, deltaY);
      }
    }
  }
  protected void internalLayout(Shape shape) {
    DiagramElement diagramElement =
        BusinessObjectUtil.getFirstElementOfType(shape, DiagramElement.class);

    if (diagramElement instanceof BPMNShape || diagramElement instanceof BPMNEdge) {
      Layouter.layoutShapeAfterResize(shape, getFeatureProvider());
    }
  }