ArrangementSectionRule (@NotNull ArrangementSettings settings, @NotNull String comment) { for (ArrangementSectionRule rule : settings.getSections()) { if (rule.getStartComment() != null && StringUtil.equals(comment, rule.getStartComment())) { return rule; } } return null; }