@Override
  public @Nullable String getExternalDocInfoForElement(@NotNull String docURL, PsiElement element) throws Exception {
    String externalDoc = null;
    myElement = element;

    String projectPath = "/" + myProject.getName() + "/";
    String builtInServer = "http://localhost:" + BuiltInServerOptions.getInstance().getEffectiveBuiltInServerPort() + projectPath;
    if (docURL.startsWith(builtInServer)) {
      Url url = Urls.parseFromIdea(docURL);
      if (url != null) {
        VirtualFile file = WebServerPathToFileManager.getInstance(myProject).findVirtualFile(url.getPath().substring(projectPath.length()));
        if (file != null) {
          StringBuilder result = new StringBuilder();
          try (InputStreamReader reader = new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8)) {
            doBuildFromStream(docURL, reader, result);
          }
          externalDoc = correctDocText(docURL, result);
        }
      }
    }

    if (externalDoc == null) {
      externalDoc = super.getExternalDocInfoForElement(docURL, element);
    }

    if (externalDoc == null) {
      return null;
    }

    if (element instanceof PsiMethod) {
      Pair<String, String> classNameAndPresentation = ReadAction.compute(
        () -> {
          PsiClass aClass = ((PsiMethod)element).getContainingClass();
          if (aClass != null) {
            String qName = aClass.getQualifiedName();
            String typeParameters = JavaDocInfoGeneratorFactory.create(aClass.getProject(), null).generateTypeParameters(aClass, true);
            return pair(qName, qName + typeParameters);
          }
          return null;
        }
      );
      if (classNameAndPresentation == null) return externalDoc;
      Matcher matcher = METHOD_HEADING.matcher(externalDoc);
      StringBuilder buffer = new StringBuilder("<h3>");
      DocumentationManager.createHyperlink(buffer, classNameAndPresentation.first, classNameAndPresentation.second, false);
      return matcher.replaceFirst(buffer.append("</h3>").toString());
    }

    return externalDoc;
  }
@Override
  public @Nullable String getExternalDocInfoForElement(@NotNull String docURL, PsiElement element)