public PsiElement[] getElements() {
      return ReadAction.compute(() -> {
        List<PsiElement> result = new ArrayList<>();
        for (SmartPsiElementPointer<?> pointer : pointers) {
          PsiElement element = pointer.getElement();
          if (element != null) {
            result.add(element);
          }
        }
        return result.toArray(PsiElement.EMPTY_ARRAY);
      });
    }
public PsiElement[] getElements()