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 31694 - NbDocument.GUARDED is not implemented
Summary: NbDocument.GUARDED is not implemented
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords: API
: 31732 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-05 16:25 UTC by _ pkuzel
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2003-03-05 16:25:01 UTC
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.
Comment 1 _ pkuzel 2003-03-05 16:39:22 UTC
NbEditorDocument probably does not support
setCharacterAttributes (offset, len, ATTR_ADD, false);
Comment 2 _ pkuzel 2003-03-05 16:44:31 UTC
It looks like the attribute persistency is broken.

I really wonder how can it work for Java, XML, etc files.
Comment 3 Martin Roskanin 2003-03-06 12:53:37 UTC
*** Issue 31732 has been marked as a duplicate of this issue. ***
Comment 4 Miloslav Metelka 2003-03-06 13:13:22 UTC
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.
Comment 5 Jan Becicka 2007-10-17 15:14:17 UTC
Is this issue still valid? We have guards api.
Comment 6 Jan Becicka 2007-10-23 15:38:18 UTC
???
Comment 7 Miloslav Metelka 2007-10-23 16:33:35 UTC
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.