@@ -90,11 +90,7 @@ package body LSP.Ada_Handlers.Project_Diagnostics is
9090 -- -------------------------------------
9191
9292 procedure Create_Project_Loading_Diagnostic is
93- Project_File : GNATCOLL.VFS.Virtual_File renames
94- Self.Handler.Project_Status.Project_File;
95- URI : constant LSP.Structures.DocumentUri :=
96- Self.Handler.To_URI (Project_File.Display_Full_Name);
97- Sloc : constant LSP.Structures.A_Range :=
93+ Sloc : constant LSP.Structures.A_Range :=
9894 (start => (0 , 0 ),
9995 an_end => (0 , 0 ));
10096 begin
@@ -112,15 +108,24 @@ package body LSP.Ada_Handlers.Project_Diagnostics is
112108 Parent_Diagnostic.message := Project_Loading_Status_Messages
113109 (Self.Last_Status);
114110 else
115- Parent_Diagnostic.message := " Project Problems" ;
116- Parent_Diagnostic.relatedInformation.Append
117- (LSP .Structures.DiagnosticRelatedInformation'
118- (location => LSP.Structures.Location'
119- (uri => URI,
120- a_range => Sloc,
121- others => <>),
122- message => Project_Loading_Status_Messages
123- (Self.Last_Status)));
111+ declare
112+ Project_File : GNATCOLL.VFS.Virtual_File renames
113+ Self.Handler.Project_Status.Project_File;
114+ URI : constant LSP.Structures.DocumentUri :=
115+ Self.Handler.To_URI
116+ (Project_File.Display_Full_Name);
117+ begin
118+ Parent_Diagnostic.message := " Project Problems" ;
119+ Parent_Diagnostic.relatedInformation.Append
120+ (LSP.Structures.DiagnosticRelatedInformation'
121+ (location =>
122+ LSP.Structures.Location'
123+ (uri => URI, a_range => Sloc,
124+ others => <>),
125+ message =>
126+ Project_Loading_Status_Messages
127+ (Self.Last_Status)));
128+ end ;
124129 end if ;
125130 end Create_Project_Loading_Diagnostic ;
126131
0 commit comments