throws IncorrectOperationException {
PsiElement parent = elements[0].getParent();
PsiElement surrounder = createSurrounder(project);
if (surrounder == null) {
throw new IncorrectOperationException("Can't surround statements!");
}
surrounder = parent.addBefore(surrounder, elements[0]);
final PsiElement elementToAdd = findElementToAdd(surrounder);
if (elementToAdd == null) {
parent.deleteChildRange(surrounder, surrounder);
throw new IncorrectOperationException("Can't surround statements!");
}
for (PsiElement element : elements) {
ASTNode node = element.getNode();
final ASTNode copyNode = node.copyElement();