From: axelcl Date: Sun, 15 May 2005 23:09:09 +0000 (+0000) Subject: Improved aml scanner for this bug X-Git-Url: http://git.phpeclipse.com Improved aml scanner for this bug See: http://garv.in/serendipity/archives/653-PHP-Eclipse-Bug.html --- diff --git a/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLPartitionScanner.java b/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLPartitionScanner.java index 4434faa..1064ca3 100644 --- a/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLPartitionScanner.java +++ b/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLPartitionScanner.java @@ -8,7 +8,7 @@ * Contributors: * Igor Malinin - initial contribution * - * $Id: XMLPartitionScanner.java,v 1.1 2004-09-02 18:28:03 jsurfer Exp $ + * $Id: XMLPartitionScanner.java,v 1.2 2005-05-15 23:09:09 axelcl Exp $ */ package net.sourceforge.phpeclipse.xml.ui.internal.text; @@ -100,8 +100,10 @@ public class XMLPartitionScanner implements IPartitionTokenScanner { state = STATE_DEFAULT; return getToken(XML_TAG); - case '?': // -1) { +// int delta = offset - partitionOffset; +// if (delta > 0) { +// setRange(document, partitionOffset, length + delta); +// return; +// } +// } +// setRange(document, partitionOffset, length); +// } + /* * @see org.eclipse.jface.text.rules.IPartitionTokenScanner */ public void setPartialRange( IDocument document, int offset, int length, String contentType, int partitionOffset ) { +// boolean flag = false; this.document = document; this.end = offset + length; // NB! Undocumented value: -1 if (partitionOffset >= 0) { offset = partitionOffset; +// flag = true; } this.offset = offset; this.position = offset; this.length = 0; +// if (flag) { +// state = STATE_DEFAULT; +// return; +// } if (contentType == XML_ATTRIBUTE) { state = STATE_TAG; return;