Bug 85285 [Contributions] ProjectPersistentPropertyTester should work for IResource
In 3.1 M5, we added a ProjectPersistentPropertyTester that could be used for visibility determination of object contributions to ResourceMapping. It would make sens if this could be used for IResource directly as well. This is not important enough to go into M5 but I think it is worthwhile to have it in 3.1. I will attach a patch.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/ProjectPersistentPropertyTester.java
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.ui.internal.ide.model;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IActionFilter;
import org.eclipse.ui.IResourceActionFilter;
/**
 * Property tester for detecting the exisitance of a particular persitent
 * property on all the projects of a ResourceMapping.
 *
 * @since 3.1
 */
public class ProjectPersistentPropertyTester extends PropertyTester {
    
    private static final IActionFilter filter = new WorkbenchResource() {