Triggering code completion

Hello,

i wonder how to manage (or at least just add) hooks to the editor which opens a code completion automatically after certain chars or, preferably, token types?
and, secondly, i wonder how to open the code completion pragmatically from some code?

thanks in advance

2 comments
Comment actions Permalink

Hello,

i wonder how to manage (or at least just add) hooks to the editor which opens a code completion automatically after certain chars or, preferably, token types?

Create your own TypedHandlerDelegate, check there that your favourite
token has just been entered and schedule completion appearing.

and, secondly, i wonder how to open the code completion pragmatically from some code?


((CodeInsightAction)ActionManager.getInstance().getAction(IdeActions.ACTION_CODE_COMPLETION)).actionPerformedImpl(project,
editor)

0
Comment actions Permalink

Thank you much!

And by TypedHandlerDelegate you mean TypedActionHandler?

Edited by: Jay on Jun 30, 2008 11:56 PM

0

Please sign in to leave a comment.