Remove System.out.println from RevWalkFilterTest
[jgit.git] / org.spearce.egit.core / src / org / spearce / egit / core / op / UpdateOperation.java
blob1c915a76a276fea52500b3e92bd1d7904f4e9be8
1 /*******************************************************************************
2 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
3 * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * See LICENSE for the full license text, also available.
8 *******************************************************************************/
9 package org.spearce.egit.core.op;
11 import java.util.Collection;
13 import org.eclipse.core.resources.IResource;
14 import org.eclipse.core.resources.IWorkspaceRunnable;
15 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.core.runtime.IProgressMonitor;
17 import org.spearce.egit.core.internal.UpdateJob;
19 /**
20 * Updates the Git index for the selected resources. Only tracked resources
21 * are updated.
22 * <p>
23 * Accepts a collection of resources (files and/or directories) whose content
24 * should be updated in the corresponding Git repositories. Resources in the
25 * collection can be associated with multiple repositories.
26 * </p>
28 public class UpdateOperation implements IWorkspaceRunnable {
29 private final Collection rsrcList;
31 /**
32 * Create a new operation to update files/folders.
34 * @param rsrcs
35 * collection of {@link IResource}s which should be added to the
36 * relevant Git repositories.
38 public UpdateOperation(final Collection rsrcs) {
39 rsrcList = rsrcs;
42 public void run(IProgressMonitor m) throws CoreException {
43 new UpdateJob(rsrcList).schedule();