|Get referenced object in another model (cyclic resolution or no corresponding inode) [message #1031541]
||Mon, 01 April 2013 18:52
| Fabian G.
Registered: May 2010
Location: Namur (Belgium)
I'm trying to override the name provider in such a way that I can define in a model a new object and its parent object, and having its qualified name computed with the referenced object directly in the model.
I provide here a simplified example. Assume in the first grammar, I have rules like:
in the other grammar:
'add' name=FQN 'in' referencedObject=[MyObject|FQN];
How can I override the name provider to build the fully qualified name of MyOtherObject based on MyObject. Ex. in model1.dsl:
add ASubObject in MyObjectName
I roughly tried to retrieve the referenced object by just:
which leads to a cyclic resolution of lazy links.
I also tried by NodeModelUtils.findNodesForFeature using the eContainer and DslPackage.Literals.My_Other_Object__REFERENCED_OBJECT but, this returns me MyOtherObject rule and not the MyObject.
Could someone help me with this?
Thanks in advance,
Powered by FUDForum
. Page generated in 0.01750 seconds