Package org.eclipse.egit.ui.internal.push

Examples of org.eclipse.egit.ui.internal.push.PushBranchWizard


      final Display display = Display.getDefault();
      display.asyncExec(new Runnable() {

        public void run() {
          try {
            PushBranchWizard pushWizard = null;
            String fullBranch = repository.getFullBranch();
            if (fullBranch != null
                && fullBranch.startsWith(Constants.R_HEADS)) {
              Ref ref = repository.getRef(fullBranch);
              pushWizard = new PushBranchWizard(repository, ref);
            } else {
              pushWizard = new PushBranchWizard(repository,
                  commit.getId());
            }
            WizardDialog wizardDialog = new WizardDialog(display
                .getActiveShell(), pushWizard);
            wizardDialog.setHelpAvailable(true);
View Full Code Here


public class PushBranchActionHandler extends RepositoryActionHandler {
  public Object execute(ExecutionEvent event) throws ExecutionException {
    Repository repository = getRepository(true, event);

    try {
      PushBranchWizard wizard = null;
      Ref ref = getBranchRef(repository);
      if (ref != null) {
        wizard = new PushBranchWizard(repository, ref);
      } else {
        ObjectId id = repository.resolve(repository.getFullBranch());
        wizard = new PushBranchWizard(repository, id);
      }
      WizardDialog dlg = new WizardDialog(getShell(event), wizard);
      dlg.open();
    } catch (IOException ex) {
      Activator.handleError(ex.getLocalizedMessage(), ex, false);
View Full Code Here

          config.getName(), false);
      op.start();
    } else {
      Ref head = getHeadIfSymbolic(repository);
      if (head != null) {
        PushBranchWizard pushBranchWizard = new PushBranchWizard(
            repository, head);

        WizardDialog dlg = new WizardDialog(shell,
            pushBranchWizard);
        dlg.open();
View Full Code Here

    try {
      switch (node.getType()) {
      case REF:
        Ref ref = (Ref) node.getObject();
        pushWiz = new PushBranchWizard(node.getRepository(), ref);
        break;
      case TAG:
        pushWiz = createPushTagsWizard(nodes);
        break;
      case REPO:
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    PlotCommit commit = (PlotCommit) getSelection(event).getFirstElement();
    final Repository repo = getRepository(event);

    try {
      PushBranchWizard wizard = null;
      Ref localBranch = null;
      for (int i = 0; i < commit.getRefCount(); i++) {
        Ref currentRef = commit.getRef(i);
        if (localBranch == null
            && currentRef.getName().startsWith(Constants.R_HEADS))
          localBranch = currentRef;
      }
      if (localBranch == null)
        wizard = new PushBranchWizard(repo, commit.getId());
      else
        wizard = new PushBranchWizard(repo, localBranch);
      WizardDialog dlg = new WizardDialog(
          HandlerUtil.getActiveShellChecked(event),
          wizard);
      dlg.setHelpAvailable(true);
      dlg.open();
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.internal.push.PushBranchWizard

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.