From fac26d1c7e103461e0a1db5a6ac9e2bed8aa10fa Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 17 May 2015 09:34:20 +0200 Subject: [PATCH] update VirtualFileSystem.refreshAndFindFileByPath javadoc --- .../src/com/intellij/openapi/vfs/VirtualFileSystem.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileSystem.java b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileSystem.java index 1cd16c1f7fc0..862c44006476 100644 --- a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileSystem.java +++ b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileSystem.java @@ -89,8 +89,9 @@ public abstract class VirtualFileSystem { * This method is useful when the file was created externally and you need to find {@link VirtualFile} * corresponding to it.

*

- * This method should be only called within write-action. - * See {@link Application#runWriteAction}. + * If this method is invoked not from Swing event dispatch thread, then it must not happen inside a read action. The reason is that + * then the method call won't return until proper VFS events are fired, which happens on Swing thread and in write action. So invoking + * this method in a read action would result in a deadlock. * * @param path the path * @return {@link VirtualFile} if the file was found, null otherwise