Set<UsageInfo> (@NotNull XmlElement xmlElement) { String s = xmlElement.getText(); if (StringUtil.isEmptyOrSpaces(s)) return Collections.emptySet(); int start = s.indexOf(mySelectedString); if (start == -1) return Collections.emptySet(); Set<UsageInfo> usages = new HashSet<>(); List<TextRange> ranges = getPropertiesTextRanges(s); TextRange elementTextRange = xmlElement.getTextRange(); PsiFile containingFile = xmlElement.getContainingFile(); do { int end = start + mySelectedString.length(); boolean isInsideProperty = isIntersectWithRanges(ranges, start, end); if (!isInsideProperty) { usages .add(new UsageInfo(containingFile, elementTextRange.getStartOffset() + start, elementTextRange.getStartOffset() + end)); } start = s.indexOf(mySelectedString, end); } while (start != -1); return usages; }