AS3: Fixed hilighting instructions with exceptions

This commit is contained in:
Jindra Pet��k
2011-07-10 09:31:03 +02:00
parent 1f042c375b
commit 76e36aa964
@@ -103,17 +103,20 @@ public class ASMSourceEditorPane extends JEditorPane {
int dot = -2; int dot = -2;
for (int i = 0; i < text.length(); i++) { for (int i = 0; i < text.length(); i++) {
if (text.charAt(i) == '\n') { if (text.charAt(i) == '\n') {
if (!((i > 0) && (text.charAt(i - 1) == ':')))
instrCount++;
lineCnt++; lineCnt++;
if (instrCount == pos) { lineEnd=i;
lineStart = i; String ins=text.substring(lineStart,lineEnd).trim();
dot = lineCnt; if (!((i > 0) && (text.charAt(i - 1) == ':')))
{
if(!ins.startsWith("exception ")){
instrCount++;
}
} }
if (lineCnt == dot + 1) { if (instrCount == pos+1) {
lineEnd = i;
break; break;
} }
lineStart = i;
} }
} }
if (lineCnt == -1) { if (lineCnt == -1) {