private static boolean contains(@NotNull TreePath path, @NotNull Object object) {
      while (object != path.getLastPathComponent()) {
        path = path.getParentPath();
        if (path == null) return false;
      }
      return true;
    }
private static boolean contains(@NotNull TreePath path, @NotNull Object object)