// Setup dialog
Frame parentFrame = (toolWindowManager.getWindowAnchestor() instanceof Frame) ? (Frame) toolWindowManager.getWindowAnchestor() : null;
Window dialog;
if (contentUI.isAddToTaskBarWhenDetached()) {
dialog = new ContentFrame(resourceManager, content, contentUI,
parentFrame, inBounds);
} else {
dialog = new ContentDialog(resourceManager, content, contentUI,
parentFrame, inBounds);
}