@Override
  public Pair<VirtualFile, @Nullable Integer> getFileToSwapTo(Project project, EditorComposite composite) {
    VirtualFile file = composite.getFile();
    VirtualFile sourceFile = findSourceFile(project, file);
    if (sourceFile == null) {
      return null;
    }

    Integer position = null;

    TextEditorImpl oldEditor = EditorFileSwapper.findSinglePsiAwareEditor(composite.getAllEditors());
    if (oldEditor != null) {
      PsiCompiledFile clsFile = (PsiCompiledFile)PsiManager.getInstance(project).findFile(file);
      assert clsFile != null;

      int offset = oldEditor.getEditor().getCaretModel().getOffset();
      PsiElement elementAt = clsFile.findElementAt(offset);
      PsiMember member = PsiTreeUtil.getParentOfType(elementAt, PsiMember.class, false);
      if (member != null) {
        PsiElement navigationElement = member.getOriginalElement().getNavigationElement();
        if (Comparing.equal(navigationElement.getContainingFile().getVirtualFile(), sourceFile)) {
          position = navigationElement.getTextOffset();
        }
      }
    }

    return new Pair<>(sourceFile, position);
  }
@Override
  public Pair<VirtualFile, @Nullable Integer> getFileToSwapTo(Project project, EditorComposite composite)