private static List<FormattingService> getChainedServices(@NotNull FormattingService formattingService) {
    List<FormattingService> serviceList = new ArrayList<>();
    FormattingService currService = formattingService;
    while (currService != null) {
      if (serviceList.contains(currService)) break;
      serviceList.add(0, currService);
      currService = ObjectUtils.doIfNotNull(currService.runAfter(), serviceClass -> findService(serviceClass));
    }
    return serviceList;
  }
private static List<FormattingService> getChainedServices(@NotNull FormattingService formattingService)