currentSelection = getLogEntry(ss);
ILogEntry currentSelection = getLogEntry(ss);
	private Action getRevertChangesAction() {		if (revertChangesAction == null) {			revertChangesAction = new Action() {				public void run() {					ISelection selection = getSelection();					if (!(selection instanceof IStructuredSelection)) return;					final IStructuredSelection ss = (IStructuredSelection)selection;					if (ss.size() == 1) {						if (!MessageDialog.openConfirm(getSite().getShell(), getText(), Policy.bind("HistoryView.confirmRevertRevision", resource.getFullPath().toString()))) return;					} else {						if (!MessageDialog.openConfirm(getSite().getShell(), getText(), Policy.bind("HistoryView.confirmRevertRevisions", resource.getFullPath().toString()))) return;					}					BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {						public void run() {							ILogEntry firstElement = getFirstElement();							ILogEntry lastElement = getLastElement();							final SVNUrl path1 = firstElement.getResource().getUrl();							final SVNRevision revision1 = firstElement.getRevision();							final SVNUrl path2 = lastElement.getResource().getUrl();							final SVNRevision revision2 = new SVNRevision.Number(lastElement.getRevision().getNumber() - 1);							final IResource[] resources = { resource };							try {								WorkspaceAction mergeAction = new WorkspaceAction() {									protected void execute(IAction action) throws InvocationTargetException, InterruptedException {										new MergeOperation(HistoryView.this, resources, path1, revision1, path2, revision2).run();      									}																	};								mergeAction.run(null);							} catch (Exception e) {								MessageDialog.openError(getSite().getShell(), revertChangesAction.getText(), e.getMessage());   															}						}											});				}			};		}		ISelection selection = getSelection();		if (selection instanceof IStructuredSelection) {			IStructuredSelection ss = (IStructuredSelection)selection;			if (ss.size() == 1) {				currentSelection = getLogEntry(ss);      				revertChangesAction.setText(Policy.bind("HistoryView.revertChangesFromRevision", "" + currentSelection.getRevision().getNumber()));			}			if (ss.size() > 1) {				ILogEntry firstElement = getFirstElement();				ILogEntry lastElement = getLastElement();				revertChangesAction.setText(Policy.bind("HistoryView.revertChangesFromRevisions", "" + lastElement.getRevision().getNumber(), "" + firstElement.getRevision().getNumber()));			}		}		revertChangesAction.setImageDescriptor(SVNUIPlugin.getPlugin().getImageDescriptor(ISVNUIConstants.IMG_MERGE));		return revertChangesAction;	}