Examples of GitHistoryPage


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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    IStructuredSelection sel = getSelection(page);
    return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
  }
View Full Code Here

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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    IStructuredSelection sel = getSelection(page);
    return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
  }
View Full Code Here

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

* Handler to blame a path on a selected commit
*/
public class ShowBlameHandler extends AbstractHistoryCommandHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    GitHistoryPage page = getPage(event);
    Object input = page.getInputInternal().getSingleItem();
    if (input == null)
      return null;
    Repository repo = getRepository(event);
    if (repo == null)
      return null;
    String path = getPath(repo, page);
    if (path == null)
      return null;
    RevCommit commit = getSelectedCommit(event);
    if (commit == null)
      return null;

    try {
      IFileRevision revision = CompareUtils.getFileRevision(path, commit,
          repo, null);
      if (revision == null)
        return null;

      IStorage storage = revision.getStorage(new NullProgressMonitor());
      BlameOperation op = new BlameOperation(repo, storage, path, commit,
          HandlerUtil.getActiveShell(event), page.getSite().getPage());
      JobUtil.scheduleUserJob(op, UIText.ShowBlameHandler_JobName,
          JobFamilies.BLAME);
    } catch (IOException e) {
      Activator.showError(UIText.ShowBlameHandler_errorMessage, e);
    } catch (CoreException e) {
View Full Code Here

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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    IStructuredSelection sel = getSelection(page);
    return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
  }
View Full Code Here

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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;

    IStructuredSelection selection = getSelection(page);
    if (selection.size() != 1)
View Full Code Here

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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    return getSelection(page).size() == 2;
  }
View Full Code Here

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

    job.schedule();
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    IStructuredSelection selection = getSelection(page);
    if (selection.size() != 1)
      return false;
View Full Code Here

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

    return null;
  }

  @Override
  public boolean isEnabled() {
    GitHistoryPage page = getPage();
    if (page == null)
      return false;
    int size = getSelection(page).size();
    if (size != 1)
      return false;
    return page.getInputInternal().isSingleFile();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.