private Collection filesInResource(IResource resource) throws CoreException{ /* Note: the default package is an IContainer that has all other packages as subfolders. * Eclipse treats the "default package" as the project itself. Thus, this method will return ALL java * files in the project when invoked on the default package resource.
private Collection filesInResource(IResource resource) throws CoreException { /* * Note: the default package is an IContainer that has all other * packages as subfolders. Eclipse treats the "default package" as the * project itself. Thus, this method will return ALL java files in the * project when invoked on the default package resource.
	private Collection filesInResource(IResource resource) throws CoreException{				/* Note: the default package is an IContainer that has all other packages as subfolders.		 * Eclipse treats the "default package" as the project itself. Thus, this method will return ALL java		 * files in the project when invoked on the default package resource.		 */		if (resource instanceof IContainer)				{			AbstractFilesCollector collector = FilesCollectorFactory.getFilesCollector((IContainer)resource);			return collector.getFiles();		}else{			Collection<IResource> result = new ArrayList<IResource>();			result.add(resource);						// For a single file resource, if we have a java file, attempt to add its corresponding class file,			// and vice versa, so that the analysis can proceed.			if (resource.getFileExtension().equalsIgnoreCase("java")){				result.add(resource.getParent().findMember(Util.changeExtension(resource.getName(), "class")));							}else if (resource.getFileExtension().equalsIgnoreCase("class")){				result.add(resource.getParent().findMember(Util.changeExtension(resource.getName(), "java")));							}			return result;					}				}	