}
private final List<DeleteError> myErrors = new ArrayList<DeleteError>();
public Collection<PsiElement> askUserToDeletePsiElements(Collection<PsiElement> ownedReferences, String elementDisplayName) {
SelectElementsToDeleteDialog dialog = new SelectElementsToDeleteDialog(new ArrayList<PsiElement>(ownedReferences), myProject);
dialog.show();
if (dialog.isOK()) {
return dialog.getSelectedItems();
}
else {
return new ArrayList<PsiElement>();
}