Package org.eclipse.ui.internal
Class CloseAllSavedAction
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.actions.PartEventAction
org.eclipse.ui.internal.PageEventAction
org.eclipse.ui.internal.CloseAllSavedAction
- All Implemented Interfaces:
IAction
,ActionFactory.IWorkbenchAction
,IPageListener
,IPartListener
,IPropertyListener
Closes all editors except ones with unsaved changes.
-
Field Summary
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
-
Constructor Summary
ConstructorDescriptionCloseAllSavedAction
(IWorkbenchWindow window) Create an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
ThePageEventAction
implementation of thisActionFactory.IWorkbenchAction
method deregisters the part and page listener adding by the constructor.void
pageActivated
(IWorkbenchPage page) ThePageEventAction
implementation of thisIPageListener
method records that the given page is active.void
pageClosed
(IWorkbenchPage page) ThePageEventAction
implementation of thisIPageListener
method clears the active page if it just closed.void
partClosed
(IWorkbenchPart part) ThePartEventAction
implementation of thisIPartListener
method clears the active part if it just closed.void
partOpened
(IWorkbenchPart part) ThePartEventAction
implementation of thisIPartListener
method does nothing.void
propertyChanged
(Object source, int propID) Indicates that a property has changed.void
run()
The default implementation of thisIAction
method does nothing.Methods inherited from class org.eclipse.ui.internal.PageEventAction
getActivePage, getWorkbenchWindow, pageOpened
Methods inherited from class org.eclipse.ui.actions.PartEventAction
getActivePart, partActivated, partBroughtToTop, partDeactivated
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
-
Constructor Details
-
CloseAllSavedAction
Create an instance of this class.- Parameters:
window
- the window
-
-
Method Details
-
pageActivated
Description copied from class:PageEventAction
ThePageEventAction
implementation of thisIPageListener
method records that the given page is active. Subclasses may extend this method if action availability has to be recalculated.- Specified by:
pageActivated
in interfaceIPageListener
- Overrides:
pageActivated
in classPageEventAction
- Parameters:
page
- the page that was activated- See Also:
-
pageClosed
Description copied from class:PageEventAction
ThePageEventAction
implementation of thisIPageListener
method clears the active page if it just closed. Subclasses may extend this method if action availability has to be recalculated.- Specified by:
pageClosed
in interfaceIPageListener
- Overrides:
pageClosed
in classPageEventAction
- Parameters:
page
- the page that was closed- See Also:
-
partClosed
Description copied from class:PartEventAction
ThePartEventAction
implementation of thisIPartListener
method clears the active part if it just closed. Subclasses may extend this method if action availability has to be recalculated.- Specified by:
partClosed
in interfaceIPartListener
- Overrides:
partClosed
in classPartEventAction
- Parameters:
part
- the part that was closed- See Also:
-
partOpened
Description copied from class:PartEventAction
ThePartEventAction
implementation of thisIPartListener
method does nothing. Subclasses should extend this method if action availability has to be recalculated.- Specified by:
partOpened
in interfaceIPartListener
- Overrides:
partOpened
in classPartEventAction
- Parameters:
part
- the part that was opened- See Also:
-
propertyChanged
Description copied from interface:IPropertyListener
Indicates that a property has changed.- Specified by:
propertyChanged
in interfaceIPropertyListener
- Parameters:
source
- the object whose property has changedpropID
- the id of the property which has changed; property ids are generally defined as constants on the source class
-
run
public void run()Description copied from class:Action
The default implementation of thisIAction
method does nothing. Subclasses should override this method if they do not need information from the triggering event, or overriderunWithEvent(Event)
if they do. -
dispose
public void dispose()Description copied from class:PageEventAction
ThePageEventAction
implementation of thisActionFactory.IWorkbenchAction
method deregisters the part and page listener adding by the constructor. Subclasses should extend this method to do additional cleanup.- Specified by:
dispose
in interfaceActionFactory.IWorkbenchAction
- Overrides:
dispose
in classPageEventAction
-