final ConsoleView consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(SonarToolWindowFactory.TOOL_WINDOW_ID);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
toolWindow.show(new Runnable() {
@Override
public void run() {
Content content = toolWindow.getContentManager().getFactory().createContent(consoleView.getComponent(), "SonarQube Console", true);
toolWindow.getContentManager().addContent(content);
}