public class EMFScope extends IncQueryScope
ResourceSet
s, a single ResourceSet
, Resource
or a containment subtree below a given EObject
.
The scope is characterized by a root and some options (see BaseIndexOptions
) such as dynamic EMF mode, subtree filtering etc.
The scope of pattern matching will be the given EMF model root(s) and below (see FAQ for more precise definition).
Constructor and Description |
---|
EMFScope(org.eclipse.emf.common.notify.Notifier scopeRoot)
Creates an EMF scope at the given root, with default options (recommended for most users).
|
EMFScope(org.eclipse.emf.common.notify.Notifier scopeRoot,
BaseIndexOptions options)
Creates an EMF scope at the given root, with customizable options.
|
EMFScope(java.util.Set<? extends org.eclipse.emf.common.notify.Notifier> scopeRoots,
BaseIndexOptions options)
Creates an EMF scope at the given roots, with customizable options.
|
EMFScope(java.util.Set<? extends org.eclipse.emf.ecore.resource.ResourceSet> scopeRoots)
Creates an EMF scope at the given roots, with default options (recommended for most users).
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static NavigationHelper |
extractUnderlyingEMFIndex(IncQueryEngine engine)
Provides access to the underlying EMF model index (
NavigationHelper ) from an IncQuery engine instantiated on an EMFScope |
BaseIndexOptions |
getOptions() |
org.eclipse.emf.common.notify.Notifier |
getScopeRoot()
Deprecated.
use
getScopeRoots() instead |
java.util.Set<? extends org.eclipse.emf.common.notify.Notifier> |
getScopeRoots() |
int |
hashCode() |
java.lang.String |
toString() |
isCompatibleWithQueryScope
public EMFScope(org.eclipse.emf.common.notify.Notifier scopeRoot) throws IncQueryException
scopeRoot
- the root of the EMF scopeIncQueryException
- if scopeRoot is not an EMF ResourceSet, Resource or EObjectpublic EMFScope(org.eclipse.emf.common.notify.Notifier scopeRoot, BaseIndexOptions options) throws IncQueryException
Most users should consider EMFScope(Notifier)
instead.
scopeRoot
- the root of the EMF scopeoptions
- the base index building settingsIncQueryException
- if scopeRoot is not an EMF ResourceSet, Resource or EObjectpublic EMFScope(java.util.Set<? extends org.eclipse.emf.ecore.resource.ResourceSet> scopeRoots) throws IncQueryException
scopeRoots
- the roots of the EMF scope, must be ResourceSet
sIncQueryException
- if not all scopeRoots are ResourceSet
spublic EMFScope(java.util.Set<? extends org.eclipse.emf.common.notify.Notifier> scopeRoots, BaseIndexOptions options) throws IncQueryException
Most users should consider EMFScope(Set)
instead.
scopeRoots
- the roots of the EMF scope, must be ResourceSet
soptions
- the base index building settingsIncQueryException
- if not all scopeRoots are ResourceSet
spublic java.util.Set<? extends org.eclipse.emf.common.notify.Notifier> getScopeRoots()
ResourceSet
s) containing the model@Deprecated public org.eclipse.emf.common.notify.Notifier getScopeRoot()
getScopeRoots()
insteadResourceSet
, Resource
or EObject
) containing the model, if there is only 1java.lang.IllegalStateException
- if there is more than 1 rootpublic BaseIndexOptions getOptions()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static NavigationHelper extractUnderlyingEMFIndex(IncQueryEngine engine) throws IncQueryException
NavigationHelper
) from an IncQuery engine instantiated on an EMFScopeengine
- an already existing EMF-IncQuery engine instantiated on an EMFScopeIncQueryException
- if base index initialization fails