public PsiElement @NotNull [] getAvailableElements() {
    JTree tree = getCurrentTree();
    if (tree == null) {
      return PsiElement.EMPTY_ARRAY;
    }
    TreeModel model = tree.getModel();
    Object root = model.getRoot();
    if (!(root instanceof DefaultMutableTreeNode node)) {
      return PsiElement.EMPTY_ARRAY;
    }
    HierarchyNodeDescriptor descriptor = getDescriptor(node);
    Set<PsiElement> result = new HashSet<>();
    if (descriptor != null) {
      collectElements(descriptor, result);
    }
    return result.toArray(PsiElement.EMPTY_ARRAY);
  }
public PsiElement @NotNull [] getAvailableElements()