private String getFileRevisionLabel(FileRevisionTypedElement element) {
   IFileRevision fileObject = element.getFileRevision();
   if (fileObject instanceof LocalFileRevision) {
     return NLS.bind(
         Messages.GitCompareFileRevisionEditorInput_localRevision,
         new Object[] {element.getName(), element.getTimestamp()});
   }
   return NLS.bind(
       Messages.GitCompareFileRevisionEditorInput_repository,
       new Object[] {element.getName(), element.getContentIdentifier()});
 }
 private String getShortName(ITypedElement element) {
   if (element instanceof FileRevisionTypedElement) {
     FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
     return fileRevisionElement.getName();
   } else if (element instanceof LocalResourceTypedElement) {
     LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element;
     return typedContent.getResource().getName();
   }
   return element.getName();
 }