[furcas-discussion] Reference Re-Evaluation Algorithm
Stephan Erb
stephan at dev.static-void.de
Fri Feb 11 15:12:22 CET 2011
> > PS: Thomas, we might need your help with all this textblocks magic
> > (e.g.
> > find out if a reference is still bound). Expect some questions on the
> > mailing list rather soon :-)
>
> I found that out myself. In this case it was an easy reverse lookup on DocumentNode_SequenceElement using the OppositeEndFinder API.
Hi Axel,
I just had a (very) short look at the OCLQueryPropertyUpdate. Is there a
reason why the 'referencedElements' aren't checked anywhere? I always
thought that those entail the crucial information whether a token is
bound to something or not.
Example from the MOIN code base where used them:
private Collection<?> findCurrentlySetElements(DelayedReference unresolvedRef, ModelInjector modelInjector,
LexedToken tokenInCurrentConnection) throws ModelAdapterException {
Collection<?> valueCollection = modelInjector.getModelAdapter().get(unresolvedRef.getModelElement(), unresolvedRef.getPropertyName());
if (tokenInCurrentConnection != null) {
valueCollection.retainAll(tokenInCurrentConnection.getReferencedElements());
}
return valueCollection;
}
Best,
Stephan
More information about the Furcas-discussion
mailing list