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
;
21 * UI operation to change the git quickdiff baseline
23 public class QuickdiffBaselineOperation
extends AbstractRevObjectOperation
{
25 private final String baseline
;
28 * Construct a QuickdiffBaselineOperation for changing quickdiff baseline
33 QuickdiffBaselineOperation(final Repository repository
, final String baseline
) {
35 this.baseline
= baseline
;
39 * @see org.eclipse.egit.core.op.IEGitOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
41 public void execute(IProgressMonitor monitor
) throws CoreException
{
43 GitQuickDiffProvider
.setBaselineReference(repository
, baseline
);
44 } catch (IOException e
) {
47 UIText
.QuickdiffBaselineOperation_baseline
,