public final class ViatraObservables
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OBSERVABLEVALUE_ANNOTATION |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,ObservableDefinition> |
calculateObservableValues(IQuerySpecification<?> query)
Calculates the list of
ObservableDefinition s from a query. |
static org.eclipse.core.databinding.observable.value.IObservableValue |
getObservableLabelFeature(IPatternMatch match,
java.lang.String expression)
Returns an
IObservableValue that observes the pattern match and converts it to the given expression. |
static org.eclipse.core.databinding.observable.value.IObservableValue |
getObservableLabelFeature(IPatternMatch match,
java.lang.String expression,
java.lang.Object container)
Returns an
IObservableValue that observes the pattern match and converts it to the given expression. |
static org.eclipse.core.databinding.observable.value.IObservableValue |
getObservableValue(IPatternMatch match,
java.lang.String expression)
Returns an IObservableValue for the given match based on the given expression.
|
static java.util.List<org.eclipse.core.databinding.observable.value.IObservableValue> |
observeAllAttributes(org.eclipse.core.databinding.observable.value.IValueChangeListener changeListener,
java.lang.Object object)
Registers the given change listener on the given object's all accessible fields.
|
static java.util.List<org.eclipse.core.databinding.observable.value.IObservableValue> |
observeFeatures(IPatternMatch match,
org.eclipse.core.databinding.observable.value.IValueChangeListener changeListener,
java.lang.String message)
Registers the given changeListener for the appropriate features of the given signature.
|
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsList(IQuerySpecification<Matcher> querySpecification,
ViatraQueryEngine engine)
Create an observable list of the match set of the given query using a selected
ViatraQueryEngine . |
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsList(IQuerySpecification<Matcher> querySpecification,
ViatraQueryEngine engine,
Match filter)
Create an observable list of the match set of the given query using a selected
ViatraQueryEngine . |
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsList(Matcher matcher)
Create an observable list of the match set of the given
ViatraQueryMatcher . |
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsSet(IQuerySpecification<Matcher> querySpecification,
ViatraQueryEngine engine)
Create an observable set of the match set of the given query using a selected
ViatraQueryEngine . |
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsSet(IQuerySpecification<Matcher> querySpecification,
ViatraQueryEngine engine,
Match filter)
Create an observable set of the match set of the given query using a selected
ViatraQueryEngine . |
static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> |
observeMatchesAsSet(Matcher matcher)
Create an observable set of the match set of the given
ViatraQueryMatcher . |
public static final java.lang.String OBSERVABLEVALUE_ANNOTATION
public static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.list.IObservableList observeMatchesAsList(Matcher matcher)
ViatraQueryMatcher
.
The matches are ordered by appearance, so a new match is always put on the end of the list.
matcher
- the matcher to observepublic static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.list.IObservableList observeMatchesAsList(IQuerySpecification<Matcher> querySpecification, ViatraQueryEngine engine)
ViatraQueryEngine
.
The matches are ordered by appearance, so a new match is always put on the end of the list.
Use the generated query specifications for initialization, in the generic case, you may have to accept an unchecked invocation (or use the Generic classes if you are sure).
querySpecification
- the matcher querySpecification for the query to observeengine
- the engine used with the matcherpublic static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.list.IObservableList observeMatchesAsList(IQuerySpecification<Matcher> querySpecification, ViatraQueryEngine engine, Match filter)
ViatraQueryEngine
.
The matches are ordered by appearance, so a new match is always put on the end of the list.
Use the generated query specifications for initialization, in the generic case, you may have to accept an unchecked invocation (or use the Generic classes if you are sure).
querySpecification
- the matcher querySpecification for the query to observeengine
- the engine used with the matcherfilter
- the partial match to be used as filterpublic static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.set.IObservableSet observeMatchesAsSet(Matcher matcher)
ViatraQueryMatcher
.matcher
- the matcher to observepublic static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.set.IObservableSet observeMatchesAsSet(IQuerySpecification<Matcher> querySpecification, ViatraQueryEngine engine)
ViatraQueryEngine
.
Use the generated query specifications for initialization, in the generic case, you may have to accept an unchecked invocation (or use the Generic classes if you are sure).
querySpecification
- the matcher querySpecification for the query to observeengine
- the engine used with the matcherpublic static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> org.eclipse.core.databinding.observable.set.IObservableSet observeMatchesAsSet(IQuerySpecification<Matcher> querySpecification, ViatraQueryEngine engine, Match filter)
ViatraQueryEngine
.
Use the generated query specifications for initialization, in the generic case, you may have to accept an unchecked invocation (or use the Generic classes if you are sure).
querySpecification
- the matcher querySpecification for the query to observeengine
- the engine used with the matcherfilter
- the partial match to be used as filterpublic static java.util.List<org.eclipse.core.databinding.observable.value.IObservableValue> observeFeatures(IPatternMatch match, org.eclipse.core.databinding.observable.value.IValueChangeListener changeListener, java.lang.String message)
match
- changeListener
- the change listenermessage
- the message which can be found in the appropriate PatternUI annotationpublic static java.util.List<org.eclipse.core.databinding.observable.value.IObservableValue> observeAllAttributes(org.eclipse.core.databinding.observable.value.IValueChangeListener changeListener, java.lang.Object object)
changeListener
- the change listenerobject
- the observed objectpublic static org.eclipse.core.databinding.observable.value.IObservableValue getObservableValue(IPatternMatch match, java.lang.String expression)
match
- the match objectexpression
- the expressionpublic static org.eclipse.core.databinding.observable.value.IObservableValue getObservableLabelFeature(IPatternMatch match, java.lang.String expression)
IObservableValue
that observes the pattern match and converts it to the given expression.public static org.eclipse.core.databinding.observable.value.IObservableValue getObservableLabelFeature(IPatternMatch match, java.lang.String expression, java.lang.Object container)
IObservableValue
that observes the pattern match and converts it to the given expression.
The given container is also stored in the created ObservableLabelFeature
.public static java.util.Map<java.lang.String,ObservableDefinition> calculateObservableValues(IQuerySpecification<?> query)
ObservableDefinition
s from a query.query
-