Action Reactoring (AbstractOperationAction)
[egit.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / actions / MixedResetToRevisionAction.java
blob3a8e2f1c609f596e54da1ecc4df72d9d4dc59d16
1 /*******************************************************************************
2 * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9 package org.eclipse.egit.ui.internal.actions;
11 import java.util.List;
13 import org.eclipse.egit.core.op.IEGitOperation;
14 import org.eclipse.egit.core.op.ResetOperation;
15 import org.eclipse.egit.ui.UIText;
16 import org.eclipse.jgit.revwalk.RevCommit;
18 /**
19 * Mixed reset to selected revision
21 public class MixedResetToRevisionAction extends AbstractRevCommitOperationAction {
23 @Override
24 protected IEGitOperation createOperation(List<RevCommit> selection) {
25 return new ResetOperation(getActiveRepository(),
26 selection.get(0).name(),
27 ResetOperation.ResetType.MIXED);
30 @Override
31 protected String getJobName() {
32 return UIText.MixedResetToRevisionAction_mixedReset;