overriding typing ')' char action behaviour

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: overriding typing ')' char action behaviour

Re: overriding typing ')' char action behaviour

Post by robert » Sat Sep 28, 2013 12:48 am

The AutoComplete library has support for this, which is used by RSTALanguageSupport for e.g. C function completions and Java method completions.

You should look at ParameterizedCompletions such as FunctionCompletion, and perhaps also TemplateCompletions.

overriding typing ')' char action behaviour

Post by as3boyan » Tue Sep 24, 2013 6:09 pm

NetBeans does something like this:
|);
where | - caret position. If I will try to type ')' again, and if there all brackets closed - it will just move caret one character forward instead of inserting ')'. Seems like I need to override some typing action to do that, I saw, you got some action like, move one character forward, or maybe I need to subclass typing action.

I could do this by adding KeyListener, but I'm not sure if this is a good idea.

Top