Home » Modeling » TMF (Xtext) » Same function, different signature -> ContentAssist
Same function, different signature -> ContentAssist [message #761490] |
Tue, 06 December 2011 14:45 |
Federico Sellanes Messages: 71 Registered: November 2011 |
Member |
|
|
Hi !, is me again...
In my dsl i have predefined functions like :
guiAddLabel(context,id,text)
guiAddLabel(context,id,text,align)
guiAnotherFunction(arg1,arg2,arg3)
guiAnotherAnotherFunction(arg1)
but in my grammar i only have registered one for each type, for example :
Module:
'module' name=ID
functions += GuiFunctions*
;
GuiFunctions:
(guiAddLabel=GuiAddLabel
|guiAnotherFunction=GuiAnotherFunction
|guiAnotherAnotherFunction=GuiAnotherAnotherFunction
;
GuiAddLabel:
'guiAddLabel' FunctionImplementation
;
GuiAnotherFunction:
'guiAnotherFunction' FunctionImplementation
;
GuiAnotherAnotherFunction:
'guiAnotherAnotherFunction' FunctionImplementation
;
The point is that when i typed "g" and press ctrl+space the content assist show me :
guiAddLabel
guiAnotherFunction
guiAnotherAnotherFunction
and when i switch from one to other the content assist show me the doc I was wrote and seted before. This work nice.
But, what i am trying to achieve is, get in the content assist something like:
guiAddLabel(context,id,text)
guiAddLabel(context,id,text,align)
guiAnotherFunction(arg1,arg2,arg3)
guiAnotherAnotherFunction(arg1)
And when i press enter above one of this functions, in the editor must appear, for example :
guiAddLabel "without (context,id,text)" or
guiAnotherFunction "without (arg1,arg2,arg3)"
(this is already working in this way, but has not the different signatures of the functions).
Can somebody tell me if i need to update my grammar or if a need to do something in other place, and where?
Honestly i dont know how search for what i want because i dont know how is called what i need
The content assist and the doc is already working, so i not need to know about this.
Thanks, in advanced.
Sorry for my bad english i am using google translate a bit.
[Updated on: Tue, 06 December 2011 14:46] Report message to a moderator
|
|
| | | |
Goto Forum:
Current Time: Fri Apr 19 19:24:40 GMT 2024
Powered by FUDForum. Page generated in 0.03292 seconds
|