void (@NotNull final DataContext dataContext) { final List<PropertiesFile> bundlePropertiesFiles = myResourceBundle.getPropertiesFiles(); final List<PsiElement> toDelete = new ArrayList<>(); for (IProperty property : myProperties) { final String key = property.getKey(); if (key == null) { LOG.error("key must be not null " + property); } else { for (PropertiesFile propertiesFile : bundlePropertiesFiles) { for (final IProperty iProperty : propertiesFile.findPropertiesByKey(key)) { toDelete.add(iProperty.getPsiElement()); } } } } final Project project = CommonDataKeys.PROJECT.getData(dataContext); LOG.assertTrue(project != null); new SafeDeleteHandler().invoke(project, PsiUtilCore.toPsiElementArray(toDelete), dataContext); myInsertDeleteManager.reload(); }