diff --git a/plugins/IntelliLang/java-support/org/intellij/plugins/intelliLang/inject/java/ConcatenationInjector.java b/plugins/IntelliLang/java-support/org/intellij/plugins/intelliLang/inject/java/ConcatenationInjector.java index 3cb3524a3075..15c79cbaa3c5 100644 --- a/plugins/IntelliLang/java-support/org/intellij/plugins/intelliLang/inject/java/ConcatenationInjector.java +++ b/plugins/IntelliLang/java-support/org/intellij/plugins/intelliLang/inject/java/ConcatenationInjector.java @@ -297,7 +297,10 @@ public class ConcatenationInjector implements ConcatenationAwareInjector { private boolean processCommentInjections(PsiVariable owner) { Ref causeRef = Ref.create(); - BaseInjection injection = InjectorUtils.findCommentInjection(owner, LanguageInjectionSupport.JAVA_SUPPORT_ID, causeRef); + PsiElement anchor = owner.getFirstChild() instanceof PsiComment? + (owner.getModifierList() != null? owner.getModifierList() : owner.getTypeElement()) : owner; + if (anchor == null) return true; + BaseInjection injection = InjectorUtils.findCommentInjection(anchor, LanguageInjectionSupport.JAVA_SUPPORT_ID, causeRef); return injection == null || processCommentInjectionInner(owner, causeRef.get(), injection); }