public interface NavigationHelper
EClass
EReference
instances (heterogenous paths too)
EAttribute
)
Such indices will be built on an EMF model rooted at an EObject
, Resource
or ResourceSet
.
The boundaries of the model are defined by the containment (sub)tree.
The indices will be maintained incrementally on changes to the model; these updates can also be
observed by registering listeners.
One of the options is to build indices in wildcard mode, meaning that all EClasses, EDataTypes, EReferences and EAttributes are indexed. This is convenient, but comes at a high memory cost. To save memory, one can disable wildcard mode and manually register those EClasses, EDataTypes, EReferences and EAttributes that should be indexed.
Another choice is whether to build indices in dynamic EMF mode, meaning that types are identified by the String IDs that are ultimately derived from the nsURI of the EPackage. Multiple types with the same ID are treated as the same. This is useful if dynamic EMF is used, where there can be multiple copies (instantiations) of the same EPackage, representing essentially the same metamodel. If one disables dynamic EMF mode, an error is logged if duplicate EPackages with the same nsURI are encountered.
Note that none of the defined query methods return null upon empty result sets. All query methods return either a copy of
the result sets (where EStructuralFeature.Setting
is instantiated) or an unmodifiable collection of the result view.
Instantiate using IncQueryBaseFactory
Modifier and Type | Method and Description |
---|---|
void |
addBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
Adds a coarse-grained listener that will be invoked after the NavigationHelper index or the underlying model is changed.
|
void |
addDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types,
DataTypeListener listener)
The given
listener will be notified from now on whenever instances the given EDataType s
are added to or removed from the model. |
void |
addFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features,
FeatureListener listener)
The given
listener will be notified from now on whenever instances the given EStructuralFeature s
are added to or removed from the model. |
boolean |
addIndexingErrorListener(IEMFIndexingErrorListener listener)
Adds a listener for internal errors in the index.
|
void |
addInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes,
InstanceListener listener)
The given
listener will be notified from now on whenever instances the given EClass es
(and any of their subtypes) are added to or removed from the model. |
boolean |
addLightweightEObjectObserver(LightweightEObjectObserver observer,
org.eclipse.emf.ecore.EObject observedObject)
Register a lightweight observer that is notified if the value of any feature of the given EObject changes.
|
void |
addRoot(org.eclipse.emf.common.notify.Notifier emfRoot)
Adds an additional EMF model root.
|
void |
cheapMoveTo(org.eclipse.emf.ecore.EObject element,
org.eclipse.emf.ecore.EObject parent,
org.eclipse.emf.ecore.EReference containmentFeature)
Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model.
|
<T extends org.eclipse.emf.ecore.EObject> |
cheapMoveTo(T element,
org.eclipse.emf.common.util.EList<T> targetContainmentReferenceList)
Moves an EObject (along with its entire containment subtree) within the containment hierarchy of the EMF model.
|
<V> V |
coalesceTraversals(java.util.concurrent.Callable<V> callable)
The given callback will be executed, and all model traversals and index registrations will be delayed until the
execution is done.
|
void |
dispose()
Call this method to dispose the NavigationHelper.
|
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> |
findByAttributeValue(java.lang.Object value)
For a given attribute value
value , find each EAttribute and host EObject
such that this attribute of the the host object takes the given value. |
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> |
findByAttributeValue(java.lang.Object value,
java.util.Collection<org.eclipse.emf.ecore.EAttribute> attributes)
For given
attributes and an attribute value value , find each host EObject
such that any of these attributes of the the host object takes the given value. |
java.util.Set<org.eclipse.emf.ecore.EObject> |
findByAttributeValue(java.lang.Object value,
org.eclipse.emf.ecore.EAttribute attribute)
Find all
EObject s for which the given attribute takes the given value . |
java.util.Set<org.eclipse.emf.ecore.EObject> |
findByFeatureValue(java.lang.Object value,
org.eclipse.emf.ecore.EStructuralFeature feature)
Find all source
EObject s for which the given feature points to / takes the given value . |
java.util.Set<org.eclipse.emf.ecore.EClass> |
getAllCurrentClasses()
Returns all EClasses that currently have direct instances cached by the index.
|
java.util.Set<org.eclipse.emf.ecore.EObject> |
getAllInstances(org.eclipse.emf.ecore.EClass clazz)
Get the all
EObject instances of the given EClass . |
java.util.Set<java.lang.Object> |
getDataTypeInstances(org.eclipse.emf.ecore.EDataType type)
Returns the set of instances for the given
EDataType that can be found in the model. |
java.util.Set<org.eclipse.emf.ecore.EObject> |
getDirectInstances(org.eclipse.emf.ecore.EClass clazz)
Get the direct
EObject instances of the given EClass . |
java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Set<java.lang.Object>> |
getFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature)
Find all value assignment instances of the given
EStructuralFeature in the form
of a host EObject -> value(s) multimap. |
java.util.Set<java.lang.Object> |
getFeatureTargets(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature)
Find all
Object s that are the target of the EStructuralFeature feature from the given
source EObject . |
java.util.Set<org.eclipse.emf.ecore.EObject> |
getHoldersOfFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Returns those host
EObject s that have a non-null value for the given feature
(at least one, in case of multi-valued references). |
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> |
getInverseReferences(org.eclipse.emf.ecore.EObject target)
For a given
EObject target , find each EReference and source EObject
such that this reference (list) of the the host object points to the given target object. |
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> |
getInverseReferences(org.eclipse.emf.ecore.EObject target,
java.util.Collection<org.eclipse.emf.ecore.EReference> references)
For given
references and an EObject target , find each source EObject
such that any of these references of the the source object points to the given target object. |
java.util.Set<org.eclipse.emf.ecore.EObject> |
getInverseReferences(org.eclipse.emf.ecore.EObject target,
org.eclipse.emf.ecore.EReference reference)
Find all source
EObject s for which the given reference points to the given target object. |
java.util.Set<org.eclipse.emf.ecore.EObject> |
getReferenceValues(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EReference reference)
Find all
EObject s that are the target of the EReference reference from the given
source EObject . |
boolean |
isCoalescing()
Examines whether execution is currently in the callable
block of an invocation of {#link
coalesceTraversals(Callable) }. |
boolean |
isInDynamicEMFMode()
Indicates whether indexing is performed in dynamic EMF mode, i.e.
|
boolean |
isInWildcardMode()
Indicates whether indexing is performed in wildcard mode, where every aspect of the EMF model is
automatically indexed.
|
void |
processAllFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature,
IEStructuralFeatureProcessor processor)
Traverses all instances of a selected feature stored in the base index, and allows executing a custom function on
it.
|
void |
processAllInstances(org.eclipse.emf.ecore.EClass type,
IEClassifierProcessor.IEClassProcessor processor)
Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on
it.
|
void |
processDataTypeInstances(org.eclipse.emf.ecore.EDataType type,
IEClassifierProcessor.IEDataTypeProcessor processor)
Traverses all instances of a selected data type stored in the base index, and allows executing a custom function on
it.
|
void |
processDirectInstances(org.eclipse.emf.ecore.EClass type,
IEClassifierProcessor.IEClassProcessor processor)
Traverses all direct instances of a selected class stored in the base index, and allows executing a custom function on
it.
|
void |
registerEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
Manually turns on indexing for the given classes (indexing of other classes are unaffected).
|
void |
registerEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
Manually turns on indexing for the given data types (indexing of other features are unaffected).
|
void |
registerEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
Manually turns on indexing for the given features (indexing of other features are unaffected).
|
void |
registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes,
java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes,
java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
Manually turns on indexing for the given types (indexing of others are unaffected).
|
void |
removeBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
Removes a registered listener.
|
void |
removeDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types,
DataTypeListener listener)
Unregisters a data type listener for the given types.
|
void |
removeFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features,
FeatureListener listener)
Unregisters a feature listener for the given features.
|
boolean |
removeIndexingErrorListener(IEMFIndexingErrorListener listener)
Removes a listener for internal errors in the index
|
void |
removeInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes,
InstanceListener listener)
Unregisters an instance listener for the given classes.
|
boolean |
removeLightweightEObjectObserver(LightweightEObjectObserver observer,
org.eclipse.emf.ecore.EObject observedObject)
Unregisters a lightweight observer for the given EObject.
|
void |
resampleDerivedFeatures()
Updates the value of indexed derived features that are not well-behaving.
|
java.lang.Object |
toCanonicalValueRepresentation(java.lang.Object value)
Returns the internal, canonicalized implementation of an attribute value.
|
void |
unregisterEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
Manually turns off indexing for the given classes (indexing of other classes are unaffected).
|
void |
unregisterEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
Manually turns off indexing for the given data types (indexing of other data types are unaffected).
|
void |
unregisterEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
Manually turns off indexing for the given features (indexing of other features are unaffected).
|
void |
unregisterObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes,
java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes,
java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
Manually turns off indexing for the given types (indexing of others are unaffected).
|
boolean isInWildcardMode()
boolean isInDynamicEMFMode()
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value)
value
, find each EAttribute
and host EObject
such that this attribute of the the host object takes the given value. The method will
return a set of EStructuralFeature.Setting
s, one for each such host object - EAttribute - value triplet.
Precondition: Unset / null attribute values are not indexed, so value!=null
Precondition: Will only find those EAttributes that have already been registered using
registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
isInWildcardMode()
).
value
- the value of the attributeEStructuralFeature.Setting
s, one for each EObject and EAttribute that have the given valuefindByAttributeValue(Object)
java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value, java.util.Collection<org.eclipse.emf.ecore.EAttribute> attributes)
attributes
and an attribute value value
, find each host EObject
such that any of these attributes of the the host object takes the given value. The method will
return a set of EStructuralFeature.Setting
s, one for each such host object - EAttribute - value triplet.
Precondition: Unset / null attribute values are not indexed, so value!=null
Precondition: Will only find those EAttributes that have already been registered using
registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
isInWildcardMode()
).
value
- the value of the attributeattributes
- the collection of attributes that should take the given valueEStructuralFeature.Setting
s, one for each EObject and attribute that have the given valuejava.util.Set<org.eclipse.emf.ecore.EObject> findByAttributeValue(java.lang.Object value, org.eclipse.emf.ecore.EAttribute attribute)
EObject
s for which the given attribute
takes the given value
.
Precondition: Unset / null attribute values are not indexed, so value!=null
Precondition: Results will be returned only if either (a) the EAttribute has already been
registered using registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
value
- the value of the attributeattribute
- the EAttribute that should take the given valueEObject
s for which the given attribute has the given valuejava.util.Set<java.lang.Object> getDataTypeInstances(org.eclipse.emf.ecore.EDataType type)
EDataType
that can be found in the model.
Precondition: Results will be returned only if either (a) the EDataType has already been
registered using registerEDataTypes(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
type
- the data typejava.util.Set<org.eclipse.emf.ecore.EObject> getReferenceValues(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EReference reference)
EObject
s that are the target of the EReference reference
from the given
source
EObject
.
Unset / null-valued references are not indexed, and will not be included in the results.
Precondition: Results will be returned only if either (a) the reference has already been
registered using registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
source
- the host objectreference
- an EReference of the host objectEObject
s that the given reference points to, from the given source objectjava.util.Set<java.lang.Object> getFeatureTargets(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)
Object
s that are the target of the EStructuralFeature feature
from the given
source
EObject
.
Unset / null-valued features are not indexed, and will not be included in the results.
Precondition: Results will be returned only if either (a) the feature has already been
registered, or (b) running in wildcard mode (see
isInWildcardMode()
).
source
- the host objectfeature
- an EStructuralFeature of the host objectgetReferenceValues(EObject, EReference)
java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Set<java.lang.Object>> getFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature)
EStructuralFeature
in the form
of a host EObject
-> value(s) multimap.
Unset / null-valued features are not indexed, and will not be included in the results.
Precondition: Results will be returned only if either (a) the feature has already been
registered, or (b) running in wildcard mode (see
isInWildcardMode()
).
feature
- the EStructuralFeatureEObject
s to the value(s) of the given featurejava.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> getInverseReferences(org.eclipse.emf.ecore.EObject target)
EObject
target
, find each EReference
and source EObject
such that this reference (list) of the the host object points to the given target object. The method will
return a set of EStructuralFeature.Setting
s, one for each such source object - EReference - target triplet.
Precondition: Unset / null reference values are not indexed, so target!=null
Precondition: Results will be returned only for those references that have already been
registered using registerEStructuralFeatures(Set)
, or all references if running in
wildcard mode (see isInWildcardMode()
).
target
- the EObject pointed to by the referencesEStructuralFeature.Setting
s, one for each source EObject and reference that point to the given targetjava.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> getInverseReferences(org.eclipse.emf.ecore.EObject target, java.util.Collection<org.eclipse.emf.ecore.EReference> references)
references
and an EObject
target
, find each source EObject
such that any of these references of the the source object points to the given target object. The method will
return a set of EStructuralFeature.Setting
s, one for each such source object - EReference - target triplet.
Precondition: Unset / null reference values are not indexed, so target!=null
Precondition: Will only find those EReferences that have already been registered using
registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
isInWildcardMode()
).
target
- the EObject pointed to by the referencesreferences
- a set of EReferences pointing to the targetEStructuralFeature.Setting
s, one for each source EObject and reference that point to the given targetjava.util.Set<org.eclipse.emf.ecore.EObject> getInverseReferences(org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EReference reference)
EObject
s for which the given reference
points to the given target
object.
Precondition: Unset / null reference values are not indexed, so target!=null
Precondition: Results will be returned only if either (a) the reference has already been
registered using registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
target
- the EObject pointed to by the referencesreference
- an EReference pointing to the targetEObject
s for which the given reference points to the given target objectjava.util.Set<org.eclipse.emf.ecore.EObject> getDirectInstances(org.eclipse.emf.ecore.EClass clazz)
EObject
instances of the given EClass
. Instances of subclasses will be excluded.
Precondition: Results will be returned only if either (a) the EClass (or any superclass) has
already been registered using registerEClasses(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
clazz
- an EClassEObject
direct instances of the given EClass (not of subclasses)getAllInstances(EClass)
java.util.Set<org.eclipse.emf.ecore.EObject> getAllInstances(org.eclipse.emf.ecore.EClass clazz)
EObject
instances of the given EClass
.
This includes instances of subclasses.
Precondition: Results will be returned only if either (a) the EClass (or any superclass) has
already been registered using registerEClasses(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
clazz
- an EClassEObject
instances of the given EClass and any of its subclassesgetDirectInstances(EClass)
java.util.Set<org.eclipse.emf.ecore.EObject> findByFeatureValue(java.lang.Object value, org.eclipse.emf.ecore.EStructuralFeature feature)
EObject
s for which the given feature
points to / takes the given value
.
Precondition: Unset / null-valued features are not indexed, so value!=null
Precondition: Results will be returned only if either (a) the feature has already been
registered using registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
value
- the value of the featurefeature
- the feature instanceEObject
instancesjava.util.Set<org.eclipse.emf.ecore.EObject> getHoldersOfFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
EObject
s that have a non-null value for the given feature
(at least one, in case of multi-valued references).
Unset / null-valued features are not indexed, and will not be included in the results.
Precondition: Results will be returned only if either (a) the feature has already been
registered using registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
isInWildcardMode()
).
feature
- a structural featureEObject
s that have some value for the given structural featurevoid dispose()
After its disposal, the NavigationHelper will no longer listen to EMF change notifications, and it will be possible to GC it even if the model is retained in memory.
java.lang.IllegalStateException
- if there are any active listenersvoid addInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)
listener
will be notified from now on whenever instances the given EClass
es
(and any of their subtypes) are added to or removed from the model.classes
- the collection of classes whose instances the listener should be notified oflistener
- the listener instancevoid removeInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)
classes
- the collection of classeslistener
- the listener instancevoid addDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)
listener
will be notified from now on whenever instances the given EDataType
s
are added to or removed from the model.types
- the collection of types associated to the listenerlistener
- the listener instancevoid removeDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)
types
- the collection of data typeslistener
- the listener instancevoid addFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)
listener
will be notified from now on whenever instances the given EStructuralFeature
s
are added to or removed from the model.features
- the collection of features associated to the listenerlistener
- the listener instancevoid removeFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)
listener
- the listener instancefeatures
- the collection of featuresboolean addLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)
observer
- the listener instanceobservedObject
- the observed EObjectboolean removeLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)
observer
- the listener instanceobservedObject
- the observed EObjectvoid registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes, java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes, java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
classes
- the set of classes to observe (null okay)dataTypes
- the set of data types to observe (null okay)features
- the set of features to observe (null okay)java.lang.IllegalStateException
- if in wildcard modevoid unregisterObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes, java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes, java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
classes
- the set of classes that will be ignored again from now on (null okay)dataTypes
- the set of data types that will be ignored again from now on (null okay)features
- the set of features that will be ignored again from now on (null okay)java.lang.IllegalStateException
- if in wildcard mode, or if there are listeners registered for the given typesvoid registerEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
features
- the set of features to observejava.lang.IllegalStateException
- if in wildcard modevoid unregisterEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
features
- the set of features that will be ignored again from now onjava.lang.IllegalStateException
- if in wildcard mode, or if there are listeners registered for the given typesvoid registerEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
classes
- the set of classes to observejava.lang.IllegalStateException
- if in wildcard modevoid unregisterEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
classes
- the set of classes that will be ignored again from now onjava.lang.IllegalStateException
- if in wildcard mode, or if there are listeners registered for the given typesvoid registerEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
dataTypes
- the set of data types to observejava.lang.IllegalStateException
- if in wildcard modevoid unregisterEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
dataTypes
- the set of data types that will be ignored again from now onjava.lang.IllegalStateException
- if in wildcard mode, or if there are listeners registered for the given types<V> V coalesceTraversals(java.util.concurrent.Callable<V> callable) throws java.lang.reflect.InvocationTargetException
callable
- java.lang.reflect.InvocationTargetException
boolean isCoalescing()
coalesceTraversals(Callable)
}.void addBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
removeBaseIndexChangeListener(EMFBaseIndexChangeListener)
listener
- void removeBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
addBaseIndexChangeListener(EMFBaseIndexChangeListener)
listener
- void addRoot(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryBaseException
emfRoot
- IncQueryBaseException
<T extends org.eclipse.emf.ecore.EObject> void cheapMoveTo(T element, org.eclipse.emf.common.util.EList<T> targetContainmentReferenceList)
When indexing is enabled, such a relocation is costly if performed through normal getters/setters, as the index for the entire subtree is pruned at the old location and reconstructed at the new one. This method provides a workaround to keep the operation cheap.
This method is experimental. Re-entrancy not supported.
element
- the eObject to be movedtargetContainmentReferenceList
- containment list of the new parent object into which the element has to be movedvoid cheapMoveTo(org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference containmentFeature)
When indexing is enabled, such a relocation is costly if performed through normal getters/setters, as the index for the entire subtree is pruned at the old location and reconstructed at the new one. This method provides a workaround to keep the operation cheap.
This method is experimental. Re-entrancy not supported.
element
- the eObject to be movedparent
- the new parent object under which the element has to be movedcontainmentFeature
- the kind of containment reference that should be established between the new parent and the elementvoid processDataTypeInstances(org.eclipse.emf.ecore.EDataType type, IEClassifierProcessor.IEDataTypeProcessor processor)
type
- processor
- void processAllInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)
type
- processor
- void processDirectInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)
type
- processor
- void processAllFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature, IEStructuralFeatureProcessor processor)
Precondition: Will only find those EAttributes that have already been registered using
registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
isInWildcardMode()
).
feature
- processor
- java.util.Set<org.eclipse.emf.ecore.EClass> getAllCurrentClasses()
void resampleDerivedFeatures()
boolean addIndexingErrorListener(IEMFIndexingErrorListener listener)
listener
- boolean removeIndexingErrorListener(IEMFIndexingErrorListener listener)
listener
- java.lang.Object toCanonicalValueRepresentation(java.lang.Object value)
Behaviour: when in dynamic EMF mode, substitutes enum literals with a canonical version of the enum literal. Otherwise, returns the input.
The canonical enum literal will be guaranteed to be a valid EMF enum literal (Enumerator
),
and the best effort is made to ensure that it will be the same for all versions of the EEnum
,
including EEnumLiteral
s in different versions of ecore packages, as well as Java enums generated from them..
Usage is not required when simply querying the indexed model through the NavigationHelper
API,
as both method inputs and the results returned are automatically canonicalized in dynamic EMF mode.
Using this method is required only if the client wants to do querying/filtering on the results returned, and wants to know what to look for.