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.
NbDocument supports a method that marks a part of styled document as guarded (according to NetBeans document conventions). Unfortunatelly it fails to set GUARDED character attribute. Please introduce isGuarded() if you want implementation freedom or implement the GUARDED contract properly. Currently there is null attribute set returned for guarded position.
NbEditorDocument probably does not support setCharacterAttributes (offset, len, ATTR_ADD, false);
It looks like the attribute persistency is broken. I really wonder how can it work for Java, XML, etc files.
*** Issue 31732 has been marked as a duplicate of this issue. ***
The NbEditorDocument does not use the elements to store the character attributes. However we would like to start to use the elements to carry this information in the 4.0 timeframe.
Is this issue still valid? We have guards api.
???
It depends which api we want to use. Since NbDocument.markGuarded() uses doc.setCharacterAttributes() one might expect to obtain the information from the document's elements which is currently not implemented. OTOH the guards api provides the information too so we may probably close this.