Fixes due to changes in the Eclipse Team API
[egit.git] / org.spearce.egit.ui / src / org / spearce / egit / ui / internal / actions / ShowResourceInHistoryAction.java
blobd2f9c47641cfa907c07821c03ce1c0b0ee54aef2
1 /*
2 * Copyright (C) 2006 Guilhem Bonnefille
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License, version 2.1, as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
17 package org.spearce.egit.ui.internal.actions;
19 import org.eclipse.jface.action.IAction;
20 import org.eclipse.swt.widgets.Shell;
21 import org.eclipse.team.internal.ui.actions.TeamAction;
22 import org.eclipse.team.ui.TeamUI;
23 import org.eclipse.team.ui.history.HistoryPageSaveablePart;
25 public class ShowResourceInHistoryAction extends TeamAction {
27 public void execute(IAction action) {
28 TeamUI.getHistoryView().showHistoryFor(getSelectedResources()[0]);
31 protected void showCompareInDialog(Shell shell, Object object) {
32 HistoryPageSaveablePart.showHistoryInDialog(shell, object);
35 public boolean isEnabled() {
36 return !getSelection().isEmpty();