uk.ac.kcl.cch.jb.pliny.editors
Class NoteEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
uk.ac.kcl.cch.jb.pliny.editors.NoteEditor
- All Implemented Interfaces:
- org.eclipse.gef.commands.CommandStackListener, EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, IHandlesAnnotations, IResourceDrivenPart, org.eclipse.ui.ISaveablePart, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation, PropertyChangeListener
- public class NoteEditor
- extends org.eclipse.ui.part.EditorPart
- implements PropertyChangeListener, IHandlesAnnotations, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.gef.commands.CommandStackListener, IResourceDrivenPart
an EditorPart that implements the Note Editor.
Note that the input the Note Editor is to work on is specified by
a NoteEditorInput
instance.
- Author:
- John Bradley
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
Methods inherited from class org.eclipse.ui.part.EditorPart |
checkSite, getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setInputWithNotify, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
NoteEditor
public NoteEditor()
init
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
- Specified by:
init
in interface org.eclipse.ui.IEditorPart
- Throws:
org.eclipse.ui.PartInitException
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchPart
setDirty
public void setDirty(boolean dirty)
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
doSave
in interface org.eclipse.ui.ISaveablePart
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAs
in interface org.eclipse.ui.ISaveablePart
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interface org.eclipse.ui.ISaveablePart
isSaveOnCloseNeeded
public boolean isSaveOnCloseNeeded()
- Specified by:
isSaveOnCloseNeeded
in interface org.eclipse.ui.ISaveablePart
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Specified by:
isSaveAsAllowed
in interface org.eclipse.ui.ISaveablePart
getEditDomain
public org.eclipse.gef.EditDomain getEditDomain()
getCommandStack
public org.eclipse.gef.commands.CommandStack getCommandStack()
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
getActionRegistry
protected org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
createActions
protected void createActions()
setFocus
public void setFocus()
- Specified by:
setFocus
in interface org.eclipse.ui.IWorkbenchPart
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
setInput
protected void setInput(org.eclipse.ui.IEditorInput input)
propertyChange
public void propertyChange(PropertyChangeEvent arg0)
- Specified by:
propertyChange
in interface PropertyChangeListener
updateCommandStackActions
public void updateCommandStackActions()
updatePasteLocation
public void updatePasteLocation()
selectionChanged
public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
- Specified by:
selectionChanged
in interface org.eclipse.jface.viewers.ISelectionChangedListener
commandStackChanged
public void commandStackChanged(EventObject event)
- Specified by:
commandStackChanged
in interface org.eclipse.gef.commands.CommandStackListener
getMyResource
public Resource getMyResource()
- Description copied from interface:
IResourceDrivenPart
- returns the Resource that this part is currently using as its input.
- Specified by:
getMyResource
in interface IResourceDrivenPart
- Returns:
- Resource
toString
public String toString()