void (@NotNull AnActionEvent e) { Content[] contents = myManager.getContents(); for (Content content : contents) { if (myContent != content && content.isCloseable()) { myManager.removeContent(content, true); } } myManager.setSelectedContent(myContent); }