private static void addElementBeforeAnchor(PsiElement parentElement, PsiElement element, PsiElement anchor) {
    final PsiElement sibling = element.getPrevSibling().copy();
    parentElement.addBefore(element, anchor);
    if (sibling instanceof PsiWhiteSpace) parentElement.addBefore(sibling, anchor);
  }
private static void addElementBeforeAnchor(PsiElement parentElement, PsiElement element, PsiElement anchor)