Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-patch] Fix for PR# 24648, C/C++ editor prints 2nd or greater lines backwards when using Eclipse 2.01 (build 20020920) or greater

Judy,

  Even with this patch, we're still seeing this problem:

  BufferedDocumentScanner.updateBuffer()
    calls CDocumentProvider.get()
      throw BadLocationException

  As far as I could tell, for every invocation of updateBuffer(),
offSet == fRangeOffset; this causes the BadLocationException when
fBufferLength was set to fRangeLength.

-Samrobb


-----Original Message-----
From: Judy Green [mailto:jgreen@xxxxxxx]
Sent: Thursday, October 10, 2002 3:16 PM
To: 'cdt-patch@xxxxxxxxxxx'
Subject: [cdt-patch] Fix for PR# 24648, C/C++ editor prints 2nd or
greater lines backwards when using Eclipse 2.01 (build 20020920) or
greater


I've just submitted the following patch for the PR 24648
There were recent changes in the corresponding JDT class and we had to bring
our class into synch with it. 
FYI: The CDT editors started as copies of the JDT editors with tweaks to
make them C editors rather than Java Editors.

-Judy

¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨
Judy N. Green               Software Engineer
QNX Software Systems Ltd.   www.qnx.com
¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨

***
cvs diff -N -u "BufferedDocumentScanner.java"
Index: BufferedDocumentScanner.java
===================================================================
RCS file:
/home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/Buffered
DocumentScanner.java,v
retrieving revision 1.1
diff -u -r1.1 BufferedDocumentScanner.java
--- BufferedDocumentScanner.java 26 Jun 2002 22:39:16 -0000 1.1
+++ BufferedDocumentScanner.java 10 Oct 2002 18:40:05 -0000
@@ -45,7 +45,7 @@
}
/**
- * Fills the buffer with the contens of the document starting at the given
offset.
+ * Fills the buffer with the contents of the document starting at the given
offset.
*
* @param offset the document offset at which the buffer starts
*/
@@ -53,8 +53,8 @@
fBufferOffset= offset;
- if (fBufferOffset + fBuffer.length > fRangeLength)
- fBufferLength= fRangeLength - fBufferOffset;
+ if (fBufferOffset + fBuffer.length > fRangeOffset + fRangeLength)
+ fBufferLength= fRangeLength - (fBufferOffset - fRangeOffset);
else
fBufferLength= fBuffer.length;
The server reported an error while performing the "cvs diff" command which
may only indicate that a difference exists. (took 0:00.431)
***
_______________________________________________
cdt-patch mailing list
cdt-patch@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-patch


Back to the top