Package org.eclipse.team.ui.history
Class HistoryPage
java.lang.Object
org.eclipse.ui.part.Page
org.eclipse.team.ui.history.HistoryPage
- All Implemented Interfaces:
IAdaptable
,IHistoryPage
,IPage
,IPageBookViewPage
Abstract HistoryPage class that keeps track of the history page site.
Clients may subclass this class.
- Since:
- 3.2
- See Also:
-
Field Summary
Fields inherited from interface org.eclipse.team.ui.history.IHistoryPage
P_DESCRIPTION, P_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for changes to properties of this page.protected void
firePropertyChange
(Object source, String property, Object oldValue, Object newValue) Notify all listeners that the given property has changed.Returns theIHistoryPageSite
set for this page.Returns theIHistoryView
instance that contains this history page or null if the history view instance cannot be determined.getInput()
Returns the object whose history is currently being displayed in the history page.abstract boolean
inputSet()
Called by HistoryPage aftersetInput(Object)
.void
Removes the given property listener from this page.void
setHistoryView
(IHistoryView historyView) boolean
Fetches and populates the history page for the given Object.void
setSite
(IHistoryPageSite site) Set the site for the page - this needs to be replaced with a properIHistoryPageSite
in order to allow history pages to be displayed in both views and dialogs.Methods inherited from class org.eclipse.ui.part.Page
createControl, dispose, getControl, getSite, init, makeContributions, setActionBars, setFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.team.ui.history.IHistoryPage
dispose, getDescription, getName, isValidInput, refresh
-
Constructor Details
-
HistoryPage
public HistoryPage()
-
-
Method Details
-
setSite
Description copied from interface:IHistoryPage
Set the site for the page - this needs to be replaced with a properIHistoryPageSite
in order to allow history pages to be displayed in both views and dialogs.- Specified by:
setSite
in interfaceIHistoryPage
- Parameters:
site
- the history page site
-
getHistoryPageSite
Description copied from interface:IHistoryPage
Returns theIHistoryPageSite
set for this page.- Specified by:
getHistoryPageSite
in interfaceIHistoryPage
- Returns:
- the history page site for this page
-
getInput
Description copied from interface:IHistoryPage
Returns the object whose history is currently being displayed in the history page.- Specified by:
getInput
in interfaceIHistoryPage
- Returns:
- object the object being displayed in the history page or
null
if no input has been set;
-
setInput
Description copied from interface:IHistoryPage
Fetches and populates the history page for the given Object. Clients should provide an implementation for their individual pages.- Specified by:
setInput
in interfaceIHistoryPage
- Parameters:
object
- the object for which history is being requested for- Returns:
- true if the page was able to display the history for the object, false otherwise
-
inputSet
public abstract boolean inputSet()Called by HistoryPage aftersetInput(Object)
. Clients can gain access to the input by usinggetInput()
.- Returns:
true
if the page was able to display the contents,false
otherwise
-
setHistoryView
-
getHistoryView
Description copied from interface:IHistoryPage
Returns theIHistoryView
instance that contains this history page or null if the history view instance cannot be determined.- Specified by:
getHistoryView
in interfaceIHistoryPage
- Returns:
- IHistoryView the history view that contains this history page or null if the history view instance cannot be determined.
-
addPropertyChangeListener
Description copied from interface:IHistoryPage
Adds a listener for changes to properties of this page. Has no effect if an identical listener is already registered.The changes supported by the page are as follows:
P_NAME
- indicates the name of the page has changedP_DESCRIPTION
- indicates the description of the page has changed
Clients may define additional properties as required.
- Specified by:
addPropertyChangeListener
in interfaceIHistoryPage
- Parameters:
listener
- a property change listener
-
removePropertyChangeListener
Description copied from interface:IHistoryPage
Removes the given property listener from this page. Has no effect if an identical listener is not already registered.- Specified by:
removePropertyChangeListener
in interfaceIHistoryPage
- Parameters:
listener
- a property listener
-
firePropertyChange
Notify all listeners that the given property has changed.- Parameters:
source
- the object on which a property has changedproperty
- identifier of the property that has changedoldValue
- the old value of the property, ornull
newValue
- the new value of the property, ornull
- Since:
- 3.3
-