Search in sources :

Example 1 with FileTypeEvent

use of com.intellij.openapi.fileTypes.FileTypeEvent in project intellij-community by JetBrains.

the class DirectoryIndexImpl method subscribeToFileChanges.

protected void subscribeToFileChanges() {
    myConnection.subscribe(FileTypeManager.TOPIC, new FileTypeListener() {

        @Override
        public void fileTypesChanged(@NotNull FileTypeEvent event) {
            myRootIndex = null;
        }
    });
    myConnection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootListener() {

        @Override
        public void rootsChanged(ModuleRootEvent event) {
            myRootIndex = null;
        }
    });
    myConnection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener() {

        @Override
        public void after(@NotNull List<? extends VFileEvent> events) {
            RootIndex rootIndex = myRootIndex;
            if (rootIndex != null && rootIndex.resetOnEvents(events)) {
                myRootIndex = null;
            }
        }
    });
}
Also used : FileTypeListener(com.intellij.openapi.fileTypes.FileTypeListener) ModuleRootEvent(com.intellij.openapi.roots.ModuleRootEvent) BulkFileListener(com.intellij.openapi.vfs.newvfs.BulkFileListener) FileTypeEvent(com.intellij.openapi.fileTypes.FileTypeEvent) ModuleRootListener(com.intellij.openapi.roots.ModuleRootListener)

Aggregations

FileTypeEvent (com.intellij.openapi.fileTypes.FileTypeEvent)1 FileTypeListener (com.intellij.openapi.fileTypes.FileTypeListener)1 ModuleRootEvent (com.intellij.openapi.roots.ModuleRootEvent)1 ModuleRootListener (com.intellij.openapi.roots.ModuleRootListener)1 BulkFileListener (com.intellij.openapi.vfs.newvfs.BulkFileListener)1