Autocompletion list - keyword and parameters

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Autocompletion list - keyword and parameters

Re: Autocompletion list - keyword and parameters

Post by Guest » Thu Mar 13, 2014 2:54 pm

Hi Robert,

That's okay, not a problem :)

No, everything worked fine, it's just that the auto completion list's default cell renderer only did function.toString() (I think I read it on something you wrote). When I set the cell renderer to a new DefaultListCellRenderer (kind of ironic :lol:) , it came out the way I wanted it.

Re: Autocompletion list - keyword and parameters

Post by robert » Wed Mar 12, 2014 1:30 pm

Hi Kuriel,

Sorry, I somehow missed this topic. Are you saying you had to install a custom renderer to get parameterized completions, such as functions, to work properly? If so, then that bit sounds like a bug.

Re: Autocompletion list - keyword and parameters

Post by Kuriel » Tue Mar 11, 2014 1:13 pm

Edit: It turns out that I seem to need to create a ListCellRenderer for my custom language. I'll dig around for it and come back if I couldn't find anything.

Edit #2: Wow, that was simpler than I thought. Instantiating a new DefaultListCellRenderer is sufficient, for those who want to know what I did.

(Great work as always, Robert!)

Autocompletion list - keyword and parameters

Post by Kuriel » Tue Mar 04, 2014 2:46 pm

Hi Robert,

It's been a while :)

I've gotten things pretty much where I want it to be, but I was wondering how you got entries on the auto-complete list to look like this:

Image

I'm using the DefaultCompletionProvider, passing an .xml file (following the prescribed dtd, of course) for my language. But when I try to change the keyword to include it's parameters (e.g. fabs(double x)), it writes the whole thing into the editor, and parametric auto-completion still triggers properly, although it looks something like function(parameters)(actual parameters).

I have a lot of overloaded methods, and seeing just the keyword on the list isn't too pretty :lol:

Thanks for the help!

Top