WatchedRootsProvider needs access to VirtualDirectoryImpl, which is internal now

The JavaDoc of class WatchedRootsProvider says

The indicator that all children are loaded is that com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl#allChildrenLoaded()} returns true

But with 2025.3 VirtualDirectoryImpl is @Internal now, which make it impossible to check the status of the required contract.

Is the JavaDoc or the internal status wrong?

VirtualDirectoryImpl does not look like API indeed, but also WatchedRootsProvider seems not right in requiring its use

This is indeed a clash – we’ll look into that.

On a first sight it seems to me javadoc is overspecified – i.e. it shouldn’t mention private VirtualDirectoryImplat all. It is enough to mention .getChildren() which is a public method of a VirtualFile

If you’re in a hurry: use VirtualFile.getChildren()to ensure children are loaded.
I’ll try to solve this conflict in a few days.

Thank you both for the replies!

I‘ll just call getChildren for now and hope that it‘s not causing too much unnecessary work for the VFS (same code for 2024.1+ in the plugin, atm).