void (SETab tab) { if (!myTabs.contains(tab)) { throw new IllegalArgumentException(String.format("Tab %s is not found in tabs list", tab.toString())); } mySelectedTab.setSelected(false); mySelectedTab = tab; mySelectedTab.setSelected(true); if (newUIHeaderView != null) { newUIHeaderView.tabbedPane.setSelectedIndex(myTabs.indexOf(tab)); } if (myEverywhereAutoSet && isEverywhere() && canToggleEverywhere()) { autoSetEverywhere(false); } myToolbar.updateActionsImmediately(); header.repaint(); myScopeChangedCallback.run(); }