/* Check if the Archive is being deleted */
boolean includesArchive = includesArchive(fSelection);
/* Create Dialog and open if confirmation required */
ConfirmDialog dialog = new ConfirmDialog(fShell, Messages.DeleteTypesAction_CONFIRM_DELETE, Messages.DeleteTypesAction_NO_UNDO, getMessage(elements, includesArchive), null);
return dialog.open() == IDialogConstants.OK_ID;
}
private String getMessage(List<?> elements, boolean includesArchive) {
INewsBin archive = CoreUtils.findArchive();
int archiveNewsCount = (archive != null) ? archive.getNewsCount(INews.State.getVisible()) : 0;