Bug 111887 [EFS] Provide IFileStoreEditorInput (+ impl) for new IFileStore
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
* @param originalSelection the original selection, possibly empty
     * @return list of resources (element type: <code>IResource</code>), 
     *    possibly empty
     */
    public static List computeSelectedResources(
            IStructuredSelection originalSelection) {
        List resources = null;
        for (Iterator e = originalSelection.iterator(); e.hasNext();) {
            Object next = e.next();
            Object resource = null;
            if (next instanceof IResource) {
                resource = next;
            } else if (next instanceof IAdaptable) {
                resource = ((IAdaptable) next).getAdapter(IResource.class);
            }
            if (resource != null) {
                if (resources == null) {
                    
                    
                    resources = new ArrayList(originalSelection.size());
                }
                resources.add(resource);
            }
        }
        if (resources == null) {
            return Collections.EMPTY_LIST;
        }
        return resources;
        
    }