public static void closeContentTab(@NotNull ContentManager contentManager, @NotNull Content content) {
    if (content instanceof TabbedContent tabbedContent) {
      if (tabbedContent.hasMultipleTabs()) {
        JComponent component = tabbedContent.getComponent();
        tabbedContent.removeContent(component);
        contentManager.setSelectedContent(tabbedContent, true, true);
        return;
      }
    }
    contentManager.removeContent(content, true);
  }
public static void closeContentTab(@NotNull ContentManager contentManager, @NotNull Content content)