private static PsiElement @Nullable [] getPsiElementsIn(final Editor editor) {
    try {
      final PsiReference reference = TargetElementUtil.findReference(editor, editor.getCaretModel().getOffset());
      if (reference == null) {
        return null;
      }
      final Collection<PsiElement> candidates = TargetElementUtil.getInstance().getTargetCandidates(reference);
      return candidates.toArray(PsiElement.EMPTY_ARRAY);
    }
    catch (IndexNotReadyException e) {
      return null;
    }
  }
private static PsiElement @Nullable [] getPsiElementsIn(final Editor editor)