@Override
  public int @Nullable [] getMethodNavigationOffsets(PsiFile file, int caretOffset) {
    if (file instanceof PsiJavaFile) {
      return MethodUpDownUtil.offsetsFromElements(SyntaxTraverser.psiTraverser(file).filter(e -> shouldStopAt(e)).toList());
    }
    return null;
  }
@Override
  public int @Nullable [] getMethodNavigationOffsets(PsiFile file, int caretOffset)