This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
CloneableEditorSupport has a timestamp that should not be set the way it is. There are problems with the way the detection of externally modified is done. The lastSaveTime is not correct, especially considering it is set using the System.currentTimeMillis() in some cases. There should be a fileTimestamp or something. What SHOULD be done is, grab the time stamp of the file when the document is read, prior to saving get the timestamp of the file at that point and compare the two. If same then ok, if not same then externally modified. Or on some kind of refresh action compare the time stamp of the file with the one saved here. The KEY is not to modify the timestamp fetched unless the value came from the file not from anything computed here.
Reassigning to openide
First, please try to describe what problem it cases. The scheme, as implemented now, works OK for several years and both correctly reports external modification, does automatic background reload for clean buffers and so on.
It turns out the issue was that I had two listeners registered on a document and the state between the two listeners was causing changes to document at same time, which was not intended. I have fixed the problem on my end, and now the problem is gone. There was a separate issue logged to indicate that there was a deadlock issue when this type of thing happens, but its a separate bug. Apologies for pointing finger in wrong direction.