public static void clearCaches(@NotNull TreeElement tree) {
    tree.acceptTree(new RecursiveTreeElementWalkingVisitor(false) {
      @Override
      protected void visitNode(TreeElement element) {
        element.clearCaches();
        super.visitNode(element);
      }
    });
  }
public static void clearCaches(@NotNull TreeElement tree)