How can I group ToolWindows like the Android Studio XML-Layout Preview?
In my plugin I have a ToolWindow which visualizes code and I would like to add a child-ToolWindow to this ToolWindow like the Android Studio XML-Layout "Preview"-ToolWindow with it's "Palette"-ToolWindow. How can I achieve this?

I can see that the "Palette"-ToolWindow is greyed out under View->ToolWindows so I assume it is added in the plugin.xml under extensions but how do you set the "Preview"-ToolWindow as it's parent?
Please sign in to leave a comment.
I think they (Google guys) emulate tool window behavior for Palette by themselves. Still it looks like components from package com.intellij.openapi.wm.impl
Thanks Vassilliy!
The main factor for me is how I set the anchor of the inner ToolWindow to the left of the parent ToolWindow. If I set anchor left on inner ToolWindow it is all the way to the left of the IDE and far away from it's parent ToolWindow. Do you know if there is a way to set the anchor relative to another ToolWindow?
'Inner tool window ' is not a tool window at all, it's just emulation, at least I think so. Just look in the area below 'palette' icon, it's so bright. 'Palette' header is also higher than tool window header, it's just JPanel inside another JPanel and so on... a custom layout.
Yeah I thought so too but then when you click on the "Design" tab at the bottom it gets expanded and looks like this:
"Palette", "Component Tree", and "Attributes" are all ToolWindows and come with the tool window options (Docked, Split...).,
They are aligned relatively to the main "Preview"-ToolWindow now who seems to have lost it's ToolWindow capabilities.
Any idea how you can achieve this with Intellij tools?
In android studio they have custom ui controls like Header, ToolWindowAlikePanel, ToolWindowPanel and ToolWindowHeader but I'm not aware how do they use it.