tool window plugin: IDEA Doesn't see changes that was made
Answered
I am currently facing an issue with JetBrains IntelliJ IDEA, where it does not seem to detect changes my plugin make in real-time. Specifically, when plugin switch between branches (using jgit) or make edits, IntelliJ IDEA does not reflect these changes immediately unless I switch to another window and then return to IntelliJ IDEA.
Could you please provide guidance on how to manually refresh IntelliJ IDEA to ensure it recognizes such changes promptly?
Please sign in to leave a comment.
Hi Roman,
Please clarify the issue. What APIs do you use? What are implementations?
It sounds most likely that Virtual File System is not refreshed after your changes, but it's hard to help without details.
If it is about VFS, take a look at https://plugins.jetbrains.com/docs/intellij/virtual-file-system.html.
Hi Karol,
My plugin uses org.eclipse.jgit to change branches inside an open project, but IDEA doesn't see that this branch has been changed. I think you are sure about VFS, but how can I send a project update message after checkout to another branch?
I don't know jgit library, but I would try invoking VFS refresh after you switch branches with jgit. Information about how to refresh VFS is on the page I linked.
Thanks!
I found solution for me - refreshing after switch helps (but .git should be refreshed additionally).
Example code with fix: