Adding definition in global scope provider [message #1753282] |
Fri, 03 February 2017 05:08  |
Eclipse User |
|
|
|
I tried to create a jar to add it as a plugin but it is more complicated than I thought. Thus, I decided to change the global scope provider instead. But I did not have much luck in adding the definition to the global scope provider manually.
There are some entries that are added only during generator part as the user does not need to specify it.
Hello admin age 99!
Hello sample age 2!
Bye sample ! see you sept;
my grammar is:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
greetings+=(Greeting| Test)*;
Greeting:
'Hello' sample=[Test] 'age' age=INT '!';
Test:
'Bye' sName=ID '!' 'see' 'you' date=ID ';'
;
I called MydslFactory::eInstance.createGreeting and set the variables in main.java before all the resource are loaded, but the error is still there. Are there any articles that shows how to do it in global scope provider and resource service provider?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06448 seconds