private static void updateAncestorsUi(boolean accepted, SettingsTreeNode node) {
      TreeNode parent = node.getParent();
      if (parent instanceof SettingsTreeNode settingsParent) {
        settingsParent.accepted = false;
        if (!accepted) {
          //propagate disabled settings upwards
          updateAncestorsUi(false, settingsParent);
        } else {
          for (Enumeration<? extends TreeNode> children = parent.children(); children.hasMoreElements(); ) {
            TreeNode child = children.nextElement();
            if ((child instanceof SettingsTreeNode settingsTreeNode) && !settingsTreeNode.accepted) return;
          }
          settingsParent.accepted = true;
          updateAncestorsUi(true, settingsParent);
        }
      }
    }
private static void updateAncestorsUi(boolean accepted, SettingsTreeNode node)