InspectionMetaDataDialog (Project project, @Nullable Configuration configuration) { final List<Configuration> configurations = getConfigurations(); final Function<String, @Nullable @NlsContexts.DialogMessage String> nameValidator = name -> { for (Configuration current : configurations) { if (current.getOrder() == 0 && current.getName().equals(name) && (configuration == null || !current.getUuid().equals(configuration.getUuid()))) { return SSRBundle.message("inspection.with.name.exists.warning", name); } } return null; }; if (configuration == null) { return new InspectionMetaDataDialog(project, nameValidator); } return new InspectionMetaDataDialog(project, nameValidator, configuration.getName(), configuration.getDescription(), configuration.getProblemDescriptor(), configuration.getSuppressId()); }