Another small fix.
2006-01-13 Lillian Angel <[EMAIL PROTECTED]>
* javax/swing/text/DefaultStyledDocument.java
(createDefaultRoot): Removed FIXME.
(setLogicalStyle): Added fireUndoableEditUpdate call and
removed FIXME.
On Fri, 2006-01-13 at 14:34 -0500, Lillian Angel wrote:
> I changed the class so all the addEdit calls are all done after
> insertUpdate is called. This fixes some mauve regressions.
>
> 2006-01-13 Lillian Angel <[EMAIL PROTECTED]>
>
> * javax/swing/text/DefaultStyledDocument.java
> (Edit): New inner class.
> (changeUpdate): Changed addEdit call to add a new
> instance of Edit to the edits Vector, so addEdits can
> be done later.
> (split): Likewise.
> (insertParagraph): Likewise.
> (insertFracture): Likewise.
> (insertContentTag): Likewise.
> (insert): Added loop to go through edits Vector and perform
> addEdit on each object.
>
Index: javax/swing/text/DefaultStyledDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v
retrieving revision 1.37
diff -u -r1.37 DefaultStyledDocument.java
--- javax/swing/text/DefaultStyledDocument.java 13 Jan 2006 19:30:45 -0000 1.37
+++ javax/swing/text/DefaultStyledDocument.java 13 Jan 2006 20:03:41 -0000
@@ -1343,8 +1343,6 @@
protected AbstractDocument.AbstractElement createDefaultRoot()
{
Element[] tmp;
- // FIXME: Create a SecionElement here instead of a BranchElement.
- // Use createBranchElement() and createLeafElement instead.
SectionElement section = new SectionElement();
BranchElement paragraph = new BranchElement(section, null);
@@ -1589,12 +1587,11 @@
int start = el.getStartOffset();
int end = el.getEndOffset();
DefaultDocumentEvent ev =
- new DefaultDocumentEvent (
- start,
+ new DefaultDocumentEvent (start,
end - start,
DocumentEvent.EventType.CHANGE);
- // FIXME: Add an UndoableEdit to this event and fire it.
fireChangedUpdate(ev);
+ fireUndoableEditUpdate(new UndoableEditEvent(this, ev));
}
else
throw new
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches