String (@NotNull PsiElement firstProperty, @NotNull PsiElement lastProperty) { final TextRange replacedRange = new TextRange(firstProperty.getTextOffset(), lastProperty.getTextRange().getEndOffset()); final String propertiesText = replacedRange.substring(firstProperty.getContainingFile().getText()); if (firstProperty != lastProperty) { final PsiElement parent = firstProperty.getParent(); parent.deleteChildRange(firstProperty.getNextSibling(), lastProperty); } return propertiesText; }