KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ui > history > WorkbenchHistoryPageSite


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ui.history;
12
13 import org.eclipse.jface.action.IToolBarManager;
14 import org.eclipse.jface.viewers.ISelectionProvider;
15 import org.eclipse.swt.widgets.Shell;
16 import org.eclipse.team.ui.history.IHistoryPageSite;
17 import org.eclipse.ui.IWorkbenchPart;
18 import org.eclipse.ui.part.IPageSite;
19
20 public class WorkbenchHistoryPageSite implements IHistoryPageSite {
21     
22     GenericHistoryView part;
23     IPageSite site;
24     
25     public WorkbenchHistoryPageSite(GenericHistoryView part, IPageSite site) {
26         this.part = part;
27         this.site = site;
28     }
29     
30     public IPageSite getWorkbenchPageSite() {
31         return site;
32     }
33
34     public IWorkbenchPart getPart() {
35         return part;
36     }
37
38     public Shell getShell() {
39         return site.getShell();
40     }
41
42     public ISelectionProvider getSelectionProvider() {
43         return site.getSelectionProvider();
44     }
45
46     public void setSelectionProvider(ISelectionProvider provider) {
47         site.setSelectionProvider(provider);
48     }
49
50     public void setFocus() {
51 // Nothing to do
52
}
53     
54     public boolean isModal() {
55         return false;
56     }
57
58     public IToolBarManager getToolBarManager() {
59         return site.getActionBars().getToolBarManager();
60     }
61
62 }
63
Popular Tags