// assert all resources map to the same repository
if (repo == null)
return null;
final IResource[] resources = getSelectedResources(event);
CompareTargetSelectionDialog dlg = new CompareTargetSelectionDialog(
getShell(event), repo, resources.length == 1 ? resources[0]
.getFullPath().lastSegment() : null);
if (dlg.open() != Window.OK)
return null;
final String refName = dlg.getRefName();
IWorkbenchPage workBenchPage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
try {
CompareUtils