public @NotNull Set<TreePath> getExpandedPaths() {
    if (expandImpl != null) {
      return expandImpl.getExpandedPaths();
    }
    else {
      // This is more or less dead code by design, just in case somebody decides to disable
      // the bulk operations through the registry and call this method explicitly.
      // The bulk operations themselves don't call this if they're disabled (obviously),
      // and if they're enabled, the branch above will be executed instead.
      var result = new HashSet<TreePath>();
      var rootPath = getRootPath();
      if (!isRootVisible() || isExpanded(rootPath)) {
        result.add(rootPath);
      }
      var children = getExpandedDescendants(rootPath);
      while (children.hasMoreElements()) {
        var child = children.nextElement();
        result.add(child);
      }
      return result;
    }
  }
public @NotNull Set<TreePath> getExpandedPaths()