aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Christiaens2010-09-28 09:30:00 (EDT)
committerKnut Wannheden2011-04-28 05:18:04 (EDT)
commita39b4c93cb82437ff9f4d28fdf1ba2ad119ffd06 (patch)
tree6c8164a1951ef96b75bab2f09b9848c3c14ce52e
parentc5b24f1a848343fd901074d4c69a40e3d3b49aea (diff)
downloadorg.eclipse.xtext-a39b4c93cb82437ff9f4d28fdf1ba2ad119ffd06.zip
org.eclipse.xtext-a39b4c93cb82437ff9f4d28fdf1ba2ad119ffd06.tar.gz
org.eclipse.xtext-a39b4c93cb82437ff9f4d28fdf1ba2ad119ffd06.tar.bz2
Another nextTokenStartsAt refactoring.
-rw-r--r--plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java b/plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java
index 92b31f3..e5978ad 100644
--- a/plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java
+++ b/plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java
@@ -226,7 +226,9 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer {
return new Region(regionOffset, token.getStartIndex() - regionOffset);
}
}
- if (tokenStartsAt + tokenInfo.length > token.getStopIndex() + 1)
+
+ nextTokenStartsAt = tokenStartsAt + tokenInfo.length;
+ if (nextTokenStartsAt > token.getStopIndex() + 1)
break;
tokenInfos.remove(tokenInfoIdx);
tokenInfosCopyIt.remove();
@@ -234,7 +236,7 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer {
assert tokenInfosCopy.equals(tokenInfos);
- tokenStartsAt += tokenInfo.length;
+ tokenStartsAt = nextTokenStartsAt;
if (tokenStartsAt > token.getStartIndex())
break;
}