TextRange (@NotNull ElementManipulator<? super PsiElement> manipulator, @NotNull PsiElement element) { TextRange rangeInElement = manipulator.getRangeInElement(element); TextRange elementRange = TextRange.from(0, element.getTextLength()); if (!elementRange.contains(rangeInElement)) { LOG.error("Element range: " + elementRange + ";\n" + "manipulator range: " + rangeInElement + ";\n" + "element: " + element.getClass() + ";\n" + "manipulator: " + manipulator.getClass() + "."); } return rangeInElement; }