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 26116e0..cb1a56d 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,14 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * 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 + *******************************************************************************/ package net.sourceforge.phpdt.internal.ui.text; -/* - * (c) Copyright IBM Corp. 2000, 2001. - * All Rights Reserved. - */ +import org.eclipse.jface.text.Assert; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.rules.ICharacterScanner; -import org.eclipse.jface.util.Assert; @@ -105,8 +111,13 @@ public final class BufferedDocumentScanner implements ICharacterScanner { fOffset= 0; } } - + try { return fBuffer[fOffset++]; + } catch (ArrayIndexOutOfBoundsException e) { + System.out.println("Offset:"+fOffset); + System.out.println("Buffer:"+fBuffer); + throw e; + } } /* @@ -148,4 +159,4 @@ public final class BufferedDocumentScanner implements ICharacterScanner { public final char[][] getLegalLineDelimiters() { return fDelimiters; } -} \ No newline at end of file +}