KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > ui > history > IHistoryPageSource


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
12 package org.eclipse.team.ui.history;
13
14 import org.eclipse.team.core.history.IFileHistoryProvider;
15 import org.eclipse.ui.part.Page;
16
17 /**
18  * Interface to an object which is capable of supplying a history page for display
19  * by the history view or other views, dialogs or editors that wish to display
20  * the history of an object.
21  *
22  * This interface is not intended to be implemented by clients.
23  * Clients can instead subclass {@link HistoryPageSource}.
24  *
25  * @see IFileHistoryProvider
26  * @since 3.2
27  */

28 public interface IHistoryPageSource {
29     
30     /**
31      * Returns true if this history page source can show a history for the given object, false if it cannot
32      * @param object the object that is to have history shown
33      * @return boolean
34      */

35     public boolean canShowHistoryFor(Object JavaDoc object);
36     
37     /**
38      * Called by the history view to create the page for this IFileHistoryProvider. The
39      * page must implement {@link IHistoryPage}.
40      * @param object the object whose history is to be shown
41      *
42      * @see IHistoryPage
43      * @return a Page that implements IHistoryPage (should return either an IPage, IPageBookViewPage or an IHistoryPage
44      */

45     public Page createPage(Object JavaDoc object);
46 }
47
Popular Tags