Нow to update the project tree when creating a file/directory?
Answered
Using
File(pathSelect).renameTo(newPath)
File(pathSelect).copyRecursively(newPath)
File(path).mkdir()
Tree in project tools not refresh.
I tried to call
VirtualFileManager.getInstance().asyncRefresh
this does not work
I started sending messageBus VFileEvent but it has @ApiStatus.Internal and I won't be able to publish the plugin.
How can I trigger an update?
Please sign in to leave a comment.
Not work!
Hi Mikhail,
Why do you use Java IO API instead of Virtual File System API?
https://plugins.jetbrains.com/docs/intellij/virtual-file-system.html
Also, what is the full context? Where do you call it?
Do I understand correctly, in order for changes to arrive quickly, you need to create/make changes through VirtualFile? and everything will be updated without additional updates after creation?
The documentation says that I can create a Java API, but nothing is said about how it will work with the tools project.
https://plugins.jetbrains.com/docs/intellij/virtual-file.html#how-do-i-create-a-virtual-file
In general, yes, but it depends on the implementation of specific subsystems. In your case, it should work out of the box.