void (@NotNull MouseEvent event, boolean wasSorted) { if (!wasSorted) return; if (event.isConsumed() || UISettings.getInstance().getAlwaysKeepTabsAlphabeticallySorted()) {//new container for separate window was created, see DockManagerImpl.MyDragSession UISettings.getInstance().setSortTabsAlphabetically(true); } else { UISettings.getInstance().fireUISettingsChanged(); ApplicationManager.getApplication().invokeLater(() -> { Notification notification = new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, IdeBundle.message("alphabetical.mode.is.on.notification"), "", NotificationType.INFORMATION); notification.addAction( DumbAwareAction.create(IdeBundle.message("editor.tabs.enable.sorting"), e -> { UISettings.getInstance().setSortTabsAlphabetically(true); UISettings.getInstance().fireUISettingsChanged(); notification.expire(); })) .addAction( DumbAwareAction.create(IdeBundle.message("editor.tabs.always.keep.sorting"), e -> { UISettings.getInstance().setAlwaysKeepTabsAlphabeticallySorted(true); UISettings.getInstance().setSortTabsAlphabetically(true); UISettings.getInstance().fireUISettingsChanged(); notification.expire(); })); Notifications.Bus.notify(notification); }); } }