|Re: Bi-direction (EOpposite) in Xtext [message #1769743 is a reply to message #1769739]
||Thu, 03 August 2017 06:43
| Nicholas Kong
Registered: July 2016
Thanks for your replay. Christian.|
Sorry for my description not clearly.
I have attache the meta-model.
1,I want to use Xtext in this meta-model. But after I generate the DSL I find it has a bidirectional reference. These two reference must be appeared and serialized. So what should I do? Remove the EOpposite attribute from this Reference? or ?:
Switch returns Switch:
('connectsTo' '(' connectsTo+=[TrackElement|STRING] ("," connectsTo+=[TrackElement|STRING])* ')')?
[b] ('positions' '(' positions+=[SwitchPosition|STRING] ("," positions+=[SwitchPosition|STRING])* ')')?[/b]
SwitchPosition returns SwitchPosition:
[b] 'switch' switch=[Switch|STRING][/b]
2,Each of this model Element only has id, dosen't have name. I can create the model element, but when I create reference between two element. Xtext alert that "Couldn't resolve reference to Semaphore '0'."
(Size: 76.40KB, Downloaded 496 times)
(Size: 4.05KB, Downloaded 62 times)
(Size: 2.13KB, Downloaded 44 times)
Powered by FUDForum
. Page generated in 0.02418 seconds