| org.eclipse.ui.actions.PartEventAction
All known Subclasses: org.eclipse.ui.actions.RetargetAction, org.eclipse.ui.internal.PageEventAction,
PartEventAction | abstract public class PartEventAction extends Action implements IPartListener(Code) | | The abstract superclass for actions that listen to part activation and
open/close events. This implementation tracks the active part (see
getActivePart ) and provides a convenient place to monitor
part 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
Although this method implements the IPartListener interface,
it does NOT register itself.
|
PartEventAction | protected PartEventAction(String text)(Code) | | Creates a new action with the given text.
Parameters: text - the action's text, or null if there is no text |
PartEventAction | protected PartEventAction(String text, int style)(Code) | | Creates a new action with the given text and style.
Parameters: text - the action's text, or null if there is no text Parameters: style - one of AS_PUSH_BUTTON , AS_CHECK_BOX ,AS_DROP_DOWN_MENU , AS_RADIO_BUTTON , andAS_UNSPECIFIED since: 3.0 |
getActivePart | public IWorkbenchPart getActivePart()(Code) | | Returns the currently active part in the workbench.
currently active part in the workbench, or null if none |
partActivated | public void partActivated(IWorkbenchPart part)(Code) | | The PartEventAction implementation of this
IPartListener method records that the given part is active.
Subclasses may extend this method if action availability has to be
recalculated.
|
partBroughtToTop | public void partBroughtToTop(IWorkbenchPart part)(Code) | | The PartEventAction implementation of this
IPartListener method does nothing. Subclasses should extend
this method if action availability has to be recalculated.
|
partClosed | public void partClosed(IWorkbenchPart part)(Code) | | The PartEventAction implementation of this
IPartListener method clears the active part if it just closed.
Subclasses may extend this method if action availability has to be
recalculated.
|
partDeactivated | public void partDeactivated(IWorkbenchPart part)(Code) | | The PartEventAction implementation of this
IPartListener method records that there is no active part.
Subclasses may extend this method if action availability has to be
recalculated.
|
partOpened | public void partOpened(IWorkbenchPart part)(Code) | | The PartEventAction implementation of this
IPartListener method does nothing. Subclasses should extend
this method if action availability has to be recalculated.
|
|
|