How to customize the content assist in the editor [message #689208] |
Mon, 27 June 2011 07:20 |
|
Hi,
I have the following use case:-
I have written a simple grammar for comparison expression:
"Age < 18"
ComparisonExpression:
(variable=[Variable]) '<' INT | (variable=[Variable]) '<' STRING;
where [Variable] is referred from another ecore model. With a lot of help in earlier thread I was able to get the content assist in my generated editor for instances of [Variable] at runtime.
I have the following query:
The entity [Variable] has an attribute called type which can be "java.lang.Integer" or "java.lang.String". In my editors content assist I want the RHS of the expression to be suggested as "INT" if the type of the [Variable] is "java.lang.Integer" and "STRING" if the type of the [Variable] is "java.lang.String".
Also in one of the previous posts Christian did mention to override the content assist for the editor but there is no content assist for these terminal rules such as INT and STRING.
I wanted some help to figure out how this can be done.
Thanks,
Best Regards,
Nidhi
|
|
|
|
Powered by
FUDForum. Page generated in 0.02669 seconds