Jumping to settings component programmatically

Answered

I'm writing a plugin to easily access the keymap. I currently have `instance.showSettingsDialog(project, KeymapPanel.class)` which opens the keymap.

However, I'd like to go one step further and be able to focus on Search/"Find Actions By Shortcut", I suppose I need to use a consumer `instance.showSettingsDialog(project, KeymapPanel.class, p -> {...})` but it is not clear to me how to navigate inside the configurable. Also, this code is executed before the popup is display, I'm not sure if that can be a problem.

Thanks

0
2 comments

The third argument is a callback, which provides you access to the configurable that you have queried - KeymapPanel in your case.

You can browse its source code and check if there is a suitable method to navigate to the action that you're interested in - i.e. selectAction(String actionId)

0

Hi Jakub Chrzanowski,

I've tried that, but when the "showSettingsDialog" is executed, the propery "myActionsTree" of the configurable has no children, so there is no action to be chosen.

0

Please sign in to leave a comment.