PsiElement (@NotNull final String newElementName) { final PsiElement newString = PyElementGenerator.getInstance(myElement.getProject()).createStringLiteral(myStringLiteral, newElementName); myStringLiteral.replace(newString); return newString; }