private static RadContainer getContainerToPack(final List<? extends RadComponent> selection) {
    if (selection.size() != 1 || !(selection.get(0) instanceof RadContainer container)) {
      return null;
    }

    if (!container.getParent().isXY()) {
      return null;
    }
    return container;
  }
private static RadContainer getContainerToPack(final List<? extends RadComponent> selection)