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.
The CloneableEditorSupport class makes an assumption that it is responsible for writing the document. This is NOT the case for files being edited in the external editor. If CES saves the document then the editor will show a message saying the file has changed and you will need to reread it. Its much cleaner if only one editor is responsible for writing/saving. In this case it makes more sense for the external editor to do it. This is an important issue for Rainier. We currently have 2 P2 bugs filed on this bug have had as many as 5 (some P1) filed on it. I've got a suggested patch so it shouldn't take more than verification from the CES owner. I don't absolutely need this patch installed by EA (4 August) but would definately like it for EA.
Created attachment 11036 [details] Defer save operation to document for ExtEdDocument type
Created attachment 11037 [details] Same as ces.diff but "diff -cwb ..." (more for information)
I must be missing some info. I has feeling that this is working from the beginning of the external editor. What you wrote sound like external editor opens directly the file from disk? If yes then it is wrong. Yes, there must be only one place responsible for writing document. And in current architecture it is CES. It is designed a way that external editor should not open the files from disk directly. It should just visualize Swing document. Then it will never popup that file was changed externally and needs to be reloaded. The patch unfortunatelly is not acceptable - introspecting method from one of modules and calling it instead of CES.saveDocument is really bad bad bad! I would like to help you solve your problem, but I need more info. Thanx.
We talked with Gordon about this issue offline. This issue touches architecture of text package and so unfortunatelly there is not much what could be done in the short term to help solve these problems. For the long term we first need to know the problems which external editors suffer and then a solution can be proposed. Gordon promised to write them down.
Ok - verifying.