void (@NotNull Project project, @Nullable HighlightSeverity selectedSeverity, @NotNull SeverityRegistrar severityRegistrar, boolean closeDialogWhenSettingsShown, @Nullable Consumer<? super @NotNull HighlightSeverity> chosenSeverityCallback) { final SeverityEditorDialog dialog = new SeverityEditorDialog(project, selectedSeverity, severityRegistrar, closeDialogWhenSettingsShown); if (dialog.showAndGet()) { final HighlightInfoType type = dialog.getSelectedType(); if (type != null) { final HighlightSeverity severity = type.getSeverity(null); if (chosenSeverityCallback != null) { chosenSeverityCallback.consume(severity); } } } }