|
1 | 1 | ------------------------------------------------------------------------------
|
2 | 2 | -- Language Server Protocol --
|
3 | 3 | -- --
|
4 |
| --- Copyright (C) 2018-2021, AdaCore -- |
| 4 | +-- Copyright (C) 2018-2023, AdaCore -- |
5 | 5 | -- --
|
6 | 6 | -- This is free software; you can redistribute it and/or modify it under --
|
7 | 7 | -- terms of the GNU General Public License as published by the Free Soft- --
|
@@ -31,7 +31,6 @@ with VSS.Unicode;
|
31 | 31 | with Langkit_Support;
|
32 | 32 | with Langkit_Support.Symbols; use Langkit_Support.Symbols;
|
33 | 33 | with Libadalang.Common; use Libadalang.Common;
|
34 |
| -with Libadalang.Doc_Utils; |
35 | 34 | with Libadalang.Sources;
|
36 | 35 |
|
37 | 36 | with Laltools.Call_Hierarchy;
|
@@ -805,6 +804,8 @@ package body LSP.Lal_Utils is
|
805 | 804 | Doc_Text : out VSS.Strings.Virtual_String;
|
806 | 805 | Decl_Text : out VSS.Strings.Virtual_String)
|
807 | 806 | is
|
| 807 | + pragma Unreferenced (Trace); |
| 808 | + |
808 | 809 | Options : constant
|
809 | 810 | GNATdoc.Comments.Options.Extractor_Options :=
|
810 | 811 | (Style => Style,
|
@@ -833,27 +834,6 @@ package body LSP.Lal_Utils is
|
833 | 834 | Decl_Text := Get_Decl_Text (BD);
|
834 | 835 | end if;
|
835 | 836 |
|
836 |
| - -- Obtain documentation via the old engine when GNATdoc fails to extract |
837 |
| - -- the comments. |
838 |
| - if Doc_Text.Is_Empty then |
839 |
| - |
840 |
| - -- Property_Errors can occur when calling |
841 |
| - -- Libadalang.Doc_Utils.Get_Documentation on unsupported |
842 |
| - -- docstrings, so add an exception handler to catch them and recover. |
843 |
| - begin |
844 |
| - Doc_Text := |
845 |
| - VSS.Strings.To_Virtual_String |
846 |
| - (Libadalang.Doc_Utils.Get_Documentation |
847 |
| - (BD).Doc.To_String); |
848 |
| - exception |
849 |
| - when Libadalang.Common.Property_Error => |
850 |
| - Trace.Trace |
851 |
| - ("Failed to compute documentation with LAL" |
852 |
| - & "(unsupported docstring) for: " & BD.Image); |
853 |
| - Doc_Text := VSS.Strings.Empty_Virtual_String; |
854 |
| - end; |
855 |
| - end if; |
856 |
| - |
857 | 837 | Loc_Text := LSP.Lal_Utils.Node_Location_Image (BD);
|
858 | 838 | end Get_Tooltip_Text;
|
859 | 839 |
|
|
0 commit comments