Git Repositories View: Allow to "remove" multiple Repositories
[egit.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / actions / QuickdiffBaselineOperation.java
blobef90d7fd38a9e3f5a6b4399c007166ce7aa3c6f8
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.io.IOException;
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
15 import org.eclipse.egit.ui.Activator;
16 import org.eclipse.egit.ui.UIText;
17 import org.eclipse.egit.ui.internal.decorators.GitQuickDiffProvider;
18 import org.eclipse.jgit.lib.Repository;
20 /**
21 * UI operation to change the git quickdiff baseline
23 public class QuickdiffBaselineOperation extends AbstractRevObjectOperation {
25 private final String baseline;
27 /**
28 * Construct a QuickdiffBaselineOperation for changing quickdiff baseline
29 * @param repository
31 * @param baseline
33 QuickdiffBaselineOperation(final Repository repository, final String baseline) {
34 super(repository);
35 this.baseline = baseline;
38 /* (non-Javadoc)
39 * @see org.eclipse.egit.core.op.IEGitOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
41 public void execute(IProgressMonitor monitor) throws CoreException {
42 try {
43 GitQuickDiffProvider.setBaselineReference(repository, baseline);
44 } catch (IOException e) {
45 Activator
46 .logError(
47 UIText.QuickdiffBaselineOperation_baseline,
48 e);