Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.AddToIndexOperation.execute()


    TestProject project = initRepoInsideProjectInsideWorkspace();
    testUtils.addFileToProject(project.getProject(), "file.txt",
        "some text");
    AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
        new IResource[] { project.getProject().getFile("file.txt") });
    addToIndexOperation.execute(null);
    IProjectDescription description = project.getProject().getDescription();
    description.setName("P2");
    registerWorkspaceRelativeTestDir("P2");
    project.getProject().move(description,
        IResource.FORCE | IResource.SHALLOW, null);
View Full Code Here


    TestProject project = initRepoInsideProjectOutsideWorkspace();
    testUtils.addFileToProject(project.getProject(), "file.txt",
        "some text");
    AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
        new IResource[] { project.getProject().getFile("file.txt") });
    addToIndexOperation.execute(null);
    IProjectDescription description = project.getProject().getDescription();
    description.setName("P2");
    project.getProject().move(description,
        IResource.FORCE | IResource.SHALLOW, null);
    IProject project2 = ResourcesPlugin.getWorkspace().getRoot()
View Full Code Here

    TestProject project = initRepoInsideProjectOutsideWorkspace();
    testUtils.addFileToProject(project.getProject(), "file.txt",
        "some text");
    AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
        new IResource[] { project.getProject().getFile("file.txt") });
    addToIndexOperation.execute(null);
    IProjectDescription description = project.getProject().getDescription();
    description.setLocationURI(URIUtil.toURI(new Path(new File(project.getWorkspaceSupplement(), "P2").getAbsolutePath())));
    project.getProject().move(description,
        IResource.FORCE | IResource.SHALLOW, null);
    IProject project2 = ResourcesPlugin.getWorkspace().getRoot()
View Full Code Here

    testUtils.addFileToProject(project.getProject(), "file.txt",
        "some text");
    AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
        new IResource[] { project.getProject().getFile("file.txt") });
    addToIndexOperation.execute(null);

    // Check condition before move
    DirCache dirCache = DirCache.read(repository.getIndexFile(),
        FS.DETECTED);
    assertNotNull(dirCache.getEntry(gdRelativeSrcParent + "file.txt"));
View Full Code Here

        "New file");
    files.add(newFile);
    IFile[] fileArr = files.toArray(new IFile[files.size()]);

    AddToIndexOperation trop = new AddToIndexOperation(files);
    trop.execute(null);
    CommitOperation cop = new CommitOperation(fileArr, files, TestUtils.AUTHOR,
        TestUtils.COMMITTER, "Added file");
    cop.execute(null);

    proj.delete(false, false, null);
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.