@Override
  public final void navigate(boolean requestFocus) {
    PsiElement element = getElement();
    if (element != null) {
      VirtualFile file = element.getContainingFile().getVirtualFile();
      if (file != null) {
        new Task.Modal(element.getProject(), EditorBundle.message("editor.open.file.progress", file.getName()), true) {
          @Override
          public void run(@NotNull ProgressIndicator indicator) {
            int offset = ReadAction.compute(() -> element.isValid() ? element.getTextOffset() : -1);  // may trigger decompilation
            indicator.checkCanceled();
            if (offset >= 0) {
              Navigatable descriptor = PsiNavigationSupport.getInstance().createNavigatable(myProject, file, offset);
              Condition isValid = __ -> !file.isValid();
              Condition isDisposed = myProject.getDisposed();
              Condition<?> expired = or(isDisposed, isValid);
              ApplicationManager.getApplication().invokeLater(() -> descriptor.navigate(requestFocus), expired);
            }
          }
        }.queue();
      }
    }
  }
@Override
  public final void navigate(boolean requestFocus)