| author | Mark Christiaens | 2010-09-28 09:31:42 (EDT) |
|---|---|---|
| committer | Knut Wannheden | 2011-04-28 05:18:04 (EDT) |
| commit | 2a8fb588c2b7fce6f19f8183f07f313ab03de5e3 (patch) (side-by-side diff) | |
| tree | f82f571b1d85a4ccb7b8940840b0e44f454961c8 | |
| parent | a39b4c93cb82437ff9f4d28fdf1ba2ad119ffd06 (diff) | |
| download | org.eclipse.xtext-2a8fb588c2b7fce6f19f8183f07f313ab03de5e3.zip org.eclipse.xtext-2a8fb588c2b7fce6f19f8183f07f313ab03de5e3.tar.gz org.eclipse.xtext-2a8fb588c2b7fce6f19f8183f07f313ab03de5e3.tar.bz2 | |
Removed assertions on copied list and token.
| -rw-r--r-- | plugins/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/FastDamagerRepairer.java | 16 |
1 files changed, 0 insertions, 16 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 e5978ad..d71169c 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 @@ -204,25 +204,18 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer { // compute region length while (true) { boolean removed = false; - assert (tokenInfoIdx >= tokenInfos.size()) == !tokenInfosCopyIt.hasNext(); if (token == Token.EOF_TOKEN || tokenInfoIdx >= tokenInfos.size()) break; while (true) { - assert (tokenInfoIdx >= tokenInfos.size()) == !tokenInfosCopyIt.hasNext(); - assert tokenInfosCopy.equals(tokenInfos); - if (tokenInfoIdx >= tokenInfos.size()) break; tokenInfo = tokenInfos.get(tokenInfoIdx); TokenInfo tokenInfoCopy = tokenInfosCopyIt.next(); - assert tokenInfo == tokenInfoCopy; - if (token.getStartIndex() >= afterRegion) { if (tokenStartsAt == token.getStartIndex() && !tokenCorrespondsToTokenInfo(token, tokenInfo)) { - assert tokenInfosCopy.equals(tokenInfos); return new Region(regionOffset, token.getStartIndex() - regionOffset); } } @@ -234,16 +227,12 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer { tokenInfosCopyIt.remove(); removed = true; - assert tokenInfosCopy.equals(tokenInfos); - tokenStartsAt = nextTokenStartsAt; if (tokenStartsAt > token.getStartIndex()) break; } TokenInfo tokenInfoToAdd = createTokenInfo(token); - assert tokenInfosCopy.equals(tokenInfos); - tokenInfos.add(tokenInfoIdx++, tokenInfoToAdd); // assert tokenInfosCopyIt.hasPrevious(); @@ -255,15 +244,11 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer { tokenInfosCopyIt.add(tokenInfoToAdd); } - assert tokenInfosCopy.equals(tokenInfos); - token = (CommonToken) source.nextToken(); } tokenInfos.subList(tokenInfoIdx, tokenInfos.size()).clear(); tokenInfosCopy.subList(tokenInfoIdx, tokenInfosCopy.size()).clear(); - assert tokenInfosCopy.equals(tokenInfos); - // add subsequent tokens if (tokenInfoIdx >= tokenInfos.size()) { @@ -274,7 +259,6 @@ public class FastDamagerRepairer extends AbstractDamagerRepairer { } } - assert tokenInfosCopy.equals(tokenInfos); return new Region(regionOffset, regionLength); } |

