How to register an InsertHandler with IDEA 8.0 (Diana)
In IDEA 7.0 I used to be able to set the attribute LookupItem.INSERT_HANDLER_ATTR to a com.intellij.codeInsight.completion.LookupItem. This gave me the flexibility to define my own InsertHandler objects.
Now this is not possible any more with 8.0. Is there a way to register my custom InsertHandlers in plugin.xml? Didn't find any hint in the migration guide.
Please sign in to leave a comment.
Dan Cioca wrote:
The best way is to create your own LookupElement and implement
getInsertHandler there. LookupElementFactory or new LookupItem will also
give you objects which have setInsertHandler method
Thanks Peter,
I obviously overlooked the setInsertHandler() getInsertHandler() methods of LookupItem. :-)