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.

Comment actions Permalink

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

Comment actions Permalink

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"));


Please sign in to leave a comment.