|Text editor synchronization problem [message #444514]
||Fri, 31 July 2009 13:15
| Norbert Schöpke
Registered: July 2009
I have a problem with the synchronization of external changes for
workspace files. I wrote my own little text editor (extends TextEditor)
and everything works fine. But recently I discovered that changes made
with an external editor get synchronized with my open editor without a
chance to intervene. The usual question dialog DOES pop up and blocks the
UI, but the editor does get updated with the new text anyway, in the
background. Whether I click yes or no, the new text is already there.
I did a lot of debugging and traced it to the FileSynchronizer instance of
ResourceFileBuffer, which is activated because a file in the workspace
changed. I don't even need to activate the Eclipse editor for this to
happen. It seems to be a completely separate update mechanism compared to
the one that triggers the dialog to pop up.
This also happens for simple .properties files. I tried to switch between
FileDocumentProvider and TextFileDocumentProvider (one of which I extend
for my own use) but the behaviour is the same. This is all on the latest
Ganymede platform. I would appreciate any hints on what could be wrong
here. The mechanisms involved are fairly common, so I wouldn't expect
serious bugs here. So what else could it be?
Thanks for any pointers...
Powered by FUDForum
. Page generated in 0.04707 seconds