edu.cmu.sei.aadl.aadl2.instance.presentation
Class ResourceLoadedListener

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by org.eclipse.emf.transaction.DemultiplexingListener
          extended by edu.cmu.sei.aadl.aadl2.instance.presentation.ResourceLoadedListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.emf.transaction.ResourceSetListener, org.eclipse.emf.transaction.ResourceSetListener.Internal

public class ResourceLoadedListener
extends org.eclipse.emf.transaction.DemultiplexingListener

Listens for the loading of resources, and creates editors on them when they load.

Author:
Christian W. Damus (cdamus)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener
org.eclipse.emf.transaction.ResourceSetListener.Internal
 
Constructor Summary
ResourceLoadedListener()
          Initializes me with my filter.
 
Method Summary
static ResourceLoadedListener getDefault()
          Returns the default listener instance.
protected  void handleNotification(org.eclipse.emf.transaction.TransactionalEditingDomain domain, org.eclipse.emf.common.notify.Notification notification)
           
 void ignore(org.eclipse.emf.ecore.resource.Resource res)
          Ignores any future load/unload notifications from the specified resource, until the next call to watch(res).
 void watch(org.eclipse.emf.ecore.resource.Resource res)
          Ceases to ignore(Resource) a previously ignored resource.
 
Methods inherited from class org.eclipse.emf.transaction.DemultiplexingListener
isPostcommitOnly, resourceSetChanged
 
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
getFilter, getTarget, isAggregatePrecommitListener, isPrecommitOnly, setTarget, transactionAboutToCommit, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLoadedListener

public ResourceLoadedListener()
Initializes me with my filter.

Method Detail

getDefault

public static ResourceLoadedListener getDefault()
Returns the default listener instance.

Returns:
the instance associated with the editing domain that manages the specified resource set, or null if none is found

ignore

public void ignore(org.eclipse.emf.ecore.resource.Resource res)
Ignores any future load/unload notifications from the specified resource, until the next call to watch(res).

Parameters:
res - the resource to ignore

watch

public void watch(org.eclipse.emf.ecore.resource.Resource res)
Ceases to ignore(Resource) a previously ignored resource.

Parameters:
res - the resource

handleNotification

protected void handleNotification(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
                                  org.eclipse.emf.common.notify.Notification notification)
Specified by:
handleNotification in class org.eclipse.emf.transaction.DemultiplexingListener