public final class QueryBasedFeatureHelper
extends java.lang.Object
IQueryBasedFeatureHandler
).Modifier and Type | Method and Description |
---|---|
static IQueryBasedFeatureHandler |
getQueryBasedFeatureHandler(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String patternFQN,
java.lang.String sourceParamName,
java.lang.String targetParamName,
QueryBasedFeatureKind kind)
Returns the
IQueryBasedFeatureHandler for the given EStructuralFeature on the topmost
Notifier reachable from the source. |
static IQueryBasedFeatureHandler |
getQueryBasedFeatureHandler(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String patternFQN,
java.lang.String sourceParamName,
java.lang.String targetParamName,
QueryBasedFeatureKind kind,
boolean keepCache,
boolean useSourceAsNotifier)
Returns the
IQueryBasedFeatureHandler for the given EStructuralFeature on the source or the
topmost Notifier reachable from the source. |
static IQueryBasedFeatureHandler |
getQueryBasedFeatureHandler(org.eclipse.emf.common.notify.Notifier notifier,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String patternFQN,
java.lang.String sourceParamName,
java.lang.String targetParamName,
QueryBasedFeatureKind kind,
boolean keepCache)
|
static IQueryBasedFeatureHandler |
getQueryBasedFeatureHandlerOnNotifier(org.eclipse.emf.common.notify.Notifier notifier,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String patternFQN,
java.lang.String sourceParamName,
java.lang.String targetParamName,
QueryBasedFeatureKind kind)
|
static org.eclipse.emf.common.notify.Notifier |
prepareNotifierForSource(org.eclipse.emf.ecore.EObject source)
Decide what
Notifier to use as the scope of the ViatraQueryMatcher underlying the created
IQueryBasedFeatureHandler . |
public static org.eclipse.emf.common.notify.Notifier prepareNotifierForSource(org.eclipse.emf.ecore.EObject source)
Notifier
to use as the scope of the ViatraQueryMatcher
underlying the created
IQueryBasedFeatureHandler
.
Optimally, the ResourceSet
is reachable and most other matchers will use it as well.
Otherwise, the Resource
is used if the model is not inside a resource set.
If none of the above are reachable, the container hierarchy is traversed for a top element.
Finally, the source itself is returned.
source
- the source object that initializes the handlerpublic static IQueryBasedFeatureHandler getQueryBasedFeatureHandler(org.eclipse.emf.common.notify.Notifier notifier, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String patternFQN, java.lang.String sourceParamName, java.lang.String targetParamName, QueryBasedFeatureKind kind, boolean keepCache)
IQueryBasedFeatureHandler
for the given EStructuralFeature
in the given
Notifier
. If the handler does not exist yet, it is also initialized, before being returned.
The required matcher is initialized using the pattern fully qualified name passed as a parameter.
notifier
- the exact notifier to use for the handler initializationfeature
- the feature that is managed by the handlerpatternFQN
- the fully qualified name of the pattern used by the handlersourceParamName
- the name of the parameter in the pattern that represents the source end of the featuretargetParamName
- the name of the parameter in the pattern that represents the target end of the featurekind
- the QueryBasedFeatureKind
that is used by the handlerkeepCache
- specifies whether the handler uses an internal cache for feature values. Only possible with single and
many reference kindspublic static IQueryBasedFeatureHandler getQueryBasedFeatureHandlerOnNotifier(org.eclipse.emf.common.notify.Notifier notifier, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String patternFQN, java.lang.String sourceParamName, java.lang.String targetParamName, QueryBasedFeatureKind kind)
IQueryBasedFeatureHandler
for the given EStructuralFeature
in the given
Notifier
. If the handler does not exist yet, it is also initialized, before being returned.
The required matcher is initialized using the pattern fully qualified name passed as a parameter.
Calls
getQueryBasedFeatureHandler(Notifier, EStructuralFeature, String, String, String, QueryBasedFeatureKind, boolean)
with keepCache = true.
notifier
- the exact notifier to use for the handler initializationfeature
- the feature that is managed by the handlerpatternFQN
- the fully qualified name of the pattern used by the handlersourceParamName
- the name of the parameter in the pattern that represents the source end of the featuretargetParamName
- the name of the parameter in the pattern that represents the target end of the featurekind
- the QueryBasedFeatureKind
that is used by the handlerpublic static IQueryBasedFeatureHandler getQueryBasedFeatureHandler(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String patternFQN, java.lang.String sourceParamName, java.lang.String targetParamName, QueryBasedFeatureKind kind, boolean keepCache, boolean useSourceAsNotifier)
IQueryBasedFeatureHandler
for the given EStructuralFeature
on the source or the
topmost Notifier
reachable from the source. If the handler does not exist yet, it is also initialized,
before being returned.
The required matcher is initialized using the pattern fully qualified name passed as a parameter.
source
- the source object used for the handler initialization (used for determining the notifier for the
underlying matcher)feature
- the feature that is managed by the handlerpatternFQN
- the fully qualified name of the pattern used by the handlersourceParamName
- the name of the parameter in the pattern that represents the source end of the featuretargetParamName
- the name of the parameter in the pattern that represents the target end of the featurekind
- the QueryBasedFeatureKind
that is used by the handlerkeepCache
- specifies whether the handler uses an internal cache for feature values. Only possible with single and
many reference kindsuseSourceAsNotifier
- if true, the source is used as the notifier for the matcher initializationpublic static IQueryBasedFeatureHandler getQueryBasedFeatureHandler(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String patternFQN, java.lang.String sourceParamName, java.lang.String targetParamName, QueryBasedFeatureKind kind)
IQueryBasedFeatureHandler
for the given EStructuralFeature
on the topmost
Notifier
reachable from the source. If the handler does not exist yet, it is also initialized, before
being returned.
The required matcher is initialized using the pattern fully qualified name passed as a parameter.
source
- the source object used for the handler initialization (used for determining the notifier for the
underlying matcher)feature
- the feature that is managed by the handlerpatternFQN
- the fully qualified name of the pattern used by the handlersourceParamName
- the name of the parameter in the pattern that represents the source end of the featuretargetParamName
- the name of the parameter in the pattern that represents the target end of the featurekind
- the QueryBasedFeatureKind
that is used by the handler