|
|
|
Re: How to get the name of an unresolved reference [message #716602 is a reply to message #716599] |
Wed, 17 August 2011 20:08 |
|
Hi,
since the cross reference is not resolved you of course get null for every feature of this cross reference.
but there is stil the trick to access the node model to workaround this problem.
Model:
elements+=Element*
;
Element:
"element" name=ID ("refs" refs=[Element])?
;
Model m = (Model) r.getContents().get(0);
Element e1 = m.getElements().get(0);
for (INode n : NodeModelUtils.findNodesForFeature(e1, MyDslPackage.Literals.ELEMENT__REFS)) {
System.out.println(n.getText());
}
Please note: this will work just for the name, nor nothing else.
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
[Updated on: Wed, 17 August 2011 20:09] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01560 seconds