org.eclipse.gmf.runtime.diagram.ui.resources.editor.document
Class DiagramModificationListener
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.ecore.util.EContentAdapter
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramModificationListener
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal
- Direct Known Subclasses:
- FileDiagramModificationListener
public class DiagramModificationListener
- extends org.eclipse.emf.ecore.util.EContentAdapter
Listener for modification events on a diagram.
This listener is well suited for detecting events that make a diagram dirty.
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
target |
Methods inherited from class org.eclipse.emf.ecore.util.EContentAdapter |
addAdapter, basicSetTarget, basicUnsetTarget, handleContainment, removeAdapter, resolve, selfAdapt, setTarget, setTarget, setTarget, unsetTarget, unsetTarget, unsetTarget, unsetTarget |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiagramModificationListener
public DiagramModificationListener(AbstractDocumentProvider documentProvider,
DiagramDocument document)
- Constructs a modification listener which listens to modifications on
a diagram.
- Parameters:
documentProvider
- the FileDocumentProvider to handle the document
being dirtieddocument
- the DiagramDocument being dirtiedelement
- the IFileEditorInput that contains the file being saved
startListening
public void startListening()
stopListening
public void stopListening()
getEditingDomain
protected org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
- Gets the editingDomain.
- Returns:
- Returns the editingDomain.
getDiagramDocument
protected DiagramDocument getDiagramDocument()
isAdapterForType
public boolean isAdapterForType(java.lang.Object type)
- Specified by:
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
isAdapterForType
in class org.eclipse.emf.common.notify.impl.AdapterImpl
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
notifyChanged
in class org.eclipse.emf.ecore.util.EContentAdapter
unsetTarget
public void unsetTarget(org.eclipse.emf.common.notify.Notifier oldTarget)
- Specified by:
unsetTarget
in interface org.eclipse.emf.common.notify.Adapter.Internal
- Overrides:
unsetTarget
in class org.eclipse.emf.ecore.util.EContentAdapter
getTarget
public org.eclipse.emf.common.notify.Notifier getTarget()
- Specified by:
getTarget
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
getTarget
in class org.eclipse.emf.common.notify.impl.AdapterImpl
setTarget
public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
- Specified by:
setTarget
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
setTarget
in class org.eclipse.emf.ecore.util.EContentAdapter
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.