[英]How to Open and edit file outside eclipse workspace, while having the file in sync with Eclipse?
I am opening and editing a file (in my Eclipse plugin), in the filesystem by using java.io.File
. 我正在使用
java.io.File
在文件系统中打开和编辑文件(在Eclipse插件中)。 But everytime i edit it, the Eclipse is out of sync with that resource ! 但是每次我编辑它时, Eclipse都与该资源不同步 ! So after my code edits it, if user tries to operate on it in the UI, Eclipse says resource out of sync!
因此,在我的代码对其进行编辑之后,如果用户尝试在UI中对其进行操作,则Eclipse表示资源不同步! I know refreshing the file in UI will work but everytime doing that will be annoying!
我知道刷新UI中的文件可以用,但是每次这样做都会很烦人!
Is there any way to open the resource in such a way that eclipse is in sync with the file? 有什么方法可以使Eclipse与文件同步打开资源吗?
refreshLocal API is not useful for me!! refreshLocal API对我没有用!
尝试Preferences > General > Workspace
然后选择“ Refresh using native hooks or polling
复选框。
The Filesync plugin worked fine for me. Filesync插件对我来说很好用。 It is configurable .
它是可配置的 。 No manual refreshing needed.
无需手动刷新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.