From: Dmitry Avdeev Date: Fri, 12 Feb 2010 11:27:18 +0000 (+0300) Subject: Struts2 path completion X-Git-Tag: 94.295~1 X-Git-Url: https://repo.or.cz/w/fedora-idea.git/commitdiff_plain/e8dc9ca95e62fc32fc6f2d2ab936d1e3e5adeedc Struts2 path completion --- diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/LegacyCompletionContributor.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/LegacyCompletionContributor.java index 1eee7a1791..6d5f7f10dd 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/LegacyCompletionContributor.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/LegacyCompletionContributor.java @@ -112,8 +112,11 @@ public class LegacyCompletionContributor extends CompletionContributor { } } else if (ref instanceof PsiDynaReference) { + int offset = startOffset - ref.getElement().getTextRange().getStartOffset(); for (final PsiReference reference : ((PsiDynaReference)ref).getReferences()) { - processReference(result, startOffset, consumer, reference); + if (reference.getRangeInElement().contains(offset)) { + processReference(result, startOffset, consumer, reference); + } } } else if (ref != null) {