1
我正在运行一些脚本命令,它在我的项目下生成文件,当我的命令终止时如何刷新/重新加载文件树?IntelliJ插件,将虚拟文件同步到真实文件
我已经看到了这Synchronize virtual file to the physical file in the Intellij IDEA plugin
我试图用这个,但没有运气:
FileDocumentManager.getInstance().saveAllDocuments();
或
VirtualFileManager.getInstance().syncRefresh();
或THES甚至
currentProject.getBaseDir().refresh(false, true);
无e方法刷新项目树。
最后两个API都是刷新IntelliJ IDEA VFS的正确方法。如果他们没有带来预期的结果,最可能的原因是你在错误的时刻给他们打电话(可能在你的脚本实际完成之前)。 – yole 2015-04-08 18:29:13