Skip to content

Commit

Permalink
Fixes regression from 301b01b
Browse files Browse the repository at this point in the history
* FileNameResourceCollectorVisitor
 * Refactoring commit 301b01b changed the filter.accept logic and return
   statement values. As such, the visitor failed to recurse any further
   into projects and folders.
  • Loading branch information
Paul Richardson committed Oct 25, 2013
1 parent 0067e5f commit 0f631c4
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -1213,14 +1213,20 @@ public FileNameResourceCollectorVisitor(String name) {

@Override
public boolean visit(IResource resource) {
if (! resource.exists() || resource.getType() != IResource.FILE || getResourceFilter().accept(resource))
return false;
/*
* Always needs to return true since the search will not recurse into
* projects and folders!
*
* However, we only add the resource if it matches the name.
*/
if (! resource.exists() || resource.getType() != IResource.FILE || ! getResourceFilter().accept(resource))
return true;

IPath path = resource.getFullPath();
// Do not process file names staring with '.' since these
// are considered reserved for Eclipse specific files
if (path.lastSegment().charAt(0) == '.')
return false;
return true;

if (removeExtension)
path = path.removeFileExtension();
Expand Down

0 comments on commit 0f631c4

Please sign in to comment.