boolean (@NotNull PsiElement hostElement, @NotNull Place place) { TextRange hostElementRange = hostElement.getTextRange(); boolean intersects = false; for (PsiLanguageInjectionHost.Shred shred : place) { PsiLanguageInjectionHost shredHost = shred.getHost(); if (shredHost != null && shredHost.getTextRange().intersects(hostElementRange)) { intersects = true; break; } } return intersects; }