Package org.eclipse.xtext.xtext
Class GrammarResource.LinkingTrigger
- java.lang.Object
-
- 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 aGrammarResource
.
-
-
Constructor Summary
Constructors Constructor Description LinkingTrigger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfaceIDerivedStateComputer
- Parameters:
resource
- the resource to install derived state onpreLinkingPhase
- 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 duringIDerivedStateComputer.installDerivedState(DerivedStateAwareResource, boolean)
- Specified by:
discardDerivedState
in interfaceIDerivedStateComputer
-
-