Content (ContentManager contentManager, ServiceView serviceView, ItemPresentation presentation, boolean select, int index) { Content content = ContentFactory.getInstance().createContent(serviceView, ServiceViewDragHelper.getDisplayName(presentation), false); content.putUserData(ToolWindow.SHOW_CONTENT_ICON, Boolean.TRUE); content.setHelpId(getToolWindowContextHelpId()); content.setCloseable(true); content.setIcon(presentation.getIcon(false)); Disposer.register(content, serviceView); Disposer.register(content, serviceView.getModel()); contentManager.addContent(content, index); if (select) { contentManager.setSelectedContent(content); } return content; }