@@ -90,11 +90,7 @@ package body LSP.Ada_Handlers.Project_Diagnostics is
90
90
-- -------------------------------------
91
91
92
92
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 :=
98
94
(start => (0 , 0 ),
99
95
an_end => (0 , 0 ));
100
96
begin
@@ -112,15 +108,24 @@ package body LSP.Ada_Handlers.Project_Diagnostics is
112
108
Parent_Diagnostic.message := Project_Loading_Status_Messages
113
109
(Self.Last_Status);
114
110
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 ;
124
129
end if ;
125
130
end Create_Project_Loading_Diagnostic ;
126
131
0 commit comments