Examples of PushOperationResult


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

    config.save();
  }

  private void startPush() throws IOException {
    PushOperationResult result = confirmationPage.getConfirmedResult();
    PushOperationSpecification pushSpec = result
        .deriveSpecification(confirmationPage
            .isRequireUnchangedSelected());

    PushOperationUI pushOperationUI = new PushOperationUI(repository,
        pushSpec, false);
View Full Code Here

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

      return false;
    UserPasswordCredentials credentials = repoPage.getCredentials();
    if (credentials != null)
      operation.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
          credentials.getUser(), credentials.getPassword()));
    final PushOperationResult resultToCompare;
    if (confirmPage.isShowOnlyIfChangedSelected())
      resultToCompare = confirmPage.getConfirmedResult();
    else
      resultToCompare = null;
    final Job job = new PushJob(localDb, operation, resultToCompare,
View Full Code Here

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

        spec = new PushOperationSpecification();
        for (final URIish uri : repoPage.getSelection().getPushURIs())
          spec.addURIRefUpdates(uri, ConfirmationPage
              .copyUpdates(updates));
      } else if (confirmPage.isConfirmed()) {
        final PushOperationResult confirmedResult = confirmPage
            .getConfirmedResult();
        spec = confirmedResult.deriveSpecification(confirmPage
            .isRequireUnchangedSelected());
      } else {
        final Collection<RefSpec> fetchSpecs;
        if (config != null)
          fetchSpecs = config.getFetchRefSpecs();
View Full Code Here

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

      } catch (final InvocationTargetException e) {
        return new Status(IStatus.ERROR, Activator.getPluginId(),
            UIText.PushWizard_unexpectedError, e.getCause());
      }

      final PushOperationResult result = operation.getOperationResult();
      if (!result.isSuccessfulConnectionForAnyURI()) {
        return new Status(IStatus.ERROR, Activator.getPluginId(), NLS
            .bind(UIText.PushWizard_cantConnectToAny, result
                .getErrorStringForAllURis()));
      }

      if (resultToCompare == null || !result.equals(resultToCompare)) {
        PlatformUI.getWorkbench().getDisplay().asyncExec(
            new Runnable() {
              public void run() {
                final Shell shell = PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getShell();
View Full Code Here

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

                  throws InvocationTargetException,
                  InterruptedException {
                PushOperationUI op = new PushOperationUI(
                    repository, config, true);
                try {
                  PushOperationResult result = op
                      .execute(monitor);
                  PushResultDialog dlg = new PushResultDialog(
                      getShell(), repository, result, op
                          .getDestinationString());
                  dlg.showConfigureButton(false);
View Full Code Here

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

    UIUtils.addExpansionItems(toolbar, treeViewer);
  }

  private String getResult(RefUpdateElement element) {
    StringBuilder result = new StringBuilder(EMPTY_STRING);
    PushOperationResult pushOperationResult = element
        .getPushOperationResult();
    final URIish uri = element.getUri();
    result.append(UIText.PushResultTable_repository);
    result.append(SPACE);
    result.append(uri.toString());
    result.append(Text.DELIMITER);
    result.append(Text.DELIMITER);
    String message = element.getRemoteRefUpdate().getMessage();
    if (message != null)
      result.append(message).append(Text.DELIMITER);
    StringBuilder messagesBuffer = new StringBuilder(pushOperationResult
        .getPushResult(uri).getMessages());
    trim(messagesBuffer);
    if (messagesBuffer.length() > 0)
      result.append(messagesBuffer).append(Text.DELIMITER);
    trim(result);
View Full Code Here

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

    }
    return specs;
  }

  private void startPush() throws IOException {
    PushOperationResult result = confirmationPage.getConfirmedResult();
    PushOperationSpecification pushSpec = result
        .deriveSpecification(confirmationPage
            .isRequireUnchangedSelected());

    PushOperationUI pushOperationUI = new PushOperationUI(repository,
        pushSpec, false);
View Full Code Here

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

      displayedRefSpecs = null;
      displayedRepoSelection = null;
      return;
    }

    final PushOperationResult result = operation.getOperationResult();
    resultPanel.setData(local, result);
    if (result.isSuccessfulConnectionForAnyURI()) {
      setPageComplete(true);
      confirmedResult = result;
    } else {
      final String message = NLS.bind(
          UIText.ConfirmationPage_cantConnectToAny, result
              .getErrorStringForAllURis());
      setErrorMessage(message);
      ErrorDialog
          .openError(getShell(),
              UIText.ConfirmationPage_cantConnectToAnyTitle,
View Full Code Here

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

    job.setUser(true);
    job.schedule();
    job.addJobChangeListener(new JobChangeAdapter() {
      @Override
      public void done(IJobChangeEvent event) {
        PushOperationResult result = op.getOperationResult();
        if (expectedResult == null || !expectedResult.equals(result)) {
          if (event.getResult().isOK())
            PushResultDialog.show(repository, result,
                destinationString, showConfigureButton);
          else
View Full Code Here

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

    LogListener listener = new LogListener();
    log.addLogListener(listener);

    PushOperation pop = createInvalidPushOperation();
    pop.run(new NullProgressMonitor());
    PushOperationResult result = pop.getOperationResult();
    String errorMessage = result.getErrorMessage(new URIish(INVALID_URI));
    assertNotNull(errorMessage);
    assertTrue(errorMessage.contains(INVALID_URI));

    assertTrue(listener.loggedSomething());
    assertTrue(listener.loggedException());
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.