doxygen icon indicating copy to clipboard operation
doxygen copied to clipboard

Allow non-globally unique page/section labels when using tagfiles (Origin: bugzilla #705285)

Open doxygen opened this issue 7 years ago • 1 comments
trafficstars

status NEW severity enhancement in component general for --- Reported in version 1.8.4 on platform Other Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2013-08-01 12:42:15 +0000, x29a wrote:

Created attachment 250609
Archive with mentioned images, test scenario and configs

I have been working on this issue for a quite a time now, was on 1.8.3.1 and
hoped that

https://bugzilla.gnome.org/show_bug.cgi?id=699195

and

https://bugzilla.gnome.org/show_bug.cgi?id=693406

fixed it, but not quite.

My scenario is the following.

Multiple VisualStudio project (therefor plattform: Windows) are to be
documented. Each of them has a dedicated "INFO" page (implemented as its own
.dox file containing a @page command) which describes the basic
functionality of the project.

Dependencies between the projects are to be resolved using tagfiles.
Therefor i run doxygen on each project and generate a tagfile. In a second
doxygen run, i append the related .tagfiles to the doxycfg (TAGFILES = ...).

The references work quite well, depending classes get recognized very well
and i can navigate through the navigation for all projects.

Yet, i have GENERATE_TREEVIEW set to YES in order to get the fancy menue on
the left. I also have DISABLE_INDEX set to NO as i want both menus.

Then, multiple pages from different projects appear in the treeview on the
left, in this example it adds the INFO page from project B (but not the
equally references project C). Screenshot is attached.

external_pages_yes.png

I thought the new parameter might fix this, but with EXTERNAL_PAGES = NO i
get the merged pages under the root level of INFO page

external_pages_no.png

As one can see, the treeview gets confused from the data from tagfiles. It
shows the section headers from Project A under INFO Project B, allthough
they link to INFO Project B. Project A on the bottom is correct, i would
expect only those entries.

I dont add pages to group, are therefor all pages in the same group and the
merge is intended, as mentioned here?

http://comments.gmane.org/gmane.text.doxygen.general/3017

Maybe the issue is also related to namespaces as mentioned here:

http://stackoverflow.com/questions/17837272/doxygen-namespace-from-
referenced-tag-file-displayed-in-referencing-library-d

This bug might also be a duplicate of:

https://bugzilla.gnome.org/show_bug.cgi?id=694789

or is related to:

https://bugzilla.gnome.org/show_bug.cgi?id=694195

I attached a testcase which resembles my setup, it features a generate.bat
which basically changes into each directory and calls doxygen on the project
config. In order for the references tagfiles to be current, i run this
script twice.

Each project has its own subconfig which @INCLUDEs one global config and
replaces relevant TAGs with appropriate values. Each project also features
an extra info_page.dox containing the info page.

This info_page.dox contains the follow page command (e.g. for project B):

@page ipageb INFO Page B

I made the page name (first argument) unique in order to seperate all pages
(title, second argument, is only unique in the example to see which page
gets references, ultimately, it should just be INFO Page).

Now the tricky/buggy/funny part, using the same pagename for all pages like

@page ipage INFO Page A
@page ipage INFO Page B
@page ipage INFO Page C

produces the right output (EXTERNAL_PAGES still NO):

all_pages_same_name.png

Now projects B and C dont have an INFO page at their related page.

no_related_pages_anymore.png

So this looks like inverse behavior, when defining multiple pagenames, they
get merged, with the same pagename, only one page appears.

Sorry for this huge report, i hope it can be of help finding this issue.

On 2013-08-01 13:27:25 +0000, x29a wrote:

I just found out, the grouping is done because in each info_page.dox, i use
the same section names, so changing

@section sec_general General Information A

to

@section sec_general_a General Information A

works as expected. So sections dont seem to respect the namespace of their
page correctly.

It would be nice to be able to use the same section names over multiple
projects! Since the output is still flawed (showing title for project A,
linking to project B) when using the same section names, this is still a
bug.

On 2013-11-27 22:57:57 +0000, Daniele E. Domenichelli wrote:

I can confirm this bug. This is a very short example to reproduce this
issue:

file: page1.dox
---
/*!
\page page1 Page 1
\tableofcontents
\section section1 Page 1 Section 1
This is page 1
\li \link section1 Introduction for this page \endlink
\li \ref section1
*/
---

file: page2.dox
---
/*!
\page page2 Page 2
\tableofcontents
\section section1 Page 2 Section 1
This is page 2
\li \link section1 Introduction for this page \endlink
\li \ref section1
*/
---

This is the generated tag file

---
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<tagfile>
  <compound kind="page">
    <name>page1</name>
    <title>Page 1</title>
    <filename>page1</filename>
    <docanchor file="page2" title="Page 2 Section 1">section1</docanchor>
  </compound>
  <compound kind="page">
    <name>page2</name>
    <title>Page 2</title>
    <filename>page2</filename>
    <docanchor file="page2" title="Page 2 Section 1">section1</docanchor>
  </compound>
</tagfile>
---

Links in page1 to section1 are changed to links to page2. Also the title of
the section is not used, and the one from section2 is used instead.

Maybe it is ok to assume that in one project you cannot have sections with
the same name, but not being able to have a section with the same name of a
section in an imported tag file for another project is a bit stretched.

doxygen avatar Jul 02 '18 09:07 doxygen

I've just pushed a proposed patch, pull request #10329

albert-github avatar Sep 27 '23 16:09 albert-github