Confused: Cyclic resolution of lazy links [message #1796526] |
Mon, 15 October 2018 14:19  |
Eclipse User |
|
|
|
I'm confused.
I'm getting errors with cyclic resolution of lazy links when I'm trying to access references in my DerivedStateComputer. As I'm trying to resolve my references, it does not seem "cyclic" to me as I'm just following the reference paths specified in my EMF model, so right away I'm confused on the terminology and how to resolve my issue.
Some background:
Grammar snippet:
Test returns Test:
{Test}
'Test' ':' name=EString
(BEGIN
('description' ':' description=EString)?
('attributeGroup' ':' attributeGroup=[AttributeGroup|QualifiedName])?
END)?;
In my DerivedStateComputer while preLinkingPhase is false, the following access is triggering the error:
In my EMF code, getAttributeGroup() seems to be built to resolveProxies (it's autogenerated code), but the first time this is accessed, the error fires. It looks like subsequent getAttributeGroup() calls are able to resolve it.
The AttributeGroup object is described in a separate resource that is imported via the ImportURI mechanism - so the imported resource should be visible.
is there some "standard trick" I can use to resolve these references in my DerivedStateComputer? I've randomly tried some EcoreUtil2 methods, but I'm getting nowhere.
That's one example, but I seem to be hitting the Cyclic resolution of lazy links anytime I make a reference to an Object that is contained within another file (that is imported via the ImportURI mechanism).
[Updated on: Mon, 15 October 2018 14:23] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Confused: Cyclic resolution of lazy links [message #1797489 is a reply to message #1797119] |
Wed, 31 October 2018 11:22  |
Eclipse User |
|
|
|
FWIW, the example above solved my problem. Basically the cyclic resolution of lazy links was due to a scoping problem due to transitive importURI needs. The link above did need some tweaks for me and I've sent feedback to the blog owner.
Thanks for the help in pointing me in the right direction.
|
|
|
Powered by
FUDForum. Page generated in 0.22058 seconds