Bug 34769 [Navigator] F2/F5 actions not enabled/disabled properly when closing/opening project
bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/navigator/PasteAction.java
* 
 * @return the actual target of the paste action
 */
private IResource getTarget() {
	List selectedResources = getSelectedResources();
	
	for (int i = 0; i < selectedResources.size(); i++) {
		IResource resource = (IResource)selectedResources.get(i);
		
		if (resource instanceof IProject && !((IProject)resource).isOpen())
			return null;
		if (resource.getType() == IResource.FILE)
			resource = resource.getParent();
		if (resource != null)
			return resource;
	}
	return null;
}
/**
 * Returns whether any of the given resources are linked resources.
 * 
 * @param resources resource to check for linked type. may be null
 * @return true=one or more resources are linked. false=none of the 
 * 	resources are linked
 */
private boolean isLinked(IResource[] resources) {
	if (resources != null) {
		for (int i = 0; i < resources.length; i++) {
			if (resources[i].isLinked()) {
				return true;