KeyBoard shortcut for CodeCompletion actionID

I'm developing a new pluing for IntelliJ 10 for this I need to know the CodeCompletion input sequence as has been set by any user.
To do this I was trying something as

  •      KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_CODE_COMPLETION));

This returns a Null Pointer Exception which is because KeymapManager.getInstance returns null. Here is the code for getInstance().

     / * getInstance() */
     public static KeymapManager getInstance() {
         return ApplicationManager.getApplication().getComponent(KeymapManager.class);
Over there ApplicationManager.getApplication returns null as the application is not set.
I wanted to know how to set the application so that getApplication() returns the valid application. I'm a bit lost over here so any sort of help would be appreciated.

If you think that there is a better method to extract the CodeCompletion Key Sequence then please do reply.
1 comment
Comment actions Permalink

Ok, I solved it.


Please sign in to leave a comment.