Class DerivedStateAwareModelChangeListener
- java.lang.Object
-
- com._1c.g5.modeling.xtext.resource.DerivedStateAwareModelChangeListener
-
- All Implemented Interfaces:
IModelChangeListener
public class DerivedStateAwareModelChangeListener extends Object implements IModelChangeListener
IModelChangeListener
implementation aware of derived state computer for given resource.This implementation handles model change events and if
IDerivedStateComputer.isAffected(org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.common.notify.Notification)
returns true, then it forces discard and install of derived state for given resource.
-
-
Field Summary
Fields Modifier and Type Field Description protected IDerivedStateComputer
derivedStateComputer
protected org.eclipse.emf.ecore.resource.Resource
resource
-
Constructor Summary
Constructors Constructor Description DerivedStateAwareModelChangeListener(org.eclipse.emf.ecore.resource.Resource resource, IDerivedStateComputer derivedStateComputer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
modelChanged(org.eclipse.emf.common.notify.Notification event)
The source will invoce this method to announce changed resource.
-
-
-
Field Detail
-
resource
protected org.eclipse.emf.ecore.resource.Resource resource
-
derivedStateComputer
protected IDerivedStateComputer derivedStateComputer
-
-
Constructor Detail
-
DerivedStateAwareModelChangeListener
public DerivedStateAwareModelChangeListener(org.eclipse.emf.ecore.resource.Resource resource, IDerivedStateComputer derivedStateComputer)
Constructor.- Parameters:
resource
- the resource for which this derived state comuter computes derived data (cannot benull
).derivedStateComputer
- theIDerivedStateComputer
instance (cannot benull
).
-
-
Method Detail
-
modelChanged
public void modelChanged(org.eclipse.emf.common.notify.Notification event)
Description copied from interface:IModelChangeListener
The source will invoce this method to announce changed resource. The event will never be
null
. However, it may contain an empty list of deltas.Listeners are free to remove themselves from the sender of the event or add other listeners. However added listeners will not be informed about the current change.
This event fired synchronously.
- Specified by:
modelChanged
in interfaceIModelChangeListener
- Parameters:
event
- the fired event. Will never benull
.
-
-