// check to see if the search pattern is qualified by a file location
// if this is the case then we can use file scoping rules to prune the matches
IFile targetFile = null;
if (pattern instanceof ComponentSearchPattern)
{
ComponentSearchPattern componentSearchPattern = (ComponentSearchPattern)pattern;
targetFile = componentSearchPattern.getFile();
}
// here we should have in scope only referenced files
IFile[] files = scope.enclosingFiles();
for (int i = 0; i < files.length; i++)