how to get "debugger" and "console" ContentManager

my old question is in there, 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());
        // => Debug

        // => 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)

Comment actions Permalink

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().

Comment actions Permalink

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


Please sign in to leave a comment.