private @Nullable TextWithIcon elementLocation(@NotNull PsiElement element) {
    Project project = element.getProject();
    ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
    VirtualFile vFile = PsiUtilCore.getVirtualFile(element);
    if (vFile != null && fileIndex.isInLibrary(vFile)) {
      return libraryLocation(project, fileIndex, vFile);
    }
    else {
      Module module = ModuleUtilCore.findModuleForPsiElement(element);
      if (module != null) {
        return projectLocation(vFile, module, fileIndex);
      }
      return null;
    }
  }
private @Nullable TextWithIcon elementLocation(@NotNull PsiElement element)