Package org.eclipse.egit.ui.internal.history

Examples of org.eclipse.egit.ui.internal.history.HistoryPageInput


    // Show history view for path
    try {
      IHistoryView part = (IHistoryView) page.showView(
          IHistoryView.VIEW_ID, null, IWorkbenchPage.VIEW_VISIBLE);
      HistoryPageInput input = createHistoryPageInputWhenEditorOpened();
      part.showHistoryFor(input);
    } catch (PartInitException e) {
      Activator.handleError("Error displaying blame annotations", e, //$NON-NLS-1$
          false);
    }
View Full Code Here


      IResource resource = (IResource) storage;
      if (startCommit != null) {
        return new BlameHistoryPageInput(repository, startCommit,
            resource);
      } else {
        return new HistoryPageInput(repository,
            new IResource[] { resource });
      }
    } else if (!repository.isBare()) {
      File file = new File(repository.getWorkTree(), path);
      if (startCommit != null) {
        return new BlameHistoryPageInput(repository, startCommit,
            file);
      } else {
        return new HistoryPageInput(repository,
            new File[] { file });
      }
    } else {
      return new HistoryPageInput(repository);
    }
  }
View Full Code Here

    // GenericHistoryView only shows a selection of a single resource (see
    // bug 392949), so prepare our own history page input which can contain
    // multiple files to support showing more than one file in history.
    // It's also necessary for a single file that is outside of the
    // workspace (and as such is not an IResource).
    HistoryPageInput historyPageInput = getHistoryPageInput(selection);
    return new ShowInContext(historyPageInput, new StructuredSelection(elements));
  }
View Full Code Here

      // Don't return input if nodes from different repositories are selected
      if (repo != nodeRepository)
        return null;
    }
    if (repo != null)
      return new HistoryPageInput(repo, files.toArray(new File[files.size()]));
    else
      return null;
  }
View Full Code Here

      File file = new File(repository.getWorkTree(), sourcePath);
      BlameHistoryPageInput input = new BlameHistoryPageInput(repository,
          revision.getCommit(), file);
      part.showHistoryFor(input);
    } else {
      HistoryPageInput input = new BlameHistoryPageInput(repository,
          revision.getCommit());
      part.showHistoryFor(input);
    }
  }
View Full Code Here

      IResource[] resources = getSelectedResources(event);
      if (resources.length == 1) {
        view.showHistoryFor(resources[0]);
        return null;
      }
      HistoryPageInput list = new HistoryPageInput(repo, resources);
      view.showHistoryFor(list);
    } catch (PartInitException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
    return null;
View Full Code Here

  }

  protected Repository getRepository(GitHistoryPage page) {
    if (page == null)
      return null;
    HistoryPageInput input = page.getInputInternal();
    if (input == null)
      return null;

    final Repository repository = input.getRepository();
    return repository;
  }
View Full Code Here

    if (selection.size() == 2) {
      Iterator<?> it = selection.iterator();
      RevCommit commit1 = (RevCommit) it.next();
      RevCommit commit2 = (RevCommit) it.next();

      HistoryPageInput pageInput = getPage(event).getInputInternal();
      Object input = pageInput.getSingleItem();
      Repository repository = pageInput.getRepository();
      IWorkbenchPage workBenchPage = HandlerUtil
          .getActiveWorkbenchWindowChecked(event).getActivePage();
      // IFile and File just for compatibility; the action should not be
      // available in this case in the UI
      if (input instanceof IFile) {
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.internal.history.HistoryPageInput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.