Content Assist for Hidden Terminal Rules [message #1804128] |
Tue, 19 March 2019 02:26  |
Eclipse User |
|
|
|
Hi,
I would like to restrict the content assist for hidden terminal rules.
I have constructed a small xtext project.
Grammar:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals hidden(WS, ML_COMMENT, SL_COMMENT, TEST_STMT)
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
conts+=Cont* procs+=Proc*;
Cont:
'Cont' name=ID '{' items+=Item* '}' ;
Item: 'Item' name=ID;
Proc:
'Link' item1=[Item|ID] 'OF' con1=[Cont|ID] 'TO' item2=[Item|ID] 'OF' con2=[Cont|ID]
;
//Test statement
terminal TEST_STMT : 'FreeText: ' -> '.';
Model File:
Cont container1 {
FreeText: We can write here .
// Test
Item item1
}
Cont container2 {
Item item2
}
Link item1 OF container1 TO item2 OF container2
Problem is when we try content assist after 'FreeText: ', it suggest 'Item'. I want content assist not to show anything until '.'.
How can we achieve this?
Looking for some suggestion.
I have attached an image also.
Thanks and regards,
Virag Purnam
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07735 seconds