public static @NotNull PsiElement formatElement(@NotNull PsiElement element, boolean canChangeWhiteSpaceOnly) {
    PsiFile file = element.getContainingFile();
    PsiElement contextElement = element;
    FormattingService mainService = findService(file, true, element.getTextRange().equals(file.getTextRange()));
    for (FormattingService service : getChainedServices(mainService)) {
      contextElement = service.formatElement(contextElement, canChangeWhiteSpaceOnly);
    }
    return contextElement;
  }
public static @NotNull PsiElement formatElement(@NotNull PsiElement element, boolean canChangeWhiteSpaceOnly)