Add option to toolwindow title

Hi there,

i am looking for a way to add additional options to the title bar of a toolwindow (so that more options will be displayed next to the default options dropdown (gearwheel icon) and "hide" option).

thank you in advance for any hints.

0
2 comments

see com.intellij.openapi.wm.ex.ToolWindowEx#setAdditionalGearActions and com.intellij.openapi.wm.ex.ToolWindowEx#setTitleActions


0

Thank you Yann, it worked just as i wished. :)

If someone else is searching for how to do this:
inside the createToolWindowContent method of my ToolWindowFactory, i added:

ActionManager actionManager = ActionManager.getInstance();
((ToolWindowEx) toolWindow).setTitleActions(actionManager.getAction("MyAction"));

0

Please sign in to leave a comment.