Toolwindow icon and shortcut
My plugin registers a new toolwindow using the ToolWindowManager.registerToolWindow API.
This works fine except for two things:
- Although i set the icon in the ToolWindow instance and that icon shows just fine next to the toolwindow button it doesn't show up in the Window | Tool Windows menu (just the icon, the toolwindow shows up). More, although my toolwindow doesn't show an icon in the menu, the icon i set for it is now shown as the icon for the Dynamic Properties tool window.
- I can't figure out how to assign a shortcut key to the ToolWindow so that it shows up in the toolwindow menu also.
Thanks.
Please sign in to leave a comment.
I figured out the switched icon thing. As it turns out this only happens when i don't register the toolwindow on project open but instead i register it using some registered action.
Still would appreciate some help figuring out why the icon doesn't show up in the menu and also about the shortcut.
Thanks
Ok, figured out the now showing icon problem.
As it turns out i have to call setIcon only after i call toolwindow.getContentManager().addContent to set the toolwindow panel.
This way the icon shows up fine.