X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/BufferedDocumentScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/BufferedDocumentScanner.java index 57812ba..b4fe57d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/BufferedDocumentScanner.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/BufferedDocumentScanner.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials + * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -19,7 +19,7 @@ import org.eclipse.jface.text.rules.ICharacterScanner; /** - * A buffered document scanner. The buffer always contains a section + * A buffered document scanner. The buffer always contains a section * of a fixed size of the document to be scanned. */ @@ -43,11 +43,11 @@ public final class BufferedDocumentScanner implements ICharacterScanner { /** The offset of the scanner within the buffer. */ private int fOffset; - + /** * Creates a new buffered document scanner. * The buffer size is set to the given number of characters. - * + * * @param size the buffer size */ public BufferedDocumentScanner(int size) { @@ -63,7 +63,7 @@ public final class BufferedDocumentScanner implements ICharacterScanner { private final void updateBuffer(int offset) { fBufferOffset= offset; - + if (fBufferOffset + fBuffer.length > fRangeOffset + fRangeLength) fBufferLength= fRangeLength - (fBufferOffset - fRangeOffset); else @@ -117,7 +117,7 @@ public final class BufferedDocumentScanner implements ICharacterScanner { return fBuffer[fOffset++]; } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Offset:"+fOffset); - System.out.println("Buffer:"+fBuffer); + System.out.println("Buffer:"+fBuffer.toString()); throw e; } } @@ -134,7 +134,7 @@ public final class BufferedDocumentScanner implements ICharacterScanner { updateBuffer(fBufferOffset - fBuffer.length); fOffset= fBuffer.length - 1; } - } else { + } else { --fOffset; } }