uk.ac.kcl.cch.jb.pliny.editors
Class NoteEditor

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.ui.part.WorkbenchPart
          extended byorg.eclipse.ui.part.EditorPart
              extended byuk.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

Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Constructor Summary
NoteEditor()
           
 
Method Summary
 void commandStackChanged(EventObject event)
           
protected  void createActions()
           
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 void dispose()
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void doSaveAs()
           
protected  org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
           
 Object getAdapter(Class adapter)
           
 org.eclipse.gef.commands.CommandStack getCommandStack()
           
 org.eclipse.gef.EditDomain getEditDomain()
           
 Resource getMyResource()
          returns the Resource that this part is currently using as its input.
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
           
 boolean isDirty()
           
 boolean isSaveAsAllowed()
           
 boolean isSaveOnCloseNeeded()
           
 void propertyChange(PropertyChangeEvent arg0)
           
 void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
           
 void setDirty(boolean dirty)
           
 void setFocus()
           
protected  void setInput(org.eclipse.ui.IEditorInput input)
           
 String toString()
           
 void updateCommandStackActions()
           
 void updatePasteLocation()
           
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

Constructor Detail

NoteEditor

public NoteEditor()
Method Detail

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()