how to get "debugger" and "console" ContentManager
my old question is in there https://devnet.jetbrains.com/thread/458587, i think if i can directly get "debugger" and "console" ContentManager,i can toggle them with a more simple way rather than NextTabAction.see my screencast, i get following output:
ContentManagerImpl cm = (ContentManagerImpl) PlatformDataKeys.NONEMPTY_CONTENT_MANAGER.getData(e.getDataContext());
// => com.intellij.ui.content.impl.ContentManagerImpl@36cf2ffe
ToolWindowManager twm = ToolWindowManager.getInstance(pj());
twm.getActiveToolWindowId();
// => Debug
twm.getToolWindow("Debug").getContentManager();
// => com.intellij.ui.content.impl.ContentManagerImpl@5022d897
my question is how to get cm directly(in my screencast, i need to focus debug tool window, i hope get it even without focusing debug tool)
Attachment(s):
how_to_get_debugger_console_contentmanager_directly.ogv.zip
Please sign in to leave a comment.
If I correcty understand what you need, you can access the content manager containing the Console and Debug tabs for the last displayed run configuration using ExecutionManager.getInstance().getRunContentManager().getSelectedContent().getAttachedContent().getContenManager().
I can't find getRunContentManager(), so i use getContentManager() instead
see my screencast, i get the debug tool contentmanager, but i expect it "debugger" and "console" contentmanager, i wanna do selectNext between "debugger" and "console", not "ex (1)" and "ex (1)"
Attachment(s):
cannot_find_debugger_console_contentmanager.ogv.zip