}
private ToolWindow initExecutionConsole() {
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(getProject());
ToolWindow toolWindow = toolWindowManager.getToolWindow(TOOL_WINDOW_ID);
if (toolWindow == null) {
toolWindow = toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, true, ToolWindowAnchor.BOTTOM, this, true);
toolWindow.setIcon(Icons.WINDOW_EXECUTION_CONSOLE);
toolWindow.setToHideOnEmptyContent(true);
}
if (toolWindow.getContentManager().getContents().length == 0) {
ExecutionConsoleForm executionConsoleForm = getExecutionConsoleForm();
ContentFactory contentFactory = new ContentFactoryImpl();
Content content = contentFactory.createContent(executionConsoleForm.getComponent(), null, true);
toolWindow.getContentManager().addContent(content);
toolWindow.setAvailable(true, null);
}
return toolWindow;
}