intellij plugin - How do I activate a tool window to a specific "tab" (content)? -
i have defined toolwindow in plugin.xml, , added contents (tabs) in createtoolwindowcontent
function of corresponding class implements toolwindowfactory
.
i have separate action, activate toolwindow specific tab. that, do:
toolwindow toolwindow = toolwindowmanager.getinstance(project).gettoolwindow(tool_window_id); toolwindow.activate(null); // don't need execute when done... or should i?
so right cannot select tab want. found method
toolwindow.getcontentmanager().setselectedcontent(content)
but if don't have reference created content?
you can use contentmanager.getcontents()
list of contents displayed in toolwindow, or findcontent()
or getcontent()
find content index, name or component shown in it.
Comments
Post a Comment