Skip to content

Commit e765958

Browse files
committed
Merge branch 'topic/vadim/edge' into 'edge'
Merge master to edge See merge request eng/ide/gnatdoc!167
2 parents 8f06d37 + 410398e commit e765958

File tree

5 files changed

+34
-32
lines changed

5 files changed

+34
-32
lines changed

config/gnatdoc_config.ads

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--
2+
-- Copyright (C) 2025, AdaCore
3+
--
4+
-- SPDX-License-Identifier: GPL-3.0
5+
--
6+
7+
-- This file is stub to build GNATdoc outside of the Alire environment. Alire
8+
-- will overwrite it during builds.
9+
10+
pragma Restrictions (No_Elaboration_Code);
11+
pragma Style_Checks (Off);
12+
13+
package Gnatdoc_Config is
14+
pragma Pure;
15+
16+
Crate_Version : constant String := "%VERSION% (%DATE%)";
17+
18+
end Gnatdoc_Config;

gnat/gnatdoc.gpr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ project GNATdoc is
2525

2626
for Object_Dir use "../.objs";
2727
for Source_Dirs use
28-
("../source/backend",
28+
("../config",
29+
"../source/backend",
2930
"../source/backend/odf",
3031
"../source/backend/rst",
3132
"../source/backend/xml_templates",

source/backend/rst/gnatdoc-backend-rst.adb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ package body GNATdoc.Backend.RST is
346346
end loop;
347347
end Union;
348348

349-
Types : Entity_Information_Sets.Set;
349+
Types : Entity_Information_Sets.Set;
350+
Methods : Entity_Information_Sets.Set;
350351

351352
begin
352353
Union (Types, Entity.Simple_Types);
@@ -388,17 +389,21 @@ package body GNATdoc.Backend.RST is
388389
if Self.OOP_Mode
389390
and then Item.Kind in Ada_Interface_Type | Ada_Tagged_Type
390391
then
392+
Methods.Clear;
393+
391394
for Method of Item.Belongs_Subprograms loop
392395
if not Is_Private_Entity
393396
(GNATdoc.Entities.To_Entity (Method.Signature))
394397
then
395-
Generate_Subprogram_Documentation
396-
(" ",
397-
GNATdoc.Entities.To_Entity
398-
(Method.Signature).all,
399-
Entity.Qualified_Name);
398+
Methods.Insert
399+
(GNATdoc.Entities.To_Entity (Method.Signature));
400400
end if;
401401
end loop;
402+
403+
for Method of Methods loop
404+
Generate_Subprogram_Documentation
405+
(" ", Method.all, Entity.Qualified_Name);
406+
end loop;
402407
end if;
403408

404409
File.New_Line (Success);

source/gnatdoc/gnatdoc-command_line.adb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ with VSS.Strings.Conversions;
2121

2222
with GNATdoc.Comments.Options;
2323
with GNATdoc.Options;
24-
with GNATdoc.Version;
24+
with Gnatdoc_Config;
2525

2626
with GPR2.Options;
2727
with GPR2.Project.Registry.Exchange;
@@ -209,7 +209,8 @@ package body GNATdoc.Command_Line is
209209
VSS.Command_Line.Report_Error
210210
(Template.Format
211211
(VSS.Strings.Formatters.Strings.Image
212-
(GNATdoc.Version.Version_String)));
212+
(VSS.Strings.Conversions.To_Virtual_String
213+
(Gnatdoc_Config.Crate_Version))));
213214
end;
214215
end if;
215216

source/gnatdoc/gnatdoc-version.ads

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)