Vector matchingProjects = new Vector();
boolean allProjectsMatch = false;
for (int i = 0; i < projects.length; i++) {
Project project = projects[i];
for (int j = 0; j < includes.length && !allProjectsMatch; j++) {
StringTokenizer tok =
new StringTokenizer(includes[j], File.separator);
String projectNamePattern = tok.nextToken();
if (projectNamePattern.equals("**")) {
// if an include pattern starts with '**',
// all projects match
allProjectsMatch = true;
} else
if (match(projectNamePattern, project.getName())) {
matchingProjects.addElement(project);
break;
}
}
}