Bug 32656 Open/Close project in package explorer looses selection on java-projects. [package explorer]
Not on non-java projects, which looks wrong when multiple java- and non-java-projects are opened/closed.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteResourcesFromClipboardAction.java
return false;
				
		/*
		 * special case: if both source references and resources are in clipboard - disable this action
		 * if a compilation unit is selected.
		 * this is important in the case when a type is copied to the clipboard - we put also its compilation unit
		 */
		TypedSource[] typedSource= getClipboardSourceReference();
		if (selection.getFirstElement() instanceof ICompilationUnit && typedSource != null && typedSource.length != 0)
			return false;
		
		if (StructuredSelectionUtil.getResources(selection).length != 1)
			return false;
		
		if (resourceData == null)
			return ClipboardActionUtil.getFirstResource(selection) instanceof IContainer;	
		
		if (! allResourcesExist(resourceData))
			return false;
			
		return canActivateCopyRefactoring(getShell(), resourceData, ClipboardActionUtil.getFirstResource(selection));
	}
	
    private static boolean allResourcesExist(IResource[] resourceData) {
    	for (int i= 0; i < resourceData.length; i++) {
            if (! resourceData[i].exists())
       	        return false;
        }
        return true;
    }