[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/24744] New: DefaultStyledDocument.ElementBuffer misfunction
From: |
roman at kennke dot org |
Subject: |
[Bug swing/24744] New: DefaultStyledDocument.ElementBuffer misfunction |
Date: |
8 Nov 2005 22:17:21 -0000 |
The DefaultStyledDocument.ElementBuffer is responsible for performing
structural changes to the Document's element structure in response to content
insertion/deletion/change. For example, when a new line with some text is
inserted, this must be reflected in the element structure (a new paragraph
element is created covering the new line). While doing so, the ElementBuffer
must add instances of ElementEdit to a DefaultDocumentEvent, which describe
which changes have been made to which elements. This event is later passed
around the views, so they can update themselves according to the element
changes.
The problem I am seeing is that the ElementBuffer sometimes adds multiple
ElementEdit instance for the same element to the DefaultDocumentEvent (for
instance when the structural change means first removing some content, then
adding some content). This is not right, because the DefaultDocumentEvent is
specified to only store 1 ElementEdit per Element. So what happens is that a
second addition of an ElementEdit replaces the first addition of another
ElementEdit for the same element. This then confuses the views, since they
don't know about the first change, resulting in strange AssertionErrors,
ArrayIndexOutOfBounds and other nasty failures. The solution would be to
somehow collapse edits together so that we really only have one ElementEdit per
changed element.
I am assigning this to you Tony because I know you work in this area anyway. I
really don't have the time to fix this atm. My work request queue is really
overflowed atm :-/. If you feel you also cannot fix this then feel free to
re-assign it to me and I will see if I can fix this, it will have to wait a
while though...
/Roman
--
Summary: DefaultStyledDocument.ElementBuffer misfunction
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: swing
AssignedTo: abalkiss at redhat dot com
ReportedBy: roman at kennke dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24744
- [Bug swing/24744] New: DefaultStyledDocument.ElementBuffer misfunction,
roman at kennke dot org <=