small fix for now...

2006-01-26  Lillian Angel  <[EMAIL PROTECTED]>

        * javax/swing/text/DefaultStyledDocument.java
        (createFracture): Commented out a known problem,
        added FIXME tag.



On Thu, 2006-01-26 at 16:19 -0500, Lillian Angel wrote:
> DefaultStyledDocument.ElementBuffer is still not working perfectly. It
> is better now, but many apps may still fail. I am still working on this.
> 
> Also, many failures are due to createFracture at this point. I need to
> fix this up.
> 
> Several mauve tests still fail. This is because there are many tests
> that shouldn't be considered at this point. The structure for many tests
> are correct at this point.. some still need more work.
> 
> It is coming along, but there seems to be a lot more to do.
> 
> 2006-01-26  Lillian Angel  <[EMAIL PROTECTED]>
> 
>         * javax/swing/text/DefaultStyledDocument.java
>         (ElementBuffer): Added fields.
>         (remove): Initialized pos.
>         (change): Likewise.
>         (insert): Likewise.
>         (insertUpdate): Incremented pos. Fixed check, 
>       createFracture should be called on first tag if it is not 
>       ContentType.
>         (insertFirstContentTag): Reworked to use proper offsets and
>         set offset accordingly. This might need more work in the future.
>         (insertContentTag): Likewise. Fixed to use pos, instead of
>         offset.
>         (createFracture): Fixed to recreate other leaves. Still needs
>         more work.
>         (insertFracture): Reimplemented.
>         (recreateAfterFracture): New method.
>         (getParagraphElement): Reimplemented, more efficent.
> 
Index: javax/swing/text/DefaultStyledDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v
retrieving revision 1.47
diff -u -r1.47 DefaultStyledDocument.java
--- javax/swing/text/DefaultStyledDocument.java	26 Jan 2006 21:20:29 -0000	1.47
+++ javax/swing/text/DefaultStyledDocument.java	26 Jan 2006 22:08:19 -0000
@@ -983,9 +986,9 @@
               Element newEl2 = createLeafElement(newB, atts, offset,
                                                  child.getEndOffset());
               newB.replace(0, 0, new Element[] { newEl2 });
-              Edit e = getEditForParagraphAndIndex(newB, 0);
+              Edit e = getEditForParagraphAndIndex(parent, parIndex);
               e.addAddedElement(newB);
-              elementStack.push(newB);
+             // FIXME: is this needed? elementStack.push(newB);
             }
           else
             {

Reply via email to