I hope someone can clear this up for me.
I have created an action class that extends AnAction for my plugin. Now let's say I map this to a common key such as the "Enter" key because I want to do some processing each time a user presses this key. I created a new keymap based on "default", and removed the "Enter" key mapping for the Editor Action "EditorEnter" and make the "Enter" key a shorcut for my custom action.
This works in an editor. My custom action gets called each time the user press the "Enter" key. Now, of course, I need IDEA to process the "Enter" key too. So I call ActionManager.getAction("EditorEnter") and then call the actionPerformed() method and the world is a happy place.
OK - now my problem. If I type Ctrl-N to search for a class, the classname entry field doesn't get my "Enter" key. My custom action is still getting called each time the user presses "Enter". I've determined that in this case the Editor within the DataContext received as part of the AnActionEvent is null so I know the "Enter" key is meant for something other than an editor.
How do I resend the "Enter" key so the entry field in the classname dialog gets it? This isn't specific to this dialog - just an example. I have the same problem is many dialogs and other plugins such as the SQL plugin.
Thanks for any pointers,