I'm developing a plugin that provides an action that creates multiple files according to certain rules.
To create the files, I am using Velocity templates which the plugin also provides.
Naturally, I am using
com.intellij.ide.fileTemplates.JavaCreateFromTemplateHandler#createFromTemplate to create each file.
The problem I'm having is that the use of the mentioned API leads to the creation of each file being fired off as a separate VFS event.
This creates some difficulties for another plugin of mine which listens to VFS changes.
It would be best if I could somehow group those events corresponding to the created files.
I would express it like so:
withBulkVfsChange(() -> createMyFiles())
Is there a way to achieve this? I suspect that I would need to expand the templates and create the corresponding files manually, instead of using