boolean (int hostStart, int hostEnd) { synchronized (myLock) { ProperTextRange query = new ProperTextRange(hostStart, hostEnd); for (PsiLanguageInjectionHost.Shred shred : myShreds) { Segment hostRange = shred.getHostRangeMarker(); if (hostRange == null) continue; TextRange textRange = ProperTextRange.create(hostRange); if (textRange.contains(query)) return true; } return false; } }