How to change the return value when select the the value from list for autocomplete ?

Hello … when we do autocomplete on codemirror editor when we select value from list then the same value typing in codemirror … I want to do thing similar to (Netbeans IDE ) for exmple : on netbeans when I write :
String name ;
name.

after type ‘.’ all function and type of them in String lib show in list and like : contains(String) boolean
contains(String) : is name of function and boolean is it’s type …

when we select on the function only the name of function selected (the type appare but not selected )

… so How I can do it with codemirror with my own language ?
Note : I need only to approch to when I select the item from list (NameFnction type) then to select only NameFunction and type it on codemirror …
I search the event onselect But I did not found it in codemirror … any help ? if I can’t do it with codemirror there are another approch like show label when I stop on item in list and I write the type of item in label ?

You’ll have to write a lot of code yourself. CodeMirror doesn’t provide a framework for that, it only comes with a way to show a set of completions. How you compute those is up to you.

Ok … Thanks