public void scanProject(Project project) {
try {
Package[] packages = project.getPackages();
if (packages != null) {
for (int i = 0; i < packages.length; i++) {
Package item = packages[i];
// replace '.' by file seperator because the patterns are
// using file seperator syntax (and we can use the match
// methods this way).
String name =
project.getName()
+ File.separator
+ item.getName().replace('.', File.separatorChar);
if (isIncluded(name) && !isExcluded(name)) {
packagesIncluded.addElement(item);
}
}
}