Package org.eclipse.team.core

Examples of org.eclipse.team.core.TeamException


            .toArray(new TeamException[errors.size()]);
        IStatus[] status = new IStatus[exceptions.length];
        for (int i = 0; i < exceptions.length; i++) {
          status[i] = exceptions[i].getStatus();
        }
        throw new TeamException(new MultiStatus(TeamUIPlugin.ID, 0,
            status, TeamUIMessages.ProjectSetImportWizard_1, null));
      }
    }
  }
View Full Code Here


    RepositoryMapping mapping = RepositoryMapping.getMapping(project);
    String branch;
    try {
      branch = mapping.getRepository().getBranch();
    } catch (IOException e) {
      throw new TeamException(NLS.bind(
          CoreText.GitProjectSetCapability_ExportCouldNotGetBranch,
          project.getName()));
    }
    StoredConfig config = mapping.getRepository().getConfig();
    String remote = config.getString(ConfigConstants.CONFIG_BRANCH_SECTION,
        branch, ConfigConstants.CONFIG_KEY_REMOTE);
    String url = config.getString(ConfigConstants.CONFIG_REMOTE_SECTION,
        remote, ConfigConstants.CONFIG_KEY_URL);
    if (url == null)
      throw new TeamException(NLS.bind(
          CoreText.GitProjectSetCapability_ExportNoRemote,
          project.getName()));

    String projectPath = mapping.getRepoRelativePath(project);
    if (projectPath.equals("")) //$NON-NLS-1$
View Full Code Here

              projectReferences);
        }

        projectReferences.add(projectReference);
      } catch (final IllegalArgumentException e) {
        throw new TeamException(reference, e);
      } catch (final URISyntaxException e) {
        throw new TeamException(reference, e);
      }
    }
  }
View Full Code Here

      // The provider type is absent. Perhaps there is
      // another provider that can import this type
      providerType = TeamPlugin.getAliasType(id);
    }
    if (providerType == null) {
      throw new TeamException(
          new Status(
              IStatus.ERROR,
              TeamUIPlugin.ID,
              0,
              NLS.bind(
View Full Code Here

    RepositoryMapping mapping = RepositoryMapping.getMapping(project);
    String branch;
    try {
      branch = mapping.getRepository().getBranch();
    } catch (IOException e) {
      throw new TeamException(NLS.bind(
          CoreText.GitProjectSetCapability_ExportCouldNotGetBranch,
          project.getName()));
    }
    StoredConfig config = mapping.getRepository().getConfig();
    String remote = config.getString(ConfigConstants.CONFIG_BRANCH_SECTION,
        branch, ConfigConstants.CONFIG_KEY_REMOTE);
    String url = config.getString(ConfigConstants.CONFIG_REMOTE_SECTION,
        remote, ConfigConstants.CONFIG_KEY_URL);
    if (url == null)
      throw new TeamException(NLS.bind(
          CoreText.GitProjectSetCapability_ExportNoRemote,
          project.getName()));

    String projectPath = mapping.getRepoRelativePath(project);
    if (projectPath.equals("")) //$NON-NLS-1$
View Full Code Here

      tagRef.setForceUpdate(shouldMoveTag);
      Result updateResult = tagRef.update();

      if (updateResult != Result.NEW && updateResult != Result.FORCED)
        throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure,
            tag.getTag(), updateResult));
    } catch (IOException e) {
      throw new TeamException(NLS.bind(CoreText.TagOperation_taggingFailure,
          tag.getTag(), e.getMessage()), e);
    }
  }
View Full Code Here

      } finally {
        inserter.release();
      }
      return tagId;
    } catch (IOException e) {
      throw new TeamException(NLS.bind(CoreText.TagOperation_objectIdNotFound,
          tag.getTag(), e.getMessage()), e);
    }
  }
View Full Code Here

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

        ProjectUtil.refreshValidProjects(
View Full Code Here

      if (!commitIndex)
        for(String path:commitFileList)
          commitCommand.setOnly(path);
      commit = commitCommand.call();
    } catch (Exception e) {
      throw new TeamException(
          CoreText.MergeOperation_InternalError, e);
    }
  }
View Full Code Here

      CommitCommand commitCommand = git.commit();
      setAuthorAndCommitter(commitCommand);
      commit = commitCommand.setAll(true).setMessage(message)
          .setInsertChangeId(createChangeId).call();
    } catch (JGitInternalException e) {
      throw new TeamException(CoreText.MergeOperation_InternalError, e);
    } catch (GitAPIException e) {
      throw new TeamException(e.getLocalizedMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.team.core.TeamException

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.