Bug 38734 [Navigator] PasteAction should get clipboard contents only when needed
build 20030605 PasteAction.updateSelection checks whether there is a valid paste target after getting the clipboard contents. The paste target check does not involve the clipboard content and should therefore be done earlier, before reading the clipboard. The method also reads the FileTransfer data from the clipboard to check if the paste action should be enabled if there is no resource data. It does not actually use the file data. The new Clipboard.getAvailableTypes API should be used instead.
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;