@Override
        public void stateChanged(@NotNull ChangeEvent e) {
          myEditorTabs[mySelectedTabIndex].onTabLeaving();
          mySelectedTabIndex = tabbedPane.getSelectedIndex();
          onTabSelected(myEditorTabs[mySelectedTabIndex]);
        }
@Override
        public void stateChanged(@NotNull ChangeEvent e)