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.

Bug 56831 - A guarded block is expanded over whole document after document reload
Summary: A guarded block is expanded over whole document after document reload
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 09:15 UTC by pgebauer
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A suggested fix (1.49 KB, patch)
2005-03-23 09:23 UTC, pgebauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pgebauer 2005-03-23 09:15:48 UTC
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.
Comment 1 pgebauer 2005-03-23 09:23:21 UTC
Created attachment 21048 [details]
A suggested fix
Comment 2 Martin Roskanin 2005-03-23 09:26:55 UTC
Reassigning to java module
Comment 3 pgebauer 2005-03-23 09:37:22 UTC
A small annotation. Please, save changes created in file NewClass1.java in step
3 before switch into IDE.
Comment 4 Jan Lahoda 2005-03-23 09:42:54 UTC
This issue IMO belongs to the java module.
Comment 5 Daniel Prusa 2005-03-23 14:35:42 UTC
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