Only respond to Resource Change Events caused by external changes to a file [message #1017503] |
Mon, 11 March 2013 20:16  |
Eclipse User |
|
|
|
Hello Folks,
I have an RCP application with an editor for a particular type of file (that contains an EMF model). If that file gets modified by some external editor or process while the editor has the file open, I want to prompt the user with the option to "reload."
I added a ResourceChangeListener that responds to POST_CHANGE and this works well for me. Now, when someone uses Notepad or other to edit a file, my application can deal with it.
However, I now have the problem that this listener responds to changes caused by a simple save action! This is not external and does not require a "reload".
Is there some way to suppress the Resource Changed event without causing a race condition? Am I going about this wrong?
I'm trying to replicate behavior that one usually sees with a text editor where it will prompt you to "reload" if the file has "changed on disk" (e.g. like Notepad++ does)
-Jesse
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02891 seconds