code: public List<IVdmSourceUnit> getFiles(IVdmProject project,
  			IResource resource, IContentType contentTypeId)
  			throws CoreException
  	{
  		List<IVdmSourceUnit> list = new Vector<IVdmSourceUnit>();
  
  		if (resource instanceof IFolder)
  		{
  			if (resource.getLocation().lastSegment().startsWith("."))// skip
  				return list;
  			// . folders like.svn
  			for (IResource res : ((IFolder) resource).members(IContainer.INCLUDE_PHANTOMS
  					| IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS))
  			{
  
  				list.addAll(getFiles(project, res, contentTypeId));
  			}
  		}
  		// check if it is a IFile and that there exists a known content type for
  		// this file and the project
  		else if (resource instanceof IFile)
  		{
  			// if (contentTypeId != null
  			// && contentTypeId.isAssociatedWith(resource.toString()) &&
  			// !resource.getName().startsWith("~"))
  			if (project.isModelFile((IFile) resource))
  			{
  				list.add(getVdmSourceUnit((IFile) resource));
  			}
  		}
  		return list;
  	}
docs: *
  Recursive search of a project for files based on the content type
  
  @param project
  the project to search
  @param resource
  the resource currently selected to be searched
  @param contentTypeId
  a possibly null content type id, if null it is just checked that a content type exist for the file
  @return a list of IFiles
  @throws CoreException