Collection<PsiElement> (@NotNull PsiElement element, @NotNull Collection<? extends PsiElement> allElementsToDelete, boolean askUser) { final IProperty property = (IProperty)element; final String key = property.getKey(); if (key == null) { return null; } final PropertiesFile file = property.getPropertiesFile(); if (file == null) { return null; } final List<PsiElement> result = new ArrayList<>(); for (PropertiesFile propertiesFile : file.getResourceBundle().getPropertiesFiles()) { for (IProperty p : propertiesFile.findPropertiesByKey(key)) { final PsiElement propertyElement = p.getPsiElement(); if (!allElementsToDelete.contains(propertyElement)) { result.add(propertyElement); } } } return result; }