aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-03-10 05:31:32 (EDT)
committersefftinge2009-03-10 05:31:32 (EDT)
commitbb731cd3bae89b98260f270d1e587966ccea433b (patch)
tree4c51b85aab4dcd49526cce577851e0dd9ec82cdf
parent16e2c2c8bb02b4e18814cc17d7ef906b57b5aca5 (diff)
downloadorg.eclipse.xtext-bb731cd3bae89b98260f270d1e587966ccea433b.zip
org.eclipse.xtext-bb731cd3bae89b98260f270d1e587966ccea433b.tar.gz
org.eclipse.xtext-bb731cd3bae89b98260f270d1e587966ccea433b.tar.bz2
Fixed infinite loop in XtextDamagerRepairer
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextDamagerRepairer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextDamagerRepairer.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextDamagerRepairer.java
index b73d18d..e26df64 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextDamagerRepairer.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextDamagerRepairer.java
@@ -58,6 +58,8 @@ public class XtextDamagerRepairer extends DefaultDamagerRepairer {
// find latest node that covers the start of the change
while(node != null && start == null) {
if (node instanceof CompositeNode) {
+ if (((CompositeNode) node).getChildren().isEmpty())
+ break;
for(AbstractNode child: ((CompositeNode) node).getChildren()) {
if (child.getTotalOffset() <= offset && child.getTotalOffset() + child.getTotalLength() >= offset) {
node = child;