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

0
Avatar
Permanently deleted user

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

Thank you much!

And by TypedHandlerDelegate you mean TypedActionHandler?

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

0

请先登录再写评论。