Runtime

org.eclipse.gmf.runtime.diagram.ui.resources.editor.document
Class DiagramModificationListener

java.lang.Object
  extended byorg.eclipse.emf.common.notify.impl.AdapterImpl
      extended byorg.eclipse.emf.ecore.util.EContentAdapter
          extended byorg.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramModificationListener
All Implemented Interfaces:
Adapter, Adapter.Internal
Direct Known Subclasses:
FileDiagramModificationListener

public class DiagramModificationListener
extends EContentAdapter

Listener for modification events on a diagram. This listener is well suited for detecting events that make a diagram dirty.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.emf.common.notify.Adapter
Adapter.Internal
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
DiagramModificationListener(AbstractDocumentProvider documentProvider, DiagramDocument document)
          Constructs a modification listener which listens to modifications on a diagram.
 
Method Summary
protected  DiagramDocument getDiagramDocument()
           
protected  org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
          Gets the editingDomain.
 Notifier getTarget()
           
 boolean isAdapterForType(java.lang.Object type)
           
 void notifyChanged(Notification notification)
           
 void setTarget(Notifier newTarget)
           
 void startListening()
           
 void stopListening()
           
 void unsetTarget(Notifier oldTarget)
           
 
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
 

Constructor Detail

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 dirtied
document - the DiagramDocument being dirtied
Method Detail

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)

notifyChanged

public void notifyChanged(Notification notification)

unsetTarget

public void unsetTarget(Notifier oldTarget)

getTarget

public Notifier getTarget()

setTarget

public void setTarget(Notifier newTarget)

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.