Bug 10054 Selected markers not usable for "Selected Resources" search
1. Select a marker 2. Open Search dialog 3. Do a search with "Selected Resources" as scope The scope should consist of the resources at which the markers are attached
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchScopeFactory.java
private static JavaSearchScopeFactory fgInstance;
	private static IJavaSearchScope EMPTY_SCOPE= SearchEngine.createJavaSearchScope(new IJavaElement[] {});
	
	private JavaSearchScopeFactory() {
	}
	public static JavaSearchScopeFactory getInstance() {
		if (fgInstance == null)
			fgInstance= new JavaSearchScopeFactory();
		return fgInstance;
	}
	
	public IJavaSearchScope createJavaSearchScope(IResource[] resources) {
		if (resources == null)
			return EMPTY_SCOPE;
		Set javaElements= new HashSet(resources.length);
		addJavaElements(javaElements, resources);
		return SearchEngine.createJavaSearchScope((IJavaElement[])javaElements.toArray(new IJavaElement[javaElements.size()]));
	}
	public IJavaSearchScope createJavaSearchScope(IWorkingSet workingSet) {
		return createJavaSearchScope(workingSet.getResources());
	}
	public IJavaSearchScope createJavaSearchScope(ISelection selection) {
		if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
			Iterator iter= ((IStructuredSelection)selection).iterator();
			Set javaElements= new HashSet(((IStructuredSelection)selection).size());