void (@NotNull Project project, @NotNull ToolWindow toolWindow) { toolWindow.setTitle(externalSystemId.getReadableName()); ContentManager contentManager = toolWindow.getContentManager(); contentManager.addContent(new ContentImpl(createInitializingLabel(), "", false)); ExternalProjectsManager.getInstance(project).runWhenInitialized(() -> { ExternalProjectsViewImpl projectView = new ExternalProjectsViewImpl(project, (ToolWindowEx)toolWindow, externalSystemId); ExternalProjectsManagerImpl.getInstance(project).registerView(projectView); ContentImpl taskContent = new ContentImpl(projectView, "", true); contentManager.removeAllContents(true); contentManager.addContent(taskContent); }); }