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.
Steps to reproduce: 1. Create and save following class via IDE: public class NewClass1 { int i = 10; public NewClass1() { //GEN-BEGIN:RRR i += 99; //GEN-END:RRR } } 2. Keep file NewClass1.java open in IDE editor. 3. Open file NewClass1.java via other editor (e.g. vi or notepad) and change something inside NewClass1.java (e.g. change line "int i = 10;" to "int i = 1;".) 4. Switch into IDE. IDE will reload the file due to changes in the file. 5. Whole document becomes guarded block.
Created attachment 21048 [details] A suggested fix
Reassigning to java module
A small annotation. Please, save changes created in file NewClass1.java in step 3 before switch into IDE.
This issue IMO belongs to the java module.
Proposed patch reviewed and applied. Checking in JavaEditor.java; /cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v <-- JavaEditor.java new revision: 1.188; previous revision: 1.187