Updating File Status from External Commands
I have a Custom VCS plugin which updates files using a 3rd party API. This API can update any number of files externally.
What is the correct method of informing the editor that these files have changes? I have come across some cases where the file structure is updated, but not the files being displayed in the editor.
Thanks!
Steve
请先登录再写评论。
Hello Steven,
VirtualFile.refresh() ensures that the file contents/attributes are synchronized.
VcsDirtyScopeManager.getInstance().markFileAsDirty() allows to refresh the
VCS status of a file (unchanged/added/modified etc.)
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Perfect! Thanks!