Object component = getSplitPaneContent();
boolean animate = true;
if (component != null) {
if (component instanceof MultiSplitContainer) {
MultiSplitContainer multiSplitContainer = (MultiSplitContainer) component;
if (manager.getShowingGroup() != null) {
multiSplitContainer.addContent(content);
} else {
if (content == null) {
DockedContainer dockedContainer = (DockedContainer) descriptor.getToolWindowContainer();
multiSplitContainer.removeContent(dockedContainer.getContentContainer());
animate = false;
if (multiSplitContainer.isEmpty()) {
animate = true;
content = null;
}
} else {
setSplitPaneContent(content);
}
}
} else if (manager.getShowingGroup() != null && content != null) {
MultiSplitContainer container = new MultiSplitContainer(orientation);
container.addContent(content);
setSplitPaneContent(container);
} else if (content != null)
setSplitPaneContent(content);
} else {
if (manager.getShowingGroup() != null && content != null) {
MultiSplitContainer container = new MultiSplitContainer(orientation);
container.addContent(content);
setSplitPaneContent(container);
} else if (content != null)
setSplitPaneContent(content);
}