write virtual files in a write action
authorpeter <peter@jetbrains.com>
Fri, 6 Feb 2015 11:18:43 +0000 (12:18 +0100)
committerpeter <peter@jetbrains.com>
Fri, 6 Feb 2015 11:23:39 +0000 (12:23 +0100)
platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java

index bf91a747b94888d39ff7747c6c0754496f9f8277..09f8fd7886a13e2c72fea70f6d6b14233af67771 100644 (file)
@@ -623,6 +623,8 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
         if (closed) return;
         super.close();
 
+        ApplicationManager.getApplication().assertWriteAccessAllowed();
+
         VFileContentChangeEvent event = new VFileContentChangeEvent(requestor, file, file.getModificationStamp(), modStamp, false);
         List<VFileContentChangeEvent> events = Collections.singletonList(event);
         BulkFileListener publisher = myEventBus.syncPublisher(VirtualFileManager.VFS_CHANGES);