public class NavigationHelperImpl extends java.lang.Object implements NavigationHelper
Constructor and Description |
---|
NavigationHelperImpl(org.eclipse.emf.common.notify.Notifier emfRoot,
BaseIndexOptions options,
org.apache.log4j.Logger logger) |
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 type)
Get the all
EObject instances of the given EClass . |
java.util.Set<java.lang.Object> |
getAllObservedClassesInternal()
not just the directly observed classes, but also their known subtypes
|
BaseIndexOptions |
getBaseIndexOptions() |
EMFModelComprehension |
getComprehension() |
NavigationHelperContentAdapter |
getContentAdapter() |
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 type)
Get the direct
EObject instances of the given EClass . |
java.util.Set<java.lang.Object> |
getDirectlyObservedClassesInternal() |
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.Map<LightweightEObjectObserver,java.util.Collection<org.eclipse.emf.ecore.EObject>> |
getLightweightObservers() |
java.util.Set<java.lang.Object> |
getObservedDataTypesInternal() |
java.util.Set<java.lang.Object> |
getObservedFeaturesInternal() |
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
NavigationHelper.coalesceTraversals(Callable) }. |
boolean |
isExpansionAllowed() |
boolean |
isFeatureResolveIgnored(org.eclipse.emf.ecore.EStructuralFeature feature) |
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 |
notifyErrorListener(java.lang.String message,
java.lang.Throwable t) |
void |
notifyFatalListener(java.lang.String message,
java.lang.Throwable t) |
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()
Resamples the values of not well-behaving derived features if those features are also indexed.
|
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).
|
public NavigationHelperImpl(org.eclipse.emf.common.notify.Notifier emfRoot, BaseIndexOptions options, org.apache.log4j.Logger logger) throws IncQueryBaseException
IncQueryBaseException
public boolean isInWildcardMode()
NavigationHelper
isInWildcardMode
in interface NavigationHelper
public boolean isInDynamicEMFMode()
NavigationHelper
isInDynamicEMFMode
in interface NavigationHelper
public BaseIndexOptions getBaseIndexOptions()
public EMFModelComprehension getComprehension()
public NavigationHelperContentAdapter getContentAdapter()
public java.util.Set<java.lang.Object> getObservedFeaturesInternal()
public boolean isFeatureResolveIgnored(org.eclipse.emf.ecore.EStructuralFeature feature)
public void dispose()
NavigationHelper
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.
dispose
in interface NavigationHelper
public java.util.Set<java.lang.Object> getDataTypeInstances(org.eclipse.emf.ecore.EDataType type)
NavigationHelper
EDataType
that can be found in the model.
Precondition: Results will be returned only if either (a) the EDataType has already been
registered using NavigationHelper.registerEDataTypes(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getDataTypeInstances
in interface NavigationHelper
type
- the data typepublic java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value_)
NavigationHelper
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
NavigationHelper.registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
findByAttributeValue
in interface NavigationHelper
value_
- the value of the attributeEStructuralFeature.Setting
s, one for each EObject and EAttribute that have the given valueNavigationHelper.findByAttributeValue(Object)
public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> findByAttributeValue(java.lang.Object value_, java.util.Collection<org.eclipse.emf.ecore.EAttribute> attributes)
NavigationHelper
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
NavigationHelper.registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
findByAttributeValue
in interface NavigationHelper
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 valuepublic java.util.Set<org.eclipse.emf.ecore.EObject> findByAttributeValue(java.lang.Object value_, org.eclipse.emf.ecore.EAttribute attribute)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
findByAttributeValue
in interface NavigationHelper
value_
- the value of the attributeattribute
- the EAttribute that should take the given valueEObject
s for which the given attribute has the given valuepublic void processAllFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature feature, IEStructuralFeatureProcessor processor)
NavigationHelper
Precondition: Will only find those EAttributes that have already been registered using
NavigationHelper.registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
processAllFeatureInstances
in interface NavigationHelper
public void processDirectInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)
NavigationHelper
processDirectInstances
in interface NavigationHelper
public void processAllInstances(org.eclipse.emf.ecore.EClass type, IEClassifierProcessor.IEClassProcessor processor)
NavigationHelper
processAllInstances
in interface NavigationHelper
public void processDataTypeInstances(org.eclipse.emf.ecore.EDataType type, IEClassifierProcessor.IEDataTypeProcessor processor)
NavigationHelper
processDataTypeInstances
in interface NavigationHelper
public java.util.Set<org.eclipse.emf.ecore.EStructuralFeature.Setting> getInverseReferences(org.eclipse.emf.ecore.EObject target)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or all references if running in
wildcard mode (see NavigationHelper.isInWildcardMode()
).
getInverseReferences
in interface NavigationHelper
target
- the EObject pointed to by the referencesEStructuralFeature.Setting
s, one for each source EObject and reference that point to the given targetpublic 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)
NavigationHelper
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
NavigationHelper.registerEStructuralFeatures(Set)
, unless running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getInverseReferences
in interface NavigationHelper
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 targetpublic java.util.Set<org.eclipse.emf.ecore.EObject> getInverseReferences(org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EReference reference)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getInverseReferences
in interface NavigationHelper
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 objectpublic java.util.Set<org.eclipse.emf.ecore.EObject> getReferenceValues(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EReference reference)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getReferenceValues
in interface NavigationHelper
source
- the host objectreference
- an EReference of the host objectEObject
s that the given reference points to, from the given source objectpublic java.util.Set<java.lang.Object> getFeatureTargets(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature _feature)
NavigationHelper
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
NavigationHelper.isInWildcardMode()
).
getFeatureTargets
in interface NavigationHelper
source
- the host object_feature
- an EStructuralFeature of the host objectNavigationHelper.getReferenceValues(EObject, EReference)
public java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Set<java.lang.Object>> getFeatureInstances(org.eclipse.emf.ecore.EStructuralFeature _feature)
NavigationHelper
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
NavigationHelper.isInWildcardMode()
).
getFeatureInstances
in interface NavigationHelper
_feature
- the EStructuralFeatureEObject
s to the value(s) of the given featurepublic java.util.Set<org.eclipse.emf.ecore.EObject> getDirectInstances(org.eclipse.emf.ecore.EClass type)
NavigationHelper
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 NavigationHelper.registerEClasses(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getDirectInstances
in interface NavigationHelper
type
- an EClassEObject
direct instances of the given EClass (not of subclasses)NavigationHelper.getAllInstances(EClass)
public java.lang.Object toCanonicalValueRepresentation(java.lang.Object value)
NavigationHelper
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.
toCanonicalValueRepresentation
in interface NavigationHelper
public java.util.Set<org.eclipse.emf.ecore.EObject> getAllInstances(org.eclipse.emf.ecore.EClass type)
NavigationHelper
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 NavigationHelper.registerEClasses(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getAllInstances
in interface NavigationHelper
type
- an EClassEObject
instances of the given EClass and any of its subclassesNavigationHelper.getDirectInstances(EClass)
public java.util.Set<org.eclipse.emf.ecore.EObject> findByFeatureValue(java.lang.Object value_, org.eclipse.emf.ecore.EStructuralFeature _feature)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
findByFeatureValue
in interface NavigationHelper
value_
- the value of the feature_feature
- the feature instanceEObject
instancespublic java.util.Set<org.eclipse.emf.ecore.EObject> getHoldersOfFeature(org.eclipse.emf.ecore.EStructuralFeature _feature)
NavigationHelper
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 NavigationHelper.registerEStructuralFeatures(Set)
, or (b) running in wildcard mode (see
NavigationHelper.isInWildcardMode()
).
getHoldersOfFeature
in interface NavigationHelper
_feature
- a structural featureEObject
s that have some value for the given structural featurepublic void addInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)
NavigationHelper
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.addInstanceListener
in interface NavigationHelper
classes
- the collection of classes whose instances the listener should be notified oflistener
- the listener instancepublic void removeInstanceListener(java.util.Collection<org.eclipse.emf.ecore.EClass> classes, InstanceListener listener)
NavigationHelper
removeInstanceListener
in interface NavigationHelper
classes
- the collection of classeslistener
- the listener instancepublic void addFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)
NavigationHelper
listener
will be notified from now on whenever instances the given EStructuralFeature
s
are added to or removed from the model.addFeatureListener
in interface NavigationHelper
features
- the collection of features associated to the listenerlistener
- the listener instancepublic void removeFeatureListener(java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature> features, FeatureListener listener)
NavigationHelper
removeFeatureListener
in interface NavigationHelper
features
- the collection of featureslistener
- the listener instancepublic void addDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)
NavigationHelper
listener
will be notified from now on whenever instances the given EDataType
s
are added to or removed from the model.addDataTypeListener
in interface NavigationHelper
types
- the collection of types associated to the listenerlistener
- the listener instancepublic void removeDataTypeListener(java.util.Collection<org.eclipse.emf.ecore.EDataType> types, DataTypeListener listener)
NavigationHelper
removeDataTypeListener
in interface NavigationHelper
types
- the collection of data typeslistener
- the listener instancepublic java.util.Set<java.lang.Object> getObservedDataTypesInternal()
public boolean addLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)
NavigationHelper
addLightweightEObjectObserver
in interface NavigationHelper
observer
- the listener instanceobservedObject
- the observed EObjectpublic boolean removeLightweightEObjectObserver(LightweightEObjectObserver observer, org.eclipse.emf.ecore.EObject observedObject)
NavigationHelper
removeLightweightEObjectObserver
in interface NavigationHelper
observer
- the listener instanceobservedObject
- the observed EObjectpublic java.util.Map<LightweightEObjectObserver,java.util.Collection<org.eclipse.emf.ecore.EObject>> getLightweightObservers()
public void addBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
NavigationHelper
NavigationHelper.removeBaseIndexChangeListener(EMFBaseIndexChangeListener)
addBaseIndexChangeListener
in interface NavigationHelper
public void removeBaseIndexChangeListener(EMFBaseIndexChangeListener listener)
NavigationHelper
NavigationHelper.addBaseIndexChangeListener(EMFBaseIndexChangeListener)
removeBaseIndexChangeListener
in interface NavigationHelper
public boolean addIndexingErrorListener(IEMFIndexingErrorListener listener)
NavigationHelper
addIndexingErrorListener
in interface NavigationHelper
public boolean removeIndexingErrorListener(IEMFIndexingErrorListener listener)
NavigationHelper
removeIndexingErrorListener
in interface NavigationHelper
public void notifyErrorListener(java.lang.String message, java.lang.Throwable t)
public void notifyFatalListener(java.lang.String message, java.lang.Throwable t)
public boolean isExpansionAllowed()
public java.util.Set<java.lang.Object> getDirectlyObservedClassesInternal()
public java.util.Set<java.lang.Object> getAllObservedClassesInternal()
public 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)
NavigationHelper
registerObservedTypes
in interface NavigationHelper
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)public 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)
NavigationHelper
unregisterObservedTypes
in interface NavigationHelper
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)public void registerEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
NavigationHelper
registerEStructuralFeatures
in interface NavigationHelper
features
- the set of features to observepublic void unregisterEStructuralFeatures(java.util.Set<? extends org.eclipse.emf.ecore.EStructuralFeature> features)
NavigationHelper
unregisterEStructuralFeatures
in interface NavigationHelper
features
- the set of features that will be ignored again from now onpublic void registerEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
NavigationHelper
registerEClasses
in interface NavigationHelper
classes
- the set of classes to observepublic void unregisterEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> classes)
NavigationHelper
unregisterEClasses
in interface NavigationHelper
classes
- the set of classes that will be ignored again from now onpublic void registerEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
NavigationHelper
registerEDataTypes
in interface NavigationHelper
dataTypes
- the set of data types to observepublic void unregisterEDataTypes(java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes)
NavigationHelper
unregisterEDataTypes
in interface NavigationHelper
dataTypes
- the set of data types that will be ignored again from now onpublic boolean isCoalescing()
NavigationHelper
NavigationHelper.coalesceTraversals(Callable)
}.isCoalescing
in interface NavigationHelper
public <V> V coalesceTraversals(java.util.concurrent.Callable<V> callable) throws java.lang.reflect.InvocationTargetException
NavigationHelper
coalesceTraversals
in interface NavigationHelper
java.lang.reflect.InvocationTargetException
public void addRoot(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryBaseException
NavigationHelper
addRoot
in interface NavigationHelper
IncQueryBaseException
public <T extends org.eclipse.emf.ecore.EObject> void cheapMoveTo(T element, org.eclipse.emf.common.util.EList<T> targetContainmentReferenceList)
NavigationHelper
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.
cheapMoveTo
in interface NavigationHelper
element
- the eObject to be movedtargetContainmentReferenceList
- containment list of the new parent object into which the element has to be movedpublic void cheapMoveTo(org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference containmentFeature)
NavigationHelper
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.
cheapMoveTo
in interface NavigationHelper
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 elementpublic java.util.Set<org.eclipse.emf.ecore.EClass> getAllCurrentClasses()
NavigationHelper
getAllCurrentClasses
in interface NavigationHelper
public void resampleDerivedFeatures()
resampleDerivedFeatures
in interface NavigationHelper