The abstract superclass for actions that listen to page activation and
open/close events. This implementation tracks the active page (see
getActivePage ) and provides a convenient place to monitor
page lifecycle events that could affect the availability of the action.
Subclasses must implement the following IAction method:
run - to do the action's work
Subclasses may extend any of the IPartListener methods if the
action availablity needs to be recalculated:
partActivated
partDeactivated
partOpened
partClosed
partBroughtToTop
Subclasses may extend any of the IPageListener methods if the
action availablity needs to be recalculated:
pageActivated
pageClosed
pageOpened
This method implements the IPartListener and
IPageListener interfaces, and automatically registers listeners
so that it can keep its enablement state up to date. Ordinarily, the
window's references to these listeners will be dropped automatically when
the window closes. However, if the client needs to get rid of an action
while the window is still open, the client must call
IWorkbenchAction.dispose dispose to give the action an
opportunity to deregister its listeners and to perform any other cleanup.
|