/** * If this validator recognizes the project nature, whether included or excluded, return the * name filter which describes the nature. Otherwise return null. */ ValidatorNameFilter findProjectNature(String projId) { if (projId == null) { return null; } if (_projectNatureFilters == null) { // If no tag is specified, this validator is configured on all IProjects return null; } for (int i = 0; i < _projectNatureFilters.length; i++) { ValidatorNameFilter filter = _projectNatureFilters[i]; // In this case, we're not checking if the project is an instance of the filter class, // but if it has the Nature specified in the filter class. String projectNatureID = filter.getNameFilter(); if (projId.equals(projectNatureID)) { return filter; } } return null; }
public List getNameFilters() { List nameFilters = new ArrayList(); if (_filters != null && _filters.length > 0) { for (int i = 0; i < _filters.length; i++) { ValidatorFilter filter = _filters[i]; ValidatorNameFilter nameFilter = filter.get_nameFilter(); if (nameFilter != null) { nameFilters.add(nameFilter.getNameFilter()); } } } return nameFilters; }
if (nature.equals(pn.getNameFilter()) && !pn.isInclude()) { iterator.remove(); break;
if (pn.isInclude()) { noneIncluded = false; add(pn.getNameFilter(), vmd);