Examples of TeamException


Examples of org.eclipse.team.core.TeamException

    final TimeZone timeZone = TimeZone.getDefault();

    final PersonIdent enteredAuthor = RawParseUtils.parsePersonIdent(author);
    final PersonIdent enteredCommitter = RawParseUtils.parsePersonIdent(committer);
    if (enteredAuthor == null)
      throw new TeamException(NLS.bind(
          CoreText.CommitOperation_errorParsingPersonIdent, author));
    if (enteredCommitter == null)
      throw new TeamException(
          NLS.bind(CoreText.CommitOperation_errorParsingPersonIdent,
              committer));

    PersonIdent authorIdent;
    if (repo.getRepositoryState().equals(
View Full Code Here

Examples of org.eclipse.team.core.TeamException

          if (ref != null)
            merge.include(ref);
          else
            merge.include(ObjectId.fromString(refName));
        } catch (IOException e) {
          throw new TeamException(CoreText.MergeOperation_InternalError, e);
        }
        if (fastForwardMode != null)
          merge.setFastForward(fastForwardMode);
        if (commit != null)
          merge.setCommit(commit.booleanValue());
        if (squash != null)
          merge.setSquash(squash.booleanValue());
        if (mergeStrategy != null) {
          merge.setStrategy(mergeStrategy);
        }
        if (message != null)
          merge.setMessage(message);
        try {
          mergeResult = merge.call();
          mymonitor.worked(1);
          if (MergeResult.MergeStatus.NOT_SUPPORTED.equals(mergeResult.getMergeStatus()))
            throw new TeamException(new Status(IStatus.INFO, Activator.getPluginId(), mergeResult.toString()));
        } catch (NoHeadException e) {
          throw new TeamException(CoreText.MergeOperation_MergeFailedNoHead, e);
        } catch (ConcurrentRefUpdateException e) {
          throw new TeamException(CoreText.MergeOperation_MergeFailedRefUpdate, e);
        } catch (CheckoutConflictException e) {
          mergeResult = new MergeResult(e.getConflictingPaths());
          return;
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(), e.getCause());
        } finally {
          ProjectUtil.refreshValidProjects(validProjects, new SubProgressMonitor(
              mymonitor, 1));
          mymonitor.done();
        }
View Full Code Here

Examples of org.eclipse.team.core.TeamException

              .submoduleSync();
          for (String path : paths)
            sync.addPath(path);
          updates = sync.call();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } finally {
          if (updates != null && !updates.isEmpty())
            repository.notifyIndexChanged();
          pm.done();
View Full Code Here

Examples of org.eclipse.team.core.TeamException

    reset.setMode(type);
    reset.setRef(refName);
    try {
      reset.call();
    } catch (GitAPIException e) {
      throw new TeamException(e.getLocalizedMessage(), e.getCause());
    }
    monitor.worked(1);

    // only refresh if working tree changes
    if (type == ResetType.HARD)
View Full Code Here

Examples of org.eclipse.team.core.TeamException

            else
              refreshMonitor.worked(1);
          }
          refreshMonitor.done();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } catch (IOException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } finally {
          if (updated != null && !updated.isEmpty())
            repository.notifyIndexChanged();
          pm.done();
View Full Code Here

Examples of org.eclipse.team.core.TeamException

        command.setStashRef(index);
        try {
          command.call();
          repo.fireEvent(new RefsChangedEvent());
        } catch (JGitInternalException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } finally {
          pm.done();
        }
      }
View Full Code Here

Examples of org.eclipse.team.core.TeamException

              .setStashRef(commit.name()).call();
          pm.worked(1);
          ProjectUtil.refreshValidProjects(validProjects,
              new SubProgressMonitor(pm, 1));
        } catch (JGitInternalException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } finally {
          pm.done();
        }
      }
View Full Code Here

Examples of org.eclipse.team.core.TeamException

          if (subRepo != null) {
            subRepo.close();
            repo.notifyIndexChanged();
          }
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        }
      }
    };
    ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(),
View Full Code Here

Examples of org.eclipse.team.core.TeamException

          Git git = new Git(repository);
          git.rebase().setUpstream(commit.getParent(0))
              .runInteractively(handler)
              .setOperation(RebaseCommand.Operation.BEGIN).call();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        }
        pm.worked(1);

        ProjectUtil.refreshValidProjects(
View Full Code Here

Examples of org.eclipse.team.core.TeamException

        try {
          newHead = command.call();
          reverted = command.getRevertedRefs();
          result = command.getFailingResult();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        }
        pm.worked(1);

        ProjectUtil.refreshValidProjects(
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.