Package org.eclipse.team.ui.history
Class ElementLocalHistoryPageSource
java.lang.Object
org.eclipse.team.ui.history.HistoryPageSource
org.eclipse.team.ui.history.ElementLocalHistoryPageSource
- All Implemented Interfaces:
IHistoryPageSource
A history page source that can create history pages for a sub-element of a file.
- Since:
- 3.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancanShowHistoryFor(Object object) Returns true if this history page source can show a history for the given object, false if it cannotfinal PagecreatePage(Object object) Called by the history view to create the page for this IFileHistoryProvider.protected abstract IFileReturn the file that contains the given element ofnullif this page source can not show history for the given element.static ITypedElementgetPreviousEdition(IFile file, Object element) Return the previous edition from the local history of the given element located in the given file.final IFileinternalGetFile(Object element) Return the file that contains the given element ofnullif this page source can not show history for the given element.Methods inherited from class org.eclipse.team.ui.history.HistoryPageSource
getHistoryPageSource
-
Constructor Details
-
ElementLocalHistoryPageSource
public ElementLocalHistoryPageSource()Create an instance of the page source.
-
-
Method Details
-
getPreviousEdition
Return the previous edition from the local history of the given element located in the given file. Anullis returned if a previous edition could not be found.- Parameters:
file- the file containing the elementelement- the element- Returns:
- the previous edition of the element from the local history or
null - Throws:
TeamException- if an error occurs
-
canShowHistoryFor
Description copied from interface:IHistoryPageSourceReturns true if this history page source can show a history for the given object, false if it cannot- Parameters:
object- the object that is to have history shown- Returns:
- boolean
-
createPage
Description copied from interface:IHistoryPageSourceCalled by the history view to create the page for this IFileHistoryProvider. The page must implementIHistoryPage.- Parameters:
object- the object whose history is to be shown- Returns:
- a Page that implements IHistoryPage (should return either an IPage, IPageBookViewPage or an IHistoryPage
- See Also:
-
getFile
Return the file that contains the given element ofnullif this page source can not show history for the given element.- Parameters:
element- the element- Returns:
- the file that contains the given element of
null
-
internalGetFile
Return the file that contains the given element ofnullif this page source can not show history for the given element.- Parameters:
element- the element- Returns:
- the file that contains the given element of
null - Restriction:
- This method is not intended to be referenced by clients.
-