@Override public void execute() { List<Project> selectedProjects = ProjectListBox.getProjectListBox().getProjectList().getSelectedProjects(); if (selectedProjects.size() == 1) { downloadSource(selectedProjects.get(0)); } else { // The user needs to select only one project. ErrorReporter.reportInfo(MESSAGES.wrongNumberProjectsSelected()); } }
@Override public void execute() { List<Project> selectedProjects = ProjectListBox.getProjectListBox().getProjectList().getSelectedProjects(); if (selectedProjects.size() > 0) { // Show one confirmation window for selected projects. if (deleteConfirmation(selectedProjects)) { for (Project project : selectedProjects) { deleteProject(project); } } } else { // The user can select a project to resolve the // error. ErrorReporter.reportInfo(MESSAGES.noProjectSelectedForDelete()); } }