private boolean expandParentPaths(@NotNull TreePath path) {
      Deque<TreePath> stack = null;
      TreePath parentPath = path.getParentPath();
      while (parentPath != null) {
        if (isExpanded(parentPath)) {
          parentPath = null;
        }
        else {
          if (stack == null) {
            stack = new ArrayDeque<>();
          }
          stack.push(parentPath);
          parentPath = parentPath.getParentPath();
        }
      }
      while (stack != null && !stack.isEmpty()) {
        parentPath = stack.pop();
        if (!isExpanded(parentPath)) {
          try {
            fireTreeWillExpand(parentPath);
          } catch (ExpandVetoException eve) {
            return false;
          }
          markPathExpanded(parentPath);
          fireTreeExpanded(parentPath);
          if (accessibleContext != null) {
            ((AccessibleJTree)accessibleContext).fireVisibleDataPropertyChange();
          }
        }
      }
      return true;
    }
private boolean expandParentPaths(@NotNull TreePath path)