* 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;
state = STATE_DEFAULT;
return getToken(XML_TAG);
- case '?': // <? <?PI
- return nextPIToken();
+ case '?': // <? <?PI
+ unread();
+ break;
+// return nextPIToken();
case '!': // <! <!DEFINITION or <![CDATA[ or <!--COMMENT
switch (read()) {
length = 0;
return nextToken();
}
+ break;
+ default:
+ unread();
}
loop:
return getToken(XML_ATTRIBUTE);
}
}
+ default:
+ unread();
}
while (true) {
this.position = offset;
this.length = 0;
- this.state = STATE_DEFAULT;
+ this.state = STATE_DEFAULT;
}
/*
+ * @see org.eclipse.jface.text.rules.IPartitionTokenScanner
+ */
+// public void setPartialRange(IDocument document, int offset, int length, String contentType, int partitionOffset) {
+// state = STATE_DEFAULT;
+// if (partitionOffset > -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;