Skip to content

Commit 5a09d97

Browse files
committed
Merge branch 'topic/vadim/transformations' into 'master'
Use text transformers to convert case. See merge request eng/ide/ada_language_server!1469
2 parents 52b4880 + 82dccda commit 5a09d97

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

source/ada/lsp-ada_configurations.adb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2018-2023, AdaCore --
4+
-- Copyright (C) 2018-2024, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -25,16 +25,19 @@ with VSS.JSON.Pull_Readers.Simple;
2525
with VSS.JSON.Streams;
2626
with VSS.Strings.Conversions;
2727
with VSS.Text_Streams.File_Input;
28+
with VSS.Transformers.Casing;
2829

2930
package body LSP.Ada_Configurations is
3031

3132
Doc_Style_Values : constant VSS.String_Vectors.Virtual_String_Vector :=
3233
[for Item in GNATdoc.Comments.Options.Documentation_Style =>
33-
VSS.Strings.To_Virtual_String (Item'Wide_Wide_Image).To_Lowercase];
34+
VSS.Strings.To_Virtual_String (Item'Wide_Wide_Image).Transform
35+
(VSS.Transformers.Casing.To_Lowercase)];
3436

3537
Display_Method_Values : constant VSS.String_Vectors.Virtual_String_Vector :=
3638
[for Item in LSP.Enumerations.AlsDisplayMethodAncestryOnNavigationPolicy
37-
=> VSS.Strings.To_Virtual_String (Item'Wide_Wide_Image).To_Lowercase];
39+
=> VSS.Strings.To_Virtual_String (Item'Wide_Wide_Image).Transform
40+
(VSS.Transformers.Casing.To_Lowercase)];
3841

3942
function "+" (X : VSS.Strings.Virtual_String'Class) return String renames
4043
VSS.Strings.Conversions.To_UTF_8_String;

source/gpr/lsp-gpr_files.adb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2023, AdaCore --
5-
-- procedyur --
4+
-- Copyright (C) 2023-2024, AdaCore --
5+
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
88
-- ware Foundation; either version 3, or (at your option) any later ver- --
@@ -28,6 +28,7 @@ with Gpr_Parser_Support.Text;
2828

2929
with VSS.Strings.Conversions;
3030
with VSS.Strings.Formatters.Generic_Integers;
31+
with VSS.Transformers.Casing;
3132

3233
pragma Warnings (Off, "* is an internal GNAT unit");
3334
with System.Soft_Links; use System.Soft_Links;
@@ -252,7 +253,7 @@ package body LSP.GPR_Files is
252253
Is_Others => False,
253254
Compare => (if Case_Sensitive
254255
then VS_Text & "@" & Convert.Image (At_Pos).Name
255-
else VSS.Strings.To_Lowercase
256+
else VSS.Transformers.Casing.To_Lowercase.Transform
256257
(VS_Text & "@" & Convert.Image (At_Pos).Name)),
257258
At_Pos => At_Pos);
258259
end Create;

0 commit comments

Comments
 (0)