void (final @NotNull ErrorViewPanel errorTreeView, final @NotNull Project myProject, final @NotNull @NlsContexts.TabTitle String tabDisplayName) { CommandProcessor commandProcessor = CommandProcessor.getInstance(); commandProcessor.executeCommand(myProject, () -> { final MessageView messageView = MessageView.getInstance(myProject); final Content content = ContentFactory.getInstance().createContent(errorTreeView, tabDisplayName, true); messageView.getContentManager().addContent(content); Disposer.register(content, errorTreeView); messageView.getContentManager().setSelectedContent(content); ContentManagerUtil.cleanupContents(content, myProject, tabDisplayName); }, ExecutionBundle.message("open.message.view"), null); }