private static @Nullable Pair<@NotNull VirtualFile, @NotNull String> getJvmFileAndClassName(Editor editor, PsiFile psiFile) {
    final PsiElement element = psiFile.findElementAt(editor.getCaretModel().getOffset());
    if (element == null) return null;

    JvmClass jvmClass = ContainerUtil.findInstance(JvmDeclarationSearch.getElementsByIdentifier(element), JvmClass.class);
    if (jvmClass == null) return null;

    VirtualFile virtualFile = psiFile.getVirtualFile();
    String className = JvmClassUtil.getJvmClassName(jvmClass);
    if (virtualFile == null || className == null) return null;
    return new Pair<>(virtualFile, className);
  }
private static @Nullable Pair<@NotNull VirtualFile, @NotNull String> getJvmFileAndClassName(Editor editor, PsiFile psiFile)