ProblemDescriptor[] (@NotNull PsiFile file, @NotNull final InspectionManager manager, final boolean isOnTheFly) { if (!(file instanceof PropertiesFile)) return null; final List<IProperty> properties = ((PropertiesFile)file).getProperties(); final List<ProblemDescriptor> descriptors = new SmartList<>(); for (IProperty property : properties) { ProgressManager.checkCanceled(); final PropertyImpl propertyImpl = (PropertyImpl)property; for (ASTNode node : ContainerUtil.ar(propertyImpl.getKeyNode(), propertyImpl.getValueNode())) { if (node != null) { PsiElement key = node.getPsi(); TextRange textRange = getTrailingSpaces(key, myIgnoreVisibleSpaces); if (textRange != null) { descriptors.add(manager.createProblemDescriptor(key, textRange, PropertiesBundle .message("inspection.trailing.spaces.in.property.trailing.spaces.description"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true, new RemoveTrailingSpacesFix(myIgnoreVisibleSpaces))); } } } } return descriptors.toArray(ProblemDescriptor.EMPTY_ARRAY); }