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 155869

Summary: using class code template throws IllegalStateException
Product: python Reporter: Peter Lam <petersl>
Component: EditorAssignee: Jenselme
Status: RESOLVED WORKSFORME    
Severity: blocker CC: Jenselme
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: ide log file

Description Peter Lam 2008-12-20 01:24:21 UTC
latest daily build 20081219-404

This is not very reproducible. I created the first class using code template (cls) with a constructor. Then, using the
same class code template (cls) again to create a 2nd class. After the code template is displayed, the following
exception popped up immediately. See attached ide log file for complete stack trace.

SEVERE [global]
java.lang.IllegalStateException: Region: <355,359) not found:
    <340,340)
    <340,349)
    <359,359)
    <355,359)
    <363,367)
    <367,371)
    <371,384)
    <385,389)
    <389,393)
    <397,401)
    <401,405)

	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:514)
	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.fixRegionStartOffset(TextRegionManager.java:411)
	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.setText(TextRegionManager.java:393)
	at org.netbeans.lib.editor.codetemplates.textsync.TextSync.setText(TextSync.java:133)
...
Comment 1 Peter Lam 2008-12-20 01:25:12 UTC
Created attachment 75204 [details]
ide log file
Comment 2 Lou Dasaro 2015-09-06 06:07:28 UTC
Reassigning to Julien for evaluation later...
Comment 3 Jenselme 2015-09-29 14:03:49 UTC
I tried to reproduced but I didn't manage to do it. I guess that it was solved.

Steps I took:

- Use "Alt + Insert" and select "class"
- Let name and heritage to their default value
- Add a __init__ function
- Use "Alt + Insert" again and select "class"
- Let name and heritage to their default value
- Add a __init__ function

Nothing happened.