- All Implemented Interfaces:
- Direct Known Subclasses:
Constructor SummaryConstructorDescriptionConstructs an editor to contain other editors.
Method SummaryModifier and TypeMethodDescription
voidActivates the given nested editor.
dispose()Release the added listener.
voidSaves the contents of this part.
doSaveAs()Saves the contents of this part to another object.
final IEditorPartReturns the active inner editor.
protected intReturns the index of the given nested editor.
abstract CompositeThis method is called after createPartControl has been executed and should return the container for the given inner editor.
final IEditorPartReturns an array with all inner editors.
(int propId)Handles a property change notification from a nested editor.
voidInitializes this editor with the given editor site and input.
protected abstract voidCalled as soon as the inner editors have been created and are available.
isDirty()Returns whether the contents of this part have changed since the last save operation.
booleanReturns whether the "Save As" operation is supported by this part.
final voidSet the inner editors.
setFocus()Asks this part to take focus within the workbench.
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, createPartControl, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
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
AbstractMultiEditorpublic AbstractMultiEditor()Constructs an editor to contain other editors.
handlePropertyChangeprotected void handlePropertyChange
(int propId)Handles a property change notification from a nested editor. The default implementation simply forwards the change to listeners on this multi editor by calling
firePropertyChangewith the same property id. For example, if the dirty state of a nested editor changes (property id
ISaveablePart.PROP_DIRTY), this method handles it by firing a property change event for
ISaveablePart.PROP_DIRTYto property listeners on this multi editor.
Subclasses may extend or reimplement this method.
propId- the id of the property that changed
doSavepublic void doSave
(IProgressMonitor monitor)Saves the contents of this part.
If the save is successful, the part should fire a property changed event reflecting the new dirty state (
If the save is cancelled through user action, or for any other reason, the part should invoke
IProgressMonitorto inform the caller.
This method is long-running; progress and cancellation are provided by the given progress monitor.
doSaveAspublic void doSaveAs()Saves the contents of this part to another object.
Implementors are expected to open a "Save As" dialog where the user will be able to select a new name for the contents. After the selection is made, the contents should be saved to that new name. During this operation a
IProgressMonitorshould be used to indicate progress.
If the save is successful, the part fires a property changed event reflecting the new dirty state (
initDescription copied from interface:
IEditorPartInitializes this editor with the given editor site and input.
This method is automatically called shortly after the part is instantiated. It marks the start of the part's lifecycle. The
IWorkbenchPart.disposemethod will be called automically at the end of the lifecycle. Clients must not call this method.
Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a
isDirtypublic boolean isDirty()Returns whether the contents of this part have changed since the last save operation. If this value changes the part must fire a property listener event with
Note: this method is called often on a part open or part activation switch, for example by actions to determine their enabled status.
isSaveAsAllowedpublic boolean isSaveAsAllowed()Returns whether the "Save As" operation is supported by this part.
setFocuspublic void setFocus()Description copied from interface:
IWorkbenchPartAsks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.
Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use
getActiveEditorpublic final IEditorPart getActiveEditor()Returns the active inner editor.
- the active editor
getInnerEditorspublic final IEditorPart getInnerEditors()Returns an array with all inner editors.
- the inner editors
setChildrenpublic final void setChildren
(IEditorPart children)Set the inner editors. Should not be called by clients.
children- the inner editors of this multi editor
- This method is not intended to be referenced by clients.
innerEditorsCreatedprotected abstract void innerEditorsCreated()Called as soon as the inner editors have been created and are available.
activateEditorpublic void activateEditor
(IEditorPart part)Activates the given nested editor.
part- the nested editor
getIndexprotected int getIndex
(IEditorPart editor)Returns the index of the given nested editor.
- the index of the nested editor
disposepublic void dispose()Release the added listener.
getInnerEditorContainerThis method is called after createPartControl has been executed and should return the container for the given inner editor.
innerEditorReference- a reference to the inner editor that is being created.
- the container in which the inner editor's pane and part controls are to be created.