boolean (PsiFragment f) { final int start = getStartOffset(); final int end = getEndOffset(); final int fStart = f.getStartOffset(); final int fEnd = f.getEndOffset(); return Comparing.equal(f.getFile(), getFile()) && start <= fStart && end >= fEnd; }