reducing cross reference to current DSL file [message #1229358] |
Thu, 09 January 2014 04:25  |
Eclipse User |
|
|
|
I have a grammar with a cross reference.
This runs fine when I test it. But when I have in my workspace another DSL file with the same extension, the content assist offers me the items defined in my current DSL file as well as the items of the other file as well.
So how can I limit the cross reference to items defined in the current DSL file only?
As a XTEXT/JAVA/... novice, some sample code would be nice.
TIA, Uli
My Grammar is:
grammar de.ulrichmerkel.Narrowcross1 with org.eclipse.xtext.common.Terminals
generate narrowcross1 "http://www.ulrichmerkel.de/Narrowcross1"
Model:
greetings+=Greeting*
sendto+=Areference*;
Greeting:
'Hello' name=ID '!';
Areference:
"sendto" target=[Greeting]
;
And for the Test I have
A1.narrowcross1 as:
Hello Paul !
Hello Peter !
and A2.narrowcross1 as:
Hello Mary !
adding a "sendto", the content assist offers me Peter, Paul and Mary for A1 and A2
But I want to restrict it to "Peter and Paul" for A1 and "Mary" for A2
[Updated on: Thu, 09 January 2014 04:36] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05951 seconds