|Cross reference between two Arms in thre AST Diagramm [message #1835280]
||Sun, 29 November 2020 20:58
| Marvin Dongus
Registered: November 2020
i have the following Grammar Construct:
objekt += Objekt*
(Class | SignalConnector)
'class' name = ID
signalsOfClass += Signal*
'Signal' name = ID
connections += Connect*
'connect' producerSignal = [Signal] 'with' consumerSignal = [Signal]
Eclips accept the cross reference of [Signal] in Xtext, but in my runtine projekt my compiler can't resolve the reference to a existing objekt in the project.
If I adapt this example in the way that die rule <Class> don't have a (name = ID) the Cross reference is working, but this isn't a suitable solution for me.
I hope somebody can help me with my problem ;D
|Re: Cross reference between two Arms in thre AST Diagramm [message #1835293 is a reply to message #1835287]
||Mon, 30 November 2020 10:08
You should be able to reference the signals using their fully qualified name, such as connect <className>.<signalName> with <className>.<signalName>
From the Xtext documentation:
... the default implementation strategy exports every model element that the IQualifiedNameProvider can provide a name for.
... If you would like to see what's in the index, you could use the 'Open Model Element' dialog from the navigation menu entry.
For further information, see the Linking and the Scoping section of the Xtext documentation.
Hope that helps,
Powered by FUDForum
. Page generated in 0.02037 seconds