Don't show safe delete dialog when there's nothing to delete (e.g. the extension returned no primary/secondary elements)

This commit is contained in:
Alexander Kirillin
2012-05-24 20:40:18 +04:00
parent d5602da28f
commit eea3338114
@@ -129,8 +129,10 @@ public class SafeDeleteHandler implements RefactoringActionHandler {
};
SafeDeleteDialog dialog = new SafeDeleteDialog(project, elementsToDelete, callback);
dialog.show();
if (elementsToDelete.length > 0) {
SafeDeleteDialog dialog = new SafeDeleteDialog(project, elementsToDelete, callback);
dialog.show();
}
}
}
}