void (@NotNull Project project, List<XmlTag> tags) { choosePropertiesFileAndExtract(project, tags, selection -> { PropertiesFile propertiesFile = findPropertiesFile(project, selection); if (propertiesFile != null) { List<PsiFile> psiFiles = new ArrayList<>(); psiFiles.add(propertiesFile.getContainingFile()); for (XmlTag tag : tags) { psiFiles.add(tag.getContainingFile()); } WriteCommandAction.runWriteCommandAction( project, DevKitI18nBundle.message("inspections.plugin.xml.i18n.inspection.tag.command.name", "displayName"), null, () -> { for (XmlTag tag : tags) { registerPropertyKey(project, tag, propertiesFile); } }, psiFiles.toArray(PsiFile.EMPTY_ARRAY)); } }); }