final String commit2Path = getRenamedPath(gitPath, commit2);
CompareUtils.openInCompare(commit1, commit2, commit1Path,
commit2Path, repo, workBenchPage);
} else if (input instanceof IResource) {
CompareTreeView view;
try {
view = (CompareTreeView) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage()
.showView(CompareTreeView.ID);
view.setInput(new IResource[] { (IResource) input },
commit1.getId().name(), commit2.getId().name());
} catch (PartInitException e) {
Activator.handleError(e.getMessage(), e, true);
}
} else if (input == null) {
CompareTreeView view;
try {
view = (CompareTreeView) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage()
.showView(CompareTreeView.ID);
view.setInput(repository, commit1.getId().name(), commit2
.getId().name());
} catch (PartInitException e) {
Activator.handleError(e.getMessage(), e, true);
}
}