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 239206 - javax.swing.text.BadLocationException: Modification not allowed
Summary: javax.swing.text.BadLocationException: Modification not allowed
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 15:57 UTC by Petr Cyhelsky
Modified: 2017-10-19 07:11 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 203621


Attachments
stacktrace (3.35 KB, text/plain)
2013-12-06 15:57 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2013-12-06 15:57:53 UTC
Build: NetBeans IDE Dev (Build 201312030002)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b33
OS: Linux

User Comments:
cyhelsky: reverting change in file

GUEST: clicking on netbeans from another app




Stacktrace: 
javax.swing.text.BadLocationException: Modification not allowed
   at org.openide.text.CloneableEditorSupport$DocFilter.modificationNotAllowed(CloneableEditorSupport.java:2385)
   at org.openide.text.CloneableEditorSupport$DocFilter.checkModificationAllowed(CloneableEditorSupport.java:2379)
   at org.openide.text.CloneableEditorSupport$DocFilter.replace(CloneableEditorSupport.java:2355)
   at org.netbeans.editor.BaseDocument.replace(BaseDocument.java:1042)
   at org.netbeans.modules.versioning.ui.diff.DiffSidebar.onRollback(DiffSidebar.java:338)
   at org.netbeans.modules.versioning.ui.diff.DiffTooltipActionsPanel.actionPerformed(DiffTooltipActionsPanel.java:136)
Comment 1 Petr Cyhelsky 2013-12-06 15:57:54 UTC
Created attachment 142918 [details]
stacktrace
Comment 2 Ondrej Vrabec 2014-01-06 09:53:57 UTC
Reassigning back. Looking at org.netbeans.editor.BaseDocument.replace(BaseDocument.java:1042), at this point it is already after a call to "checkModifiable(offset);" so it looks as if BaseDocument allows editing but further org.openide.text.CloneableEditorSupport$DocFilter disallows it. Lack of inconsistency? Or please advise on what should be the correct way to determine if a document is editable: http://hg.netbeans.org/core-main/file/4005d84fa44d/versioning.ui/src/org/netbeans/modules/versioning/ui/diff/DiffSidebar.java#l373
Comment 3 Exceptions Reporter 2014-10-06 15:53:48 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203621