I added the updateUndoPositions() method to both the StringContent and
the GapContent class. This method is not really specified, the Vector
argument most likely contains implementation specific objects (in some
tests that I ran against JDK1.5 however these methods were never called,
so maybe they are simply obsolete). I implemented them to do nothing,
just in case some app wants to override this. What else is there what we
can do about this?

2006-02-10  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/text/GapContent.java
        (updateUndoPositions): New method.
        * javax/swing/text/StringContent.java
        (updateUndoPositions): New method.


/Roman
Index: javax/swing/text/StringContent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/StringContent.java,v
retrieving revision 1.7
diff -u -r1.7 StringContent.java
--- javax/swing/text/StringContent.java	24 Jan 2006 14:34:41 -0000	1.7
+++ javax/swing/text/StringContent.java	10 Feb 2006 14:23:05 -0000
@@ -372,6 +372,18 @@
     txt.count = len;
   }
 
+
+  /**
+   * @specnote This method is not very well specified and the positions vector
+   *           is implementation specific. The undo positions are managed
+   *           differently in this implementation, this method is only here
+   *           for binary compatibility.
+   */
+  protected void updateUndoPositions(Vector positions)
+  {
+    // We do nothing here.
+  }
+
   /** 
    * A utility method that checks the validity of the specified character
    * range.
Index: javax/swing/text/GapContent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/GapContent.java,v
retrieving revision 1.35
diff -u -r1.35 GapContent.java
--- javax/swing/text/GapContent.java	12 Jan 2006 15:45:22 -0000	1.35
+++ javax/swing/text/GapContent.java	10 Feb 2006 14:23:05 -0000
@@ -747,6 +747,17 @@
   }
 
   /**
+   * @specnote This method is not very well specified and the positions vector
+   *           is implementation specific. The undo positions are managed
+   *           differently in this implementation, this method is only here
+   *           for binary compatibility.
+   */
+  protected void updateUndoPositions(Vector positions, int offset, int length)
+  {
+    // We do nothing here.
+  }
+
+  /**
    * Outputs debugging info to System.err. It prints out the buffer array,
    * the gapStart is marked by a &lt; sign, the gapEnd is marked by a &gt;
    * sign and each position is marked by a # sign.

Reply via email to