Bug 25137 Paste enabled with deleted file on clipboard [ccp]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteResourcesFromClipboardAction.java
return ClipboardActionUtil.getFirstResource(selection) instanceof IContainer;	
		
		return canActivateCopyRefactoring(resourceData, ClipboardActionUtil.getFirstResource(selection));
	}
    private boolean canPasteFiles(IStructuredSelection selection) {
		return (getClipboardFiles() != null) && canPasteFilesOn(selection.getFirstElement());
    }
    private static boolean canPasteFilesOn(Object target) {
    	boolean isPackageFragment= target instanceof IPackageFragment;
		boolean isJavaProject= target instanceof IJavaProject;
		boolean isPackageFragmentRoot= target instanceof IPackageFragmentRoot;
		boolean isContainer= target instanceof IContainer;
		
		if (!(isPackageFragment || isJavaProject || isPackageFragmentRoot || isContainer)) 
			return false;
			
		if (isContainer) {
			IContainer container= (IContainer)target;
			if (!container.isReadOnly())
				return true;
		} else {
			IJavaElement element= (IJavaElement)target;
			if (!element.isReadOnly()) 
				return true;
		}
		return false;	
    }
	private static boolean canActivateCopyRefactoring(IResource[] resourceData, IResource selectedResource) {
		try{
			CopyRefactoring ref= createCopyRefactoring(resourceData);