Interface IDerivedStateComputer
-
public interface IDerivedStateComputerDerived state computer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddiscardDerivedState(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event)is called when the resource is updated.voidinstallDerivedState(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event, boolean preLinkingPhase)callback to do modifications when and before getContents is called the first time on a resource.booleanisAffected(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event)Checks if model change event affects derived state of the given resource.
-
-
-
Method Detail
-
installDerivedState
void installDerivedState(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event, boolean preLinkingPhase)callback to do modifications when and before getContents is called the first time on a resource.- Parameters:
resource- the resource to install derived state onevent- the model change event, can be null.preLinkingPhase- whether the call is done in a pre-linking phase. During this phase clients may not do linking which relies on indexed information, because the index might not be fully computed yet.
-
discardDerivedState
void discardDerivedState(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event)is called when the resource is updated. Clients should revert all the changes they did during#installDerivedState(Resource, boolean)- Parameters:
resource- the resource to discard derived state onevent- the model change event, can be null.
-
isAffected
boolean isAffected(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.common.notify.Notification event)Checks if model change event affects derived state of the given resource.- Parameters:
resource- the resource to install derived state onevent- the model change event.- Returns:
- true if derived state should be recomputed for the given resource, false if this model changes doesn't affect derived state.
-
-