Bug 25137 Paste enabled with deleted file on clipboard [ccp]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteResourcesFromClipboardAction.java
private Clipboard fClipboard;
	protected PasteResourcesFromClipboardAction(IWorkbenchSite site, Clipboard clipboard) {
		super(site);
		Assert.isNotNull(clipboard);
		fClipboard= clipboard;
	}
	
    /*
     * @see SelectionDispatchAction#selectionChanged(IStructuredSelection)
     */
	protected void selectionChanged(IStructuredSelection selection) {
		setEnabled(canOperateOn(selection));
	}
	
    /*
     * @see SelectionDispatchAction#run(IStructuredSelection)
     */
	public void run(IStructuredSelection selection) {
		IResource[] resourceData = getClipboardResources();		
		if (resourceData == null || resourceData.length == 0){
			if (canPasteFiles(selection))
				pasteFiles(selection.getFirstElement());
			return;
		}	
			 
		pasteResources(selection, resourceData);
	}