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 225826 - org.netbeans.editor.GuardedException: Modification prohibited
Summary: org.netbeans.editor.GuardedException: Modification prohibited
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 228182 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-07 10:20 UTC by Jan Stola
Modified: 2013-05-30 01:38 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 198350


Attachments
stacktrace (2.21 KB, text/plain)
2013-02-07 10:20 UTC, Jan Stola
Details
stacktrace (2.20 KB, text/plain)
2013-03-04 09:36 UTC, Vladimir Riha
Details
stacktrace (2.20 KB, text/plain)
2013-05-07 06:40 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Stola 2013-02-07 10:20:06 UTC
This issue was reported manually by jstola.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build 20130201-b3804b2f60dc)
VM: Java HotSpot(TM) Client VM, 20.12-b01, Java(TM) SE Runtime Environment, 1.6.0_37-b06
OS: Windows 7

User Comments:
jstola: Open a read-only stylesheet and place the caret into some rule
=> CSS Styles view is opened and Rule Editor is populated.
=> The properties in the Rule Editor are editable. They should be read-only.
Modify some property in the Rule Editor
=> the attached exception is thrown.




Stacktrace: 
org.netbeans.editor.GuardedException: Modification prohibited
   at org.netbeans.editor.BaseDocument.checkModifiable(BaseDocument.java:1046)
   at org.netbeans.editor.BaseDocument.remove(BaseDocument.java:926)
   at org.netbeans.modules.css.model.api.Model.applyChanges(Model.java:501)
   at org.netbeans.modules.css.model.api.Model.access$100(Model.java:95)
   at org.netbeans.modules.css.model.api.Model$3.run(Model.java:400)
   at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:347)
Comment 1 Jan Stola 2013-02-07 10:20:08 UTC
Created attachment 131087 [details]
stacktrace
Comment 2 Vladimir Riha 2013-03-04 09:36:09 UTC
Created attachment 132143 [details]
stacktrace

Steps that caused it:
- create JavaEE sample project ScrumToys
- open index.html, right click in editor and select Run File
- in browser (Chrome with NB integration), start inspect mode and select the main menu ("Home", "Projects"...)
- in CSS Styles in Properties, click on background-color
- in CSS Styles, try to change background-color to "aqua" and confirm

=> exception
Comment 3 Marian Mirilovic 2013-04-25 17:46:06 UTC
*** Bug 228182 has been marked as a duplicate of this bug. ***
Comment 4 David Konecny 2013-05-07 06:40:42 UTC
Created attachment 134159 [details]
stacktrace

I changed a property in CSS Styles window while debugging Tyrus Auction app on an Android device.
Comment 5 Marek Fukala 2013-05-23 15:29:41 UTC
fixed in web-main#d124d8309b6a
Comment 6 Quality Engineering 2013-05-24 02:45:24 UTC
Integrated into 'main-golden', will be available in build *201305232300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d124d8309b6a
User: Marek Fukala <mfukala@netbeans.org>
Log: #225826 - org.netbeans.editor.GuardedException: Modification prohibited
Comment 7 Vladimir Riha 2013-05-29 07:18:38 UTC
Thank you for fix, properties are read only, but this exception could be still reproduced by these 2 ways:
- have some rules/properties in CSS Styles from read-only file (e.g. link remote css file to html page and use inspect mode to select element with "remote rule"
- try either of these:
   - right click on property in "Rule editor" (bottom) part and select "Remove property" (exception report [1])
   - or invoke Add property dialog and try to add new property


[1] http://statistics.netbeans.org/exceptions/exception.do?id=673822
Comment 8 Marek Fukala 2013-05-29 07:39:55 UTC
fixed in web-main#96e6cfbf6fa7
Comment 9 Marek Fukala 2013-05-29 08:09:53 UTC
changeset:   254518:5985bd6febc0
summary:     #225826 /3 one more fix + better performance
Comment 10 Quality Engineering 2013-05-30 01:38:33 UTC
Integrated into 'main-golden', will be available in build *201305292301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/96e6cfbf6fa7
User: Marek Fukala <mfukala@netbeans.org>
Log: #225826 /2 additional fix