org.eclipse.xtext.ui.editor
Class AbstractDirtyStateAwareEditorCallback

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.AbstractDirtyStateAwareEditorCallback
All Implemented Interfaces:
DirtyStateEditorSupport.IDirtyStateEditorSupportClient, IXtextEditorCallback
Direct Known Subclasses:
NatureAddingEditorCallback, ValidatingEditorCallback, XtendNatureAddingEditorCallback

public abstract class AbstractDirtyStateAwareEditorCallback
extends java.lang.Object
implements IXtextEditorCallback, DirtyStateEditorSupport.IDirtyStateEditorSupportClient

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.xtext.ui.editor.IXtextEditorCallback
IXtextEditorCallback.NullImpl
 
Constructor Summary
AbstractDirtyStateAwareEditorCallback()
           
 
Method Summary
 void addVerifyListener(org.eclipse.swt.events.VerifyListener listener)
           
 void afterCreatePartControl(XtextEditor editor)
           
 void afterSave(XtextEditor editor)
          Announce that the given editor's state is the same as the persisted state.
 void afterSetInput(XtextEditor editor)
           
 void beforeDispose(XtextEditor editor)
           
 void beforeSetInput(XtextEditor editor)
           
 IXtextDocument getDocument()
           
 org.eclipse.swt.widgets.Shell getShell()
          May return null in headless environments.
 boolean isDirty()
           
 boolean onValidateEditorInputState(XtextEditor editor)
           
 void removeVerifyListener(org.eclipse.swt.events.VerifyListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDirtyStateAwareEditorCallback

public AbstractDirtyStateAwareEditorCallback()
Method Detail

afterCreatePartControl

public void afterCreatePartControl(XtextEditor editor)
Specified by:
afterCreatePartControl in interface IXtextEditorCallback

beforeDispose

public void beforeDispose(XtextEditor editor)
Specified by:
beforeDispose in interface IXtextEditorCallback

afterSave

public void afterSave(XtextEditor editor)
Description copied from interface: IXtextEditorCallback
Announce that the given editor's state is the same as the persisted state.

Specified by:
afterSave in interface IXtextEditorCallback
Parameters:
editor - the editor which has not any unsaved changes

onValidateEditorInputState

public boolean onValidateEditorInputState(XtextEditor editor)
Specified by:
onValidateEditorInputState in interface IXtextEditorCallback

beforeSetInput

public void beforeSetInput(XtextEditor editor)
Specified by:
beforeSetInput in interface IXtextEditorCallback

afterSetInput

public void afterSetInput(XtextEditor editor)
Specified by:
afterSetInput in interface IXtextEditorCallback

isDirty

public boolean isDirty()
Specified by:
isDirty in interface DirtyStateEditorSupport.IDirtyStateEditorSupportClient

getDocument

public IXtextDocument getDocument()
Specified by:
getDocument in interface DirtyStateEditorSupport.IDirtyStateEditorSupportClient

addVerifyListener

public void addVerifyListener(org.eclipse.swt.events.VerifyListener listener)
Specified by:
addVerifyListener in interface DirtyStateEditorSupport.IDirtyStateEditorSupportClient

getShell

public org.eclipse.swt.widgets.Shell getShell()
Description copied from interface: DirtyStateEditorSupport.IDirtyStateEditorSupportClient
May return null in headless environments.

Specified by:
getShell in interface DirtyStateEditorSupport.IDirtyStateEditorSupportClient

removeVerifyListener

public void removeVerifyListener(org.eclipse.swt.events.VerifyListener listener)
Specified by:
removeVerifyListener in interface DirtyStateEditorSupport.IDirtyStateEditorSupportClient