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.
Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_03-ea; Java HotSpot(TM) Client VM 1.6.0_03-ea-b01 System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb) The end of guarded block is detected wrongly for variable declaration block in form file. Steps to reproduce: 1) create new form file 2) add several component to it 3) type "int x;" just below the variable declaration block (guarded block where are declared components) 4) do Safe Delete on x -> preview claims that the variable x is declared in guarded block, and it is not deleted
moving opened issues from TM <= 6.1 to TM=Dev
Overtake.
reproducible with 6.7m3
Reassigning all moonko's java/source bugs to myself.
reproducible in NB 7.2.1 ... only if you place it right after the block, any new line between the block and new declaration allows delete without any problems
Possibly a refactoring issue ? It seems that the filtered (without GEN-BEGIN / GEN-END) markers is taken as a base, but the refactored result it used without filtering; which makes the IDE (incorrectly) detect change in the guarded area. Please investigate
(In reply to Svata Dedic from comment #6) > Possibly a refactoring issue ? It seems that the filtered (without GEN-BEGIN > / GEN-END) markers is taken as a base, but the refactored result it used > without filtering; which makes the IDE (incorrectly) detect change in the > guarded area. > > Please investigate The comment, the one with GEN-END, is tied to the variable decl. int x;. Removing this variable tree from the class, CasualDiff incorrectly removes the comment with it. The diffs from CasualDiff are used to check if there will be changes in the guarded area.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss