Action Reactoring (AbstractOperationAction)
[egit.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / actions / Update.java
blob1e9a3fc38d926a49db53995b71398a59cbaa6206
1 /*******************************************************************************
2 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
3 * Copyright (C) 2006, 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 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
9 *******************************************************************************/
10 package org.eclipse.egit.ui.internal.actions;
12 import java.util.List;
14 import org.eclipse.core.resources.IResource;
15 import org.eclipse.egit.core.op.IEGitOperation;
16 import org.eclipse.egit.core.op.UpdateOperation;
17 import org.eclipse.egit.ui.UIText;
19 /**
20 * Action to update index for selected resources with content from workdir.
22 * @see UpdateOperation
24 public class Update extends AbstractResourceOperationAction {
25 protected IEGitOperation createOperation(final List<IResource> sel) {
26 return sel.isEmpty() ? null : new UpdateOperation(sel);
29 @Override
30 protected String getJobName() {
31 return UIText.Update_update;