docs: public static boolean addSeparatorIfNeeded(JPopupMenu popupMenu) {
          final int menuComponentCount = popupMenu.getComponentCount();
          if (menuComponentCount == 0) {
              return false;
          }
          final Component lastMenuComponent = popupMenu.getComponent(menuComponentCount - 1);
          if (isPopupMenuSeparator(lastMenuComponent)) {
              return false;
          }
          popupMenu.addSeparator();
          return true;
      }