Examples of TeamItem


Examples of net.sf.robocode.repository.items.TeamItem

   * @param repository is the repository, where the team file is automatically added or updated,
   *                   when the team file is registered.
   * @return a TeamItem that has been created or updated in the repository.
   */
  private TeamItem register(URL teamFileUrl, IRepositoryRoot root, IRepository repository) {
    TeamItem item = null;

    // Check if the team file is already registered in the repository
    String friendlyUrl = UrlUtil.removeFileExtension(teamFileUrl.toString());

    IRepositoryItem repositoryItem = repository.getItem(friendlyUrl);
    if (repositoryItem instanceof TeamItem) {
      item = (TeamItem) repositoryItem;
    }

    // If the team file has not been registered then create a new TeamItem based on the team file URL
    if (item == null) {
      item = new TeamItem(teamFileUrl, root);
    }

    // Add or update the item in the repository and return it
    repository.addOrUpdateItem(item);
    return item;
View Full Code Here

Examples of net.sf.robocode.repository.items.TeamItem

  }

  public String createPackage(File jarFile, List<IRobotSpecItem> selectedRobots, RobotProperties robotProps) {
    checkDbExists();
    List<RobotItem> robotItems = getAllRobotItems(selectedRobots);
    TeamItem teamItem = getTeamItem(selectedRobots);

    String res = JarCreator.createPackage(jarFile, robotItems, teamItem, robotProps);
    refresh(jarFile.toURI().toString());

    return res;
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.