use of net.sourceforge.pmd.eclipse.ui.views.actions.ProjectFilterAction in project pmd-eclipse-plugin by pmd.
the class ViolationOverviewMenuManager method createProjectFilterMenu.
/**
* Create the Menu for filtering Projects
*
* @param manager, the MenuManager
*/
private void createProjectFilterMenu(IMenuManager manager) {
final List<AbstractPMDRecord> projectFilterList = this.overview.getProjectFilterList();
final List<ProjectRecord> projectList = new ArrayList<ProjectRecord>();
// We get a List of all Projects
final AbstractPMDRecord[] projects = this.overview.getAllProjects();
for (int i = 0; i < projects.length; i++) {
final ProjectRecord project = (ProjectRecord) projects[i];
// we add a FilterAction for it
if (project.hasMarkers()) {
// NOPMD by Herlin on 09/10/06 15:03
final Action projectFilterAction = new ProjectFilterAction(project, this.overview);
// we set it as "visible"
if (!projectFilterList.contains(projects[i])) {
// NOPMD by Herlin on 09/10/06 15:04
projectFilterAction.setChecked(true);
}
manager.add(projectFilterAction);
projectList.add(project);
}
}
manager.add(new Separator());
}
Aggregations