Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.CherryPickOperation


    } catch (GitAPIException e) {
      Activator.logError(e.getMessage(), e);
      return null;
    }

    final CherryPickOperation op = new CherryPickOperation(repo, commits);
    Job job = new Job(MessageFormat.format(
        UIText.CherryPickHandler_JobName,
        Integer.valueOf(commits.size()))) {
      @Override
      protected IStatus run(IProgressMonitor monitor) {
        try {
          op.execute(monitor);
          RebaseResult result = op.getResult();
          if (result.getStatus() != RebaseResult.Status.OK) {
            RebaseResultDialog.show(result, repo);
          }
        } catch (CoreException e) {
          Activator.logError(
              UIText.CherryPickOperation_InternalError, e);
        }
        return Status.OK_STATUS;
      }

      @Override
      public boolean belongsTo(Object family) {
        if (JobFamilies.CHERRY_PICK.equals(family))
          return true;
        return super.belongsTo(family);
      }
    };
    job.setUser(true);
    job.setRule(op.getSchedulingRule());
    job.schedule();
    return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.CherryPickOperation

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.