public void updateVisibility(DirDiffSettings settings) {
    if (getChildren().isEmpty()) {
     if (myType == ERROR) {
        myVisible = true;
       return;
      }
      if (myType != DiffType.SEPARATOR && !"".equals(settings.getFilter())) {
        if (!settings.getDirDiffFilter().pathMatches(myRelativePath)) {
          myVisible = false;
          return;
        }
      }
      if (myType == null) {
        myVisible = true;
      } else {
        myVisible = switch (myType) {
          case SOURCE -> settings.showNewOnSource;
          case TARGET -> settings.showNewOnTarget;
          case SEPARATOR, ERROR -> true;
          case CHANGED -> settings.showDifferent;
          case EQUAL -> settings.showEqual;
        };
      }
    } else {
      myVisible = false;
      for (DTree child : myChildren.values()) {
        child.updateVisibility(settings);
        myVisible = myVisible || child.isVisible();
      }
    }
  }
public void updateVisibility(DirDiffSettings settings)