private static @Nullable PsiMember findMember(@Nullable Editor editor, @Nullable PsiFile file) {
    if (editor == null || file == null) return null;
    final PsiElement element = file.findElementAt(editor.getCaretModel().getOffset());
    PsiMember member = MethodUtils.getJavaMethodFromHeader(element);
    if (member == null) {
      member = PsiTreeUtil.getParentOfType(element, PsiField.class);
    }
    return member;
  }
private static @Nullable PsiMember findMember(@Nullable Editor editor, @Nullable PsiFile file)