void () { if (!createPropertiesFileIfNotExists()) return; saveLastSelectedFile(); Collection<PropertiesFile> propertiesFiles = getAllPropertiesFiles(); HashMap<PropertiesFile, IProperty> existingProperties; try { ThrowableComputable<HashMap<PropertiesFile, IProperty>, RuntimeException> existingPropertiesGenerator = () -> findExistingProperties(propertiesFiles); existingProperties = ProgressManager.getInstance().runProcessWithProgressSynchronously( () -> ReadAction.compute(existingPropertiesGenerator), PropertiesBundle.message("i18nize.dialog.searching.for.already.existing.properties"), true, myProject ); } catch (ProcessCanceledException e) { super.doOKAction(); return; } for (PropertiesFile propertiesFile : propertiesFiles) { IProperty existingProperty = existingProperties.get(propertiesFile); final String propValue = getValue(); if (existingProperty != null && !Comparing.strEqual(existingProperty.getUnescapedValue(), propValue)) { final String messageText = PropertiesBundle.message("i18nize.dialog.error.property.already.defined.message", getKey(), propertiesFile.getName()); final boolean code = MessageDialogBuilder .yesNo(PropertiesBundle.message("i18nize.dialog.error.property.already.defined.title"), messageText) .ask(myProject); if (!code) { return; } } } super.doOKAction(); }