@Override
          public void visitReferenceExpression(final @NotNull PsiReferenceExpression expression) {
            super.visitReferenceExpression(expression);
            final PsiElement psiElement = expression.resolve();
            if (psiElement instanceof PsiField psiField &&
                (psiField.getContainingClass() == targetClass || membersToMove.contains(psiField)) &&
                !afterFields.contains(psiField)) {
              afterFields.add(psiField);
            }
          }
@Override
          public void visitReferenceExpression(final @NotNull PsiReferenceExpression expression)