IFile file = (IFile)resource; ISVNRemoteFile remoteFile = (ISVNRemoteFile)currentSelection.getRemoteResource();
ISelection selection = getSelection(); if(!(selection instanceof IStructuredSelection)) return; IStructuredSelection ss = (IStructuredSelection) selection; ISVNRemoteFile remoteFile = (ISVNRemoteFile)getLogEntry(ss).getRemoteResource();
	private Action getGetContentsAction() {		if (getContentsAction == null) {			getContentsAction = getContextMenuAction(Policy.bind("HistoryView.getContentsAction"), new IWorkspaceRunnable() { //$NON-NLS-1$				public void run(IProgressMonitor monitor) throws CoreException {					IFile file = (IFile)resource;					ISVNRemoteFile remoteFile = (ISVNRemoteFile)currentSelection.getRemoteResource();					monitor.beginTask(null, 100);					try {                        if (remoteFile != null) {    						if(confirmOverwrite()) {    							InputStream in = ((IResourceVariant)remoteFile).getStorage(new SubProgressMonitor(monitor,50)).getContents();    							file.setContents(in, false, true, new SubProgressMonitor(monitor, 50));				    						}                        }					} catch (TeamException e) {						throw new CoreException(e.getStatus());					} finally {						monitor.done();					}				}			});			WorkbenchHelp.setHelp(getContentsAction, IHelpContextIds.GET_FILE_CONTENTS_ACTION);		}		return getContentsAction;	}