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 89006 - Guarded block for event handlers are not correct
Summary: Guarded block for event handlers are not correct
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-09 12:24 UTC by Jiri Prox
Modified: 2007-01-03 11:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2006-11-09 12:24:24 UTC
NetBeans IDE Dev (Build 200611071900)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b100
Windows XP version 5.1 running on x86
en_US (nb); Cp1252

Guarded block for event handler is not generated correctly. If the comment //
TODO  ..." is replaced by some code additiond commend marking end of guarded
block is added but behind the code. After reload (or close/open) of the file,
the whole handler method is in guarded block a cannot be edited.

Steps to reproduce:
1) open form
2) add some component
3) add some even handler to the component
4) delete //TODO commnet
5) type any code

-> private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jComboBox1ActionPerformed
        System.out.println("");//GEN-HEADEREND:event_jComboBox1ActionPerformed
    }//GEN-LAST:event_jComboBox1ActionPerformed
Comment 1 Jan Pokorsky 2006-11-18 14:03:15 UTC
fixed in

/cvs/editor/guards/src/org/netbeans/spi/editor/guards/support/AbstractGuardedSectionsProvider.java
new revision: 1.4; previous revision: 1.3
/cvs/editor/guards/src/org/netbeans/modules/editor/guards/GuardedSectionsImpl.java
new revision: 1.4; previous revision: 1.3
/cvs/editor/guards/src/org/netbeans/modules/editor/guards/PositionBounds.java
new revision: 1.4; previous revision: 1.3
/cvs/editor/guards/test/unit/src/org/netbeans/api/editor/guards/GuardedSectionManagerTest.java
new revision: 1.2; previous revision: 1.1
Comment 2 Jiri Prox 2007-01-03 11:22:57 UTC
verified