Bug 242208 [Markers] Filtering problems by working set doesn't take into account new files
Build ID: I20080617-2000 Steps To Reproduce: 1.Create a Java project 2.Create a working set that contains only a subset of source files 3.Create a filter in the problems view, whose scope is set to the working set 4.The filter works ok 5.Create a new source file that is included inside the working set 6.No errors are shown for this file 7.Deactivate the filter and activate it again 8.The errors are now shown. More information: I expect to get the step 8 result without doing the 7th step.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
private static final String TAG_WORKING_SET = "workingSet"; 
	
	private static String USER = "USER"; 
	/**
	 * Returns the set of projects that contain the given set of resources.
	 * 
	 * @param resources
	 * @return IProject[]
	 */
	static IProject[] getProjects(IResource[] resources) {
		if (resources == null)
			return EMPTY_PROJECT_ARRAY;
		Collection projects = getProjectsAsCollection(resources);
		return (IProject[]) projects.toArray(new IProject[projects.size()]);
	}
	/**
	 * Return the projects for the elements.
	 * 
	 * @param elements
	 *            collection of IResource or IResourceMapping
	 * @return Collection of IProject
	 */
	static Collection getProjectsAsCollection(Object[] elements) {
		HashSet projects = new HashSet();
		for (int idx = 0; idx < elements.length; idx++) {
			if (elements[idx] instanceof IResource) {
				projects.add(((IResource) elements[idx]).getProject());
			} else {
				IProject[] mappingProjects = (((ResourceMapping) elements[idx])
						.getProjects());