The abstract superclass for actions that depend on the active editor.
This implementation tracks the active editor (see getActiveEditor )
and updates the availability of the action when an editor becomes
active.
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.
|