Confused: Cyclic resolution of lazy links [message #1796526] |
Mon, 15 October 2018 18:19 |
Brandon Lewis Messages: 268 Registered: May 2012 |
Senior Member |
|
|
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 18:23] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Confused: Cyclic resolution of lazy links [message #1796534 is a reply to message #1796533] |
Mon, 15 October 2018 20:03 |
|
how does the hash set at point of error look like? and the current parameter?
org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(String, Triple<EObject, EReference, INode>)
(the hashset may give you hints on which "path" the problem happens
is there any reason you cannot use normal import uri/index based scoping?
why is this needed to be done in derived state computer?
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04531 seconds