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 144960 - [65cat] org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 6,393.
Summary: [65cat] org.netbeans.editor.GuardedException: Attempt to insert into guarded ...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Beans (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
URL: http://statistics.netbeans.org/except...
Keywords:
: 127300 149031 151574 (view as bug list)
Depends on:
Blocks: 127300
  Show dependency tree
 
Reported: 2008-08-24 21:39 UTC by sunbiz
Modified: 2011-09-21 08:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 97605


Attachments
stacktrace (2.73 KB, text/plain)
2008-08-24 21:41 UTC, sunbiz
Details
stacktrace (3.48 KB, text/plain)
2008-10-22 12:38 UTC, sunbiz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2008-08-24 21:39:08 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808111757)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Linux, 2.6.25.11-0.1-pae, i386
User comments: Steps to reproduce:
1.) Right-click on uneditable region -> Insert code
2.) Select add property
3.) exception is thrown
STACKTRACE: (first 10 lines)
org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 6,393.
        at org.netbeans.editor.GuardedDocument.preInsertCheck(GuardedDocument.java:221)
        at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:725)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator$1.run(AddPropertyCodeGenerator.java:141)
        at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:324)
        at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:410)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator.insertCode(AddPropertyCodeGenerator.java:135)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator.perform(AddPropertyCodeGenerator.java:123)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator.invoke(AddPropertyCodeGenerator.java:112)
        at org.netbeans.modules.editor.codegen.GenerateCodePanel.invokeSelected(GenerateCodePanel.java:148)
        at org.netbeans.modules.editor.codegen.GenerateCodePanel.listMouseReleased(GenerateCodePanel.java:117)
Comment 1 sunbiz 2008-08-24 21:41:31 UTC
Created attachment 68201 [details]
stacktrace
Comment 2 Jan Pokorsky 2008-08-27 18:42:06 UTC
unrelated to refactoring, reassigning to beans
Comment 3 Jan Pokorsky 2008-10-03 10:05:21 UTC
*** Issue 149031 has been marked as a duplicate of this issue. ***
Comment 4 Jan Pokorsky 2008-10-03 10:09:03 UTC
This should be fixed together with issue 127300.

As a work around place the cursor outside guarded section and method block.
Comment 5 sunbiz 2008-10-22 12:38:31 UTC
Build: NetBeans IDE Dev (Build 200810210201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Windows Vista, 6.0, x86

User Comments: 
Insert code-> add property in a guarded block of code.

Stacktrace: 
org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 735.
        at org.netbeans.editor.GuardedDocument.preInsertCheck(GuardedDocument.java:221)
        at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:728)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator$2.run(AddPropertyCodeGenerator.java:155)
        at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:324)
        at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:410)
        at org.netbeans.modules.beans.addproperty.AddPropertyCodeGenerator.insertCodeImpl(AddPropertyCodeGenerator.java:149)
Comment 6 sunbiz 2008-10-22 12:38:36 UTC
Created attachment 72464 [details]
stacktrace
Comment 7 Jan Pokorsky 2008-11-10 16:22:37 UTC
*** Issue 151574 has been marked as a duplicate of this issue. ***
Comment 8 Jan Becicka 2010-10-11 12:18:00 UTC
*** Bug 127300 has been marked as a duplicate of this bug. ***
Comment 9 Jan Becicka 2011-09-19 14:42:48 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/c5fa730344c9
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2011-09-19 16:38
Message:   
Issue #144960 - [65cat] org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 6,393.
Comment 10 Quality Engineering 2011-09-21 08:07:12 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c5fa730344c9
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #144960 - [65cat] org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 6,393.