StripTrailingSpacesFilter (@Nullable Project project, @NotNull Document document) { Language language = getDocumentLanguage(document); if (language != null && isApplicableTo(language)) { PsiFile psiFile = getPsiFile(project, document); if (psiFile != null) { PsiBasedStripTrailingSpacesFilter filter = createFilter(document); filter.process(psiFile); return filter; } return POSTPONED; } return ALL_LINES; }