public static void shortenAllReferencesIn(@Nullable GroovyPsiElement newTypeElement) {
    if (newTypeElement != null) {
      newTypeElement.accept(new GroovyRecursiveElementVisitor() {
        @Override
        public void visitCodeReferenceElement(@NotNull GrCodeReferenceElement refElement) {
          super.visitCodeReferenceElement(refElement);
          shortenReference(refElement);
        }
      });
    }
  }
public static void shortenAllReferencesIn(@Nullable GroovyPsiElement newTypeElement)