void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { final PsiElement element = startElement.getParent(); if (!(element instanceof PsiCallExpression)) { return; } final PsiElement parent = element.getParent(); if (!(parent instanceof PsiExpressionStatement)) { return; } PsiReplacementUtil.replaceStatement((PsiStatement)parent, "throw " + element.getText() + ';'); }