StripTrailingSpacesFilter (@Nullable Project project, @NotNull Document document) { if (project != null && shouldKeepTrailingSpacesOnEmptyLines(project, document)) { return new KeepTrailingSpacesOnEmptyLinesFilter(document); } return ALL_LINES; }