Exporting DSL as Xtext feature has cross reference problems [message #1814576] |
Fri, 13 September 2019 09:25  |
Eclipse User |
|
|
|
Hello,
I am using Eclipse 2019-06 (DSL) . I have the following grammar:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://sorry-cant-include-links-to-external-sites-in-this-forum"
Model:
'package' name=QualifiedName
imports+=Import*
greetings+=Greeting*
byes+=GoodBye*;
Import:
'import' importedNamespace=QualifiedNameWithWildcard;
QualifiedNameWithWildcard:
QualifiedName '.*'?;
QualifiedName:
ID ('.' ID)*;
Greeting:
'Hello' name=ID '!';
GoodBye:
'Goodbye' name=ID to=[Greeting|QualifiedName]
;
This grammar is the only change that I made to the default xtext project.
When I run the plugin via contextual menu -> Run as -> Eclipse Application the plugin is working fine. I mean that i have 2 files:
first.mydsl:
package something
import something.*
Hello Giovanni !
Goodbye AAAA Giovanni
Goodbye BBBB Antonio
second.mydsl:
package something
Hello Antonio !
There are no errors, and when I ctrl-click in the first.mydsl on "Antonio" I get open the second.mydsl, highlighting the 'Antonio' word.
However, I then try to export the dsl feature as an archive, get installed in another instance of eclipse (a 2019-06 C++ eclipse), install it, and open the same project.
In this case, the line 'Goodbye BBBB Antonio' is not working. Antonio gets underlined red, when hovering the mouse I have Couldn't resolve reference to Greeting 'Antonio'.
Notice that internal references work in both cases, it happens only with reference to a different file.
Any idea?
Thank you in advance,
Giovanni
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02905 seconds