org.eclipse.xtext.xtext
Class GrammarResource.LinkingTrigger

java.lang.Object
  extended by org.eclipse.xtext.xtext.GrammarResource.LinkingTrigger
All Implemented Interfaces:
IDerivedStateComputer
Enclosing class:
GrammarResource

public static class GrammarResource.LinkingTrigger
extends java.lang.Object
implements IDerivedStateComputer

Triggers the ecore inference as soon as someone wants to access the contents of a GrammarResource.


Constructor Summary
GrammarResource.LinkingTrigger()
           
 
Method Summary
 void discardDerivedState(DerivedStateAwareResource resource)
          is called when the resource is updated.
 void installDerivedState(DerivedStateAwareResource resource, boolean preLinkingPhase)
          callback to do modifications when and before getContents is called the first time on a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrammarResource.LinkingTrigger

public GrammarResource.LinkingTrigger()
Method Detail

installDerivedState

public void installDerivedState(DerivedStateAwareResource resource,
                                boolean preLinkingPhase)
Description copied from interface: IDerivedStateComputer
callback to do modifications when and before getContents is called the first time on a resource.

Specified by:
installDerivedState in interface IDerivedStateComputer
Parameters:
resource - the resource to install derived state on
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

public void discardDerivedState(DerivedStateAwareResource resource)
Description copied from interface: IDerivedStateComputer
is called when the resource is updated. Clients should revert all the changes they did during IDerivedStateComputer.installDerivedState(DerivedStateAwareResource, boolean)

Specified by:
discardDerivedState in interface IDerivedStateComputer