org.eclipse.gmf.runtime.lite.edit.parts.update.canonical
Class AbstractNotationModelRefresher

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher
All Implemented Interfaces:
EventListener, org.eclipse.emf.transaction.ResourceSetListener, org.eclipse.emf.transaction.ResourceSetListener.Internal, INotationModelRefresher
Direct Known Subclasses:
ChildNotationModelRefresher, OwnedLinksNotationModelRefresher

public abstract class AbstractNotationModelRefresher
extends org.eclipse.emf.transaction.ResourceSetListenerImpl
implements INotationModelRefresher

Listens to the given transactional editing domain in order to update the notational model to reflect changes in the domain model.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener
org.eclipse.emf.transaction.ResourceSetListener.Internal
 
Constructor Summary
AbstractNotationModelRefresher()
           
 
Method Summary
abstract  org.eclipse.emf.common.command.Command buildRefreshNotationModelCommand()
          Creates and returns the command that will update the notational model to reflect changes in the domain model.
protected abstract  org.eclipse.emf.transaction.NotificationFilter createFilter()
           
protected abstract  CreateNotationalElementCommand getCreateNotationalElementCommand(ElementDescriptor descriptor)
          Returns a command that will create a notational element to represent the domain model element described by the given ElementDescriptor.
 org.eclipse.emf.transaction.NotificationFilter getFilter()
           
protected abstract  org.eclipse.gmf.runtime.notation.View getHost()
           
 org.eclipse.gmf.runtime.notation.View getView()
           
protected  int getVisualID(org.eclipse.gmf.runtime.notation.View view)
           
 void install(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
          Deprecated. Use TransactionalUpdateManager.
 boolean isInstalled()
          Deprecated. Use TransactionalUpdateManager.
 boolean isPrecommitOnly()
           
protected abstract  boolean shouldCreateView(ElementDescriptor descriptor)
           
protected  boolean shouldHandleNotification(org.eclipse.emf.common.notify.Notification nofitication)
          This method may be overridden in subclasses to filter unneeded notifications that passed the NotificationFilter.
 org.eclipse.emf.common.command.Command transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
           
 void uninstall()
          Deprecated. Use TransactionalUpdateManager.
 
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
getTarget, isAggregatePrecommitListener, isPostcommitOnly, resourceSetChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.transaction.ResourceSetListener
isAggregatePrecommitListener, isPostcommitOnly, resourceSetChanged
 

Constructor Detail

AbstractNotationModelRefresher

public AbstractNotationModelRefresher()
Method Detail

getView

public final org.eclipse.gmf.runtime.notation.View getView()
Specified by:
getView in interface INotationModelRefresher

install

public void install(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Deprecated. Use TransactionalUpdateManager.


isInstalled

public boolean isInstalled()
Deprecated. Use TransactionalUpdateManager.


uninstall

public void uninstall()
Deprecated. Use TransactionalUpdateManager.


isPrecommitOnly

public boolean isPrecommitOnly()
Specified by:
isPrecommitOnly in interface org.eclipse.emf.transaction.ResourceSetListener
Overrides:
isPrecommitOnly in class org.eclipse.emf.transaction.ResourceSetListenerImpl

transactionAboutToCommit

public org.eclipse.emf.common.command.Command transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
Specified by:
transactionAboutToCommit in interface org.eclipse.emf.transaction.ResourceSetListener
Overrides:
transactionAboutToCommit in class org.eclipse.emf.transaction.ResourceSetListenerImpl

getFilter

public org.eclipse.emf.transaction.NotificationFilter getFilter()
Specified by:
getFilter in interface org.eclipse.emf.transaction.ResourceSetListener
Overrides:
getFilter in class org.eclipse.emf.transaction.ResourceSetListenerImpl

buildRefreshNotationModelCommand

public abstract org.eclipse.emf.common.command.Command buildRefreshNotationModelCommand()
Creates and returns the command that will update the notational model to reflect changes in the domain model.

Specified by:
buildRefreshNotationModelCommand in interface INotationModelRefresher

shouldHandleNotification

protected boolean shouldHandleNotification(org.eclipse.emf.common.notify.Notification nofitication)
This method may be overridden in subclasses to filter unneeded notifications that passed the NotificationFilter. By default, it is assumed that all notifications that passed through the NotificationFilter could trigger the update.


getVisualID

protected int getVisualID(org.eclipse.gmf.runtime.notation.View view)

getCreateNotationalElementCommand

protected abstract CreateNotationalElementCommand getCreateNotationalElementCommand(ElementDescriptor descriptor)
Returns a command that will create a notational element to represent the domain model element described by the given ElementDescriptor.


createFilter

protected abstract org.eclipse.emf.transaction.NotificationFilter createFilter()

shouldCreateView

protected abstract boolean shouldCreateView(ElementDescriptor descriptor)

getHost

protected abstract org.eclipse.gmf.runtime.notation.View getHost()


Copyright © 2012. All Rights Reserved.