public interface IQueryGroup
It handles more than one patterns as a group, and provides functionality to initialize the matchers together (which has performance benefits).
Modifier and Type | Method and Description |
---|---|
java.util.Set<IQuerySpecification<?>> |
getSpecifications()
Returns the currently assigned
IQuerySpecification s. |
void |
prepare(IncQueryEngine engine)
Initializes matchers for the group of patterns within an
IncQueryEngine . |
void |
prepare(org.eclipse.emf.common.notify.Notifier emfRoot)
Deprecated.
use
prepare(IncQueryEngine) instead, e.g. in conjunction with IncQueryEngine.on(Notifier) |
void prepare(IncQueryEngine engine) throws IncQueryException
IncQueryEngine
. If some of the pattern matchers are already
constructed in the engine, no task is performed for them.
This preparation step has the advantage that it prepares pattern matchers for an arbitrary number of patterns in a single-pass traversal of the model. This is typically more efficient than traversing the model each time an individual pattern matcher is initialized on demand. The performance benefit only manifests itself if the engine is not in wildcard mode.
engine
- the existing IncQuery engine in which the matchers will be created.IncQueryException
- if there was an error in preparing the engine@Deprecated void prepare(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryException
prepare(IncQueryEngine)
instead, e.g. in conjunction with IncQueryEngine.on(Notifier)
The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition). The match set will be incrementally refreshed upon updates from this scope.
emfRoot
- the root of the EMF tree where the pattern matchers will operate. Recommended: Resource or
ResourceSet.IncQueryException
- if an error occurs during pattern matcher creationjava.util.Set<IQuerySpecification<?>> getSpecifications()
IQuerySpecification
s.