Bug 125323 Add isAncestorOf method to ResourceMapping
It would be helpful to have an isAncestorOf method on ResourceMapping. Ideally, it would be abstract but for now, it would need a defautl implementation. I will attah a patch.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/CompositeResourceMapping.java
* @see org.eclipse.core.internal.resources.mapping.ResourceMapping#getProjects()
     */
    public IProject[] getProjects() {
        return projects;
    }
    
    /* (non-Javadoc)
     * @see org.eclipse.core.internal.resources.mapping.ResourceMapping#getTraversals(org.eclipse.core.internal.resources.mapping.ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)
     */
    public ResourceTraversal[] getTraversals(ResourceMappingContext context,
            IProgressMonitor monitor) throws CoreException {
        if (monitor == null)
            monitor = new NullProgressMonitor();
        try {
            monitor.beginTask(null, 100 * mappings.length);
            List result = new ArrayList();
            for (int i = 0; i < mappings.length; i++) {
                ResourceMapping mapping = mappings[i];
                result.addAll(Arrays.asList(mapping.getTraversals(context, new SubProgressMonitor(monitor, 100))));
            }
            return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
        } finally {
            monitor.done();
        }
    }
	public String getModelProviderId() {
		return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
	}
}