Examples of AddCommand


Examples of org.eclipse.jgit.api.AddCommand

                }
            }

            if (!status.isClean())
            {
                AddCommand add = git.add();

                MavenProject rootProject = ReleaseUtil.getRootProject(reactorProjects);
//                File rootBaseDir = rootProject.getBasedir();
                for (MavenProject project : reactorProjects)
                {
                    String pomPath = relativePath(canonicalRepoDir, project.getFile());

                    if (getLogger().isDebugEnabled())
                    {
                        getLogger().debug("(" + fullBranchName + ") adding file pattern for poms commit: " + pomPath);
                    }

                    if (isWindows)
                    {
                        pomPath = StringUtils.replace(pomPath, "\\", "/");
                    }

                    add.addFilepattern(pomPath);
                }
                add.call();
                git.commit().setMessage(message).call();
            }
        }
        catch (GitAPIException e)
        {
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand

    // Asks for Existing Files to get added
    git.add().setUpdate(true).addFilepattern(".").call();

    // Now as for any new files (untracked)

    AddCommand addCommand = git.add();

    if (!status.getUntracked().isEmpty()) {
      for (String s : status.getUntracked()) {
        getLog().info("Adding file " + s);
        addCommand.addFilepattern(s);
      }

      addCommand.call();
    }

    git.commit().setAll(true).setMessage(versionDescription).call();

    String commitId = ObjectId.toString(git.getRepository()
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand

     *
     * @param filePattern the file pattern
     */
    public void add(String filePattern) {

        AddCommand add = git.add();
        DirCache cache;
        try {
            cache = add.addFilepattern(filePattern).call();
            updateCache(cache);
        } catch (NoFilepatternException e) {
            throw new IllegalStateException("Unable to add file to the Git cache", e);
        } catch (IOException e) {
            throw new IllegalStateException("Unable to add file to the Git cache", e);
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand

    if (null != masterRef)
      commitId = ObjectId.toString(masterRef.getObjectId());

    Status status = gitRepo.status().call();

    AddCommand addCommand = gitRepo.add();

    if (!status.getUntracked().isEmpty()) {
      for (String s : status.getUntracked()) {
        log("Adding file %s", s);
        addCommand.addFilepattern(s);
      }

      addCommand.call();
    }

    log("Committing");

    try {
View Full Code Here

Examples of org.gvt.command.AddCommand

    Object constraint)
  {
    NodeModel part = (NodeModel) childEditPart.getModel();
    Rectangle rect = (Rectangle) constraint;

    AddCommand add = new AddCommand();
    add.setParent((CompoundModel) getHost().getModel());
    add.setChild(part);

    MoveCommand move = new MoveCommand(part, rect);
    move.setParent((CompoundModel) getHost().getModel());

    return add.chain(move);
  }
View Full Code Here

Examples of org.openstreetmap.josm.command.AddCommand

                    notifyNodesNotOnCircle();
                    return;
                }
                Node n = new Node(ll);
                wayToAdd.add(n);
                cmds.add(new AddCommand(n));
            }
        }
        wayToAdd.add(wayToAdd.get(0)); // close the circle
        if (existingWay == null) {
            Way newWay = new Way();
            newWay.setNodes(wayToAdd);
            cmds.add(new AddCommand(newWay));
        } else {
            Way newWay = new Way(existingWay);
            newWay.setNodes(wayToAdd);
            cmds.add(new ChangeCommand(existingWay, newWay));
        }
View Full Code Here

Examples of org.openstreetmap.josm.command.AddCommand

                                }

                                intersectionNodes.add(intNode);

                                if (intNode == newNode) {
                                    cmds.add(new AddCommand(intNode));
                                }
                            }
                        }
                        else if (test && !intersectionNodes.isEmpty())
                            return intersectionNodes;
View Full Code Here

Examples of org.openstreetmap.josm.command.AddCommand

        while (chunkIt.hasNext()) {
            Way wayToAdd = new Way();
            wayToAdd.setKeys(way.getKeys());
            newWays.add(wayToAdd);
            wayToAdd.setNodes(chunkIt.next());
            commandList.add(new AddCommand(layer,wayToAdd));
            newSelection.add(wayToAdd);

        }
        boolean warnmerole = false;
        boolean warnme = false;
View Full Code Here

Examples of org.openstreetmap.josm.command.AddCommand

        final Relation relation = rr.b;

        final List<Command> list = removeTagsFromWaysIfNeeded(relation);
        final String commandName;
        if (existingRelation == null) {
            list.add(new AddCommand(relation));
            commandName = getName(false);
        } else {
            list.add(new ChangeCommand(existingRelation, relation));
            commandName = getName(true);
        }
View Full Code Here

Examples of org.openstreetmap.josm.command.AddCommand

        Relation newRel = new Relation();
        newRel.put("type", "multipolygon");
        for (Way w : inner) {
            newRel.addMember(new RelationMember("inner", w));
        }
        cmds.add(new AddCommand(newRel));
        addedRelations.add(newRel);

        // We don't add outer to the relation because it will be handed to fixRelations()
        // which will then do the remaining work.
        return new RelationRole(newRel, "outer");
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.