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.
JDK 1.4.2, dev build with patches: http://www.netbeans.org/issues/show_bug.cgi?id=35914 http://www.netbeans.org/issues/show_bug.cgi?id=33165 http://www.netbeans.org/issues/show_bug.cgi?id=14803 http://www.netbeans.org/issues/show_bug.cgi?id=35930 All Breakpoints in guarded block are drawn on first line after guard. block after reload after external modification. Steps to reproduce: 1) Open java src file in IDE editor 2) Open the same file in external editor 3) Toggle BPs inside guarded block 4) Scroll caret outside the guarded block to move the guard. block out of editor screen, e.g. to the end of the file 5) Shorten the file in external editor - remove lines above the guarded block 6) Let the file be reloaded in IDE editor 7) Scroll to guarded block All BPs are on one line just after the guarded block.
Happend again after reload after basic external modification - no shortening of file was needed.
I've turned on -J-Dnetbeans.debug.editor.document=true and the behavior is caused by the fact that the guarded sections get refreshed both when document is loaded or reloaded. The reason why the annotations are moved to the end of the block is that the new guarded section text gets inserted prior to removing the original guarded section text. This is hardly fixable unless the whole mechanism of guarded sections refreshing is changed to do comparisons and just incremental changes inside the section of the text that has to be changed. Please close it if you are satisfied with the explanation or reassign it to java module. Thanks.
Reassigned to java module as Mila explained.
It will not be fixed in 4.0
I don't understand what is the bug. I don't see any. Probably fixed by JavaEditor rewrite.
The bug is still there, easier way to reproduce: 1) Create Form file, add couple of components to the form 2) Switch to Source, set couple of breakpoints in the source of the form 3) Switch to Design and modify the form 4) Go back to Source - all breakpoints are stored in the first line after guard. block Attaching screenshots before and after.
Created attachment 23036 [details] screenshot before
Created attachment 23037 [details] screenshot after
Still valid in latest 6.0 build
Vast changes required -> LATER.
NetBeans.org Migration: changing resolution from LATER to WONTFIX