@@ -3298,23 +3298,6 @@ package body LSP.Ada_Handlers is
32983298 is
32993299 use type GNATCOLL.JSON.JSON_Value_Type;
33003300
3301- function Match
3302- (Left : GNATCOLL.VFS.Filesystem_String;
3303- Right : GNATCOLL.VFS.Virtual_File) return Boolean;
3304- -- Compare two files
3305-
3306- -- ---------
3307- -- Match --
3308- -- ---------
3309-
3310- function Match
3311- (Left : GNATCOLL.VFS.Filesystem_String;
3312- Right : GNATCOLL.VFS.Virtual_File) return Boolean is
3313- begin
3314- return (Left = " " and then Right = No_File)
3315- or else GNATCOLL.VFS.Create (Left) = Right;
3316- end Match ;
3317-
33183301 relocateBuildTree : constant String :=
33193302 " relocateBuildTree" ;
33203303 rootDir : constant String :=
@@ -3430,7 +3413,6 @@ package body LSP.Ada_Handlers is
34303413 -- relative path; if so, we're assuming it's relative
34313414 -- to Self.Root.
34323415 declare
3433- use type GNATCOLL.Projects.Project_Tree_Access;
34343416 Project_File : constant String := To_UTF_8_String (File);
34353417 GPR : Virtual_File;
34363418 begin
@@ -3440,23 +3422,13 @@ package body LSP.Ada_Handlers is
34403422 GPR := Join (Self.Root, Create_From_UTF8 (Project_File));
34413423 end if ;
34423424
3443- -- Avoid project reloading if scenario/gpr are the same
3444- if Self.Project_Tree = null
3445- or else Self.Charset /= Charset
3446- or else Self.Project_Tree.Root_Project.Project_Path /= GPR
3447- or else Self.Scenario /= Variables
3448- or else not Match (Self.Project_Environment.Build_Tree_Dir,
3449- Relocate)
3450- or else not Match (Self.Project_Environment.Root_Dir, Root)
3451- then
3452- Self.Load_Project
3453- (GPR,
3454- Variables,
3455- To_String (Charset),
3456- Valid_Project_Configured,
3457- Relocate,
3458- Root);
3459- end if ;
3425+ Self.Load_Project
3426+ (GPR,
3427+ Variables,
3428+ To_String (Charset),
3429+ Valid_Project_Configured,
3430+ Relocate,
3431+ Root);
34603432 end ;
34613433 end if ;
34623434
@@ -3625,10 +3597,6 @@ package body LSP.Ada_Handlers is
36253597 -- We're loading an actual project
36263598 Self.Project_Status := Status;
36273599
3628- -- Store scenario variables and charset
3629- Self.Scenario := Scenario;
3630- Self.Charset := To_Unbounded_String (Charset);
3631-
36323600 -- Now load the new project
36333601 Errors.a_type := LSP.Messages.Warning;
36343602 Self.Project_Environment :=
0 commit comments