private static void bindRef(@NotNull final PsiClass targetClass, @NotNull final GrReferenceElement ref) {
    ApplicationManager.getApplication().runWriteAction(() -> {
      final PsiElement newRef = ref.bindToElement(targetClass);
      JavaCodeStyleManager.getInstance(targetClass.getProject()).shortenClassReferences(newRef);
    });
  }
private static void bindRef(@NotNull final PsiClass targetClass, @NotNull final GrReferenceElement ref)