Contents of JAR VirtualFile not refreshed
Hello,
For the Ceylon plugin, I ship a few archives that contain the source code for various parts of the Ceylon language. For example, references to Ceylon classes might resolve to a file in one of these archives.
This works great until the archive file is changed, and IDEA does not see the changes. For example, in my test IDE, the archive is located here:
/Users/bastien/Library/Caches/IdeaIC15/plugins-sandbox/plugins/CeylonIDEA/classes/embeddedDist/repo/ceylon/language/1.2.3/ceylon.language-1.2.3.src
If I unzip this file, I can see that the length of `pairs.ceylon` is 6732 bytes (it was modified recently), but this code returns 6712:
VirtualFileManager.getInstance()
.findFileByUrl("jar:///Users/bastien/Library/Caches/IdeaIC15/plugins-sandbox/plugins/CeylonIDEA/classes/embeddedDist/repo/ceylon/language/1.2.3/ceylon.language-1.2.3.src!/ceylon/language/pairs.ceylon")
.getLength()
The "Synchronize" buttons doesn't detect any change either, the only way I found to force IDEA to see the changes is to clear the caches and restart my test IDE. Calling `refresh(false, true)` on the VirtualFile doesn't do anything either.
What can I do to make IDEA see these changes? It's not a library, so I don't expect it to index changes automatically, but it should at least see that timestamps have been modified and that the content must be reloaded.
Please sign in to leave a comment.
I'd suggest making these archives the part of a project model (as a library or an SDK).