void (@NotNull ContentManagerEvent event) { int index = event.getIndex(); if (index != -1 && event.getOperation() != ContentManagerEvent.ContentOperation.remove) { myTabbedPaneWrapper.setSelectedIndex(index); } }