public interface BulkFileListener
project.getMessageBus().connect(disposable).subscribe(VirtualFileManager.VFS_CHANGES, listener)
or define the listener in plugin.xml as an application (the prefered way):
<applicationListeners> <listener class="org.jetbrains...MyListener" topic="com.intellij.openapi.vfs.newvfs.BulkFileListener"/> </applicationListeners> Please note that the VFS events are project-agnostic so all listeners will be notified about events from all open projects. For filtering the events useProjectRootManager.getFileIndex()
withFileIndex.isInContent(com.intellij.openapi.vfs.VirtualFile)
. For a non-blocking alternative please seeAsyncFileListener
.
Modifier and Type | Interface and Description |
---|---|
static class |
BulkFileListener.Adapter
Deprecated.
obsolete, implement
BulkFileListener directly |
Modifier and Type | Method and Description |
---|---|
default void |
after(java.util.List<? extends VFileEvent> events) |
default void |
before(java.util.List<? extends VFileEvent> events) |
default void before(java.util.List<? extends VFileEvent> events)
default void after(java.util.List<? extends VFileEvent> events)