void (final @Nullable String propertyName, final @NotNull Editor editor, final @NotNull VirtualFile file) { final String currentValue = editor.getDocument().getText(); final String currentSelectedProperty = propertyName == null ? getSelectedPropertyName() : propertyName; if (currentSelectedProperty == null) { return; } if (!FileModificationService.getInstance().prepareVirtualFilesForWrite(myProject, Collections.singleton(file))) { return; } WriteAction.run(() -> WriteCommandAction.runWriteCommandAction(myProject, ResourceBundleEditorBundle.message( "resource.bundle.update.property.value"), null, () -> { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file, myProject); if (propertiesFile != null) { if (currentValue.isEmpty() && ResourceBundleEditorKeepEmptyValueToggleAction.keepEmptyProperties() && !file.equals(myResourceBundle.getDefaultPropertiesFile().getVirtualFile())) { myPropertiesInsertDeleteManager.deletePropertyIfExist(currentSelectedProperty, propertiesFile); } else { myPropertiesInsertDeleteManager.insertOrUpdateTranslation(currentSelectedProperty, currentValue, propertiesFile); } } })); }