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.
Build: NetBeans IDE 6.1 (Build 200805300101) VM: Java HotSpot(TM) Client VM, 1.5.0_15-b04, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_15-b04 OS: Windows XP, 5.1, x86 User Comments: GUEST: invoked surround statement with try..catch; statement is the only one within public static void main. freeform web project chrislundin: adding try catch around both statement and block baffyofdaffy: I just submitted an error about when pressing c error poped up not I press Ctrl+space after the c and press enter and error poped up again GUEST: surrounding block of code with try-catch GUEST: Surrounding a block of code with try-catch through refactoring GUEST: In the editor, selecting the option "surround with try-catch block". Stacktrace: java.lang.IllegalStateException: Region: <6714,6715) not found. at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:502) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.fixRegionStartOffset(TextRegionManager.java:400) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.insertUpdate(TextRegionManager.java:231) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager$DocListener.insertUpdate(TextRegionManager.java:622) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:676) at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:283)
Created attachment 71799 [details] stacktrace
Reproducible in a dev build. Here are the steps: 1. type fori<tab>; the template will expand 2. select the expanded template (make sure that you don't terminate the synced editing mode) 3. Alt+Enter and select one of the Surround With... hints You should now have the IllegalStateException.
*** Issue 150392 has been marked as a duplicate of this issue. ***
This issue has already 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=50046
This should be dup of issue 132615. *** This issue has been marked as a duplicate of 132615 ***