public boolean visit(IResourceDelta delta) throws CoreException {
// Should the visitor keep iterating in current directory
boolean keepLooking = false;
IResource resource = delta.getResource();
IResourceInfo rcInfo = config.getResourceInfo(resource.getProjectRelativePath(), false);
IFolderInfo fo = null;
boolean isSource = isSource(resource.getProjectRelativePath());
if (rcInfo instanceof IFolderInfo) {
fo = (IFolderInfo) rcInfo;
}
// What kind of resource change has occurred
if (/* !rcInfo.isExcluded() && */isSource) {
if (resource.getType() == IResource.FILE) {
String ext = resource.getFileExtension();
switch (delta.getKind()) {
case IResourceDelta.ADDED:
if (!generator.isGeneratedResource(resource)) {
// This is a source file so just add its container
if (fo == null || fo.buildsFileType(ext)) {
generator.appendModifiedSubdirectory(resource);
}
}
break;
case IResourceDelta.REMOVED:
// we get this notification if a resource is moved too
if (!generator.isGeneratedResource(resource)) {
// This is a source file so just add its container
if (fo == null || fo.buildsFileType(ext)) {
generator.appendDeletedFile(resource);
generator.appendModifiedSubdirectory(resource);
}
}
break;