简体   繁体   English

Eclipse CompareEditor检测来自不同编辑器的保存

[英]Eclipse CompareEditor detect save from different editor

I have a problem with Custom Eclipse Compare editor and file editor. 我在使用Custom Eclipse Compare编辑器和文件编辑器时遇到问题。

When saving from file editor, compare editor keeps dirty flag, file editor gets saved. 从文件编辑器保存时,比较编辑器保持脏标志,文件编辑器保存。 Same thing in revers works, compare and file editor both get marked as non-dirty files. 在反向工作中,比较和文件编辑器都被标记为非脏文件。

Is there a way for compare editor to detect the file change and remove dirty flag, it causes to open save dialog when trying to close compare editor even thoug file has been saved. 比较编辑器有没有办法检测文件更改并删除脏标志,它会导致在尝试关闭比较编辑器时打开保存对话框甚至thoug文件已保存。

Have anyone had similar problems? 有没有人有类似的问题? Was solution found? 找到了解决方案?

Check this article. 看看这篇文章。 It may be what you want. 它可能是你想要的。 You can listen resource change event. 您可以监听资源更改事件。 http://www.eclipse.org/articles/Article-Resource-deltas/resource-deltas.html http://www.eclipse.org/articles/Article-Resource-deltas/resource-deltas.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM