New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples with "using namespace" not hyperlinked properly (Origin: bugzilla #306076) #1666

Closed
doxygen opened this Issue Jul 1, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 1, 2018

status RESOLVED severity normal in component general for ---
Reported in version unspecified on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2005-05-31 20:16:01 +0000, J. P. Abelanet wrote:

Please describe the problem:
Example code that contains the "using namespace xyz" line do not properly
generated hyperlinks to classes in that namespace. Also, statements involving
member functions and the pointer operator do not get hyperlinked properly.

Steps to reproduce:

  1. Untar doxygen.examples_namespace_bug.tgz
  2. run doxygen in the top-level directory
  3. look at examples/torus.cpp - the comments in the code point out what does and
    does not get linked

Actual results:
Several of the references to member functions in main/torus.cpp do not have
hyperlinks.

Expected results:
All the references to member functions in main/torus.cpp should have hyperlinks.

Does this happen every time?
yes

Other information:
yes

On 2005-05-31 20:17:39 +0000, J. P. Abelanet wrote:

Created attachment 47077
test case that shows failure of examples and namespaces

On 2005-05-31 20:19:23 +0000, J. P. Abelanet wrote:

Created attachment 47078
test case that shows failure of examples

On 2005-05-31 20:21:17 +0000, J. P. Abelanet wrote:

Created attachment 47079
test case that shows failure

On 2005-05-31 20:24:41 +0000, J. P. Abelanet wrote:

When I try to download the attachment, Mozilla insists on calling it
attachment.cgi, but it is in fact a tgz file containing the test case.

On 2005-08-07 17:10:52 +0000, Dimitri van Heesch wrote:

Confirmed (though your example has a typo. The variable name is declared as
bSplineSurface, but bsplineSurface is used. Note the casing!).

Should be fixed in the next CVS update/release.

On 2005-08-09 14:49:39 +0000, J. P. Abelanet wrote:

Doh - sorry about the misspelled words. I downloaded doxygen-1.4.4-20050808,
and that did not seem to fix the problem.

On 2005-10-04 18:39:27 +0000, Dimitri van Heesch wrote:

This bug was resolved to status "FIXED" as part of a group change. Please verify
that this bug is indeed fixed in doxygen version 1.4.5 (or later). If not then
please reopen the bug, so it stays on my radar.

On 2005-10-13 19:50:40 +0000, J. P. Abelanet wrote:

Tested in 1.4.5 and verified that it works.

On 2005-10-31 20:47:32 +0000, J. P. Abelanet wrote:

Created attachment 54157
sample showing failure of using namespace with examples

This is the sample that shows that the fix for this bug was not complete. The
attachment is a .tgz file. Run doxygen at the top level directory and look at
the examples/torus.cpp page under Examples. Here is the problem - methods and
variables that are part of a namespace do not get hyperlinked under the
following conditions:
1> "using namespace XYZ" is used at the top of the example code
2> The reference does not use the "XYZ::" prefix
3> The reference contains an imbedded ::, as in the invocation of a static
method

On 2005-10-31 20:49:12 +0000, J. P. Abelanet wrote:

I am reopening this bug because it was only partially fixed - the comments with
the attachment explain the remaining problem.

On 2010-04-24 02:51:42 +0000, J. P. Abelanet wrote:

I recently tested this with 1.5.3 and 1.6.3 and this still does not work. I would really like to see this fixed, as this causes many many problems for my generated documentation.

On 2010-04-24 18:46:38 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2010-06-15 11:22:30 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.0. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

On 2010-07-21 18:38:52 +0000, J. P. Abelanet wrote:

Although it works much better than before, this is still not fixed.

The sample that was originally attached is fixed by 1.7.1, but a slightly modified version of the sample fails. The difference that causes failure is the addition of a local class declaration and definition, and this breaks the hyperlinking of static methods in combination with "using namespace xxx."

On 2010-07-21 18:39:43 +0000, J. P. Abelanet wrote:

Created attachment 166320
revised sample that breaks hyperlinking of examples with "using namespace"

On 2010-07-21 18:40:27 +0000, J. P. Abelanet wrote:

  1. Untar the latest attachment
  2. run doxygen in the top-level directory
  3. look at examples/torus.cpp - the comments in the code point out what does and
    does not get linked

On 2010-08-29 14:24:11 +0000, Dimitri van Heesch wrote:

Confirmed. The MyBSplineSurface constructor definition causes the scope to be reset. Should be fixed in the next subversion update.

On 2010-08-29 19:22:08 +0000, Thomas Grund wrote:

Created attachment 169013
small example for missing links with namespaces

On 2010-08-29 19:25:48 +0000, Thomas Grund wrote:

I have similar problems with creating links. In the attachment: links are fine for the class 'ok' but no links for the class 'not_ok'.

On 2010-10-09 08:20:02 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.2. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

On 2010-10-17 19:19:21 +0000, Thomas Grund wrote:

The last attachments still does not work with 1.7.2. It is a case with 'using namespace and \code

On 2010-11-09 13:28:26 +0000, Roland Hermans wrote:

Created attachment 174132
Another example of missing links to namespace members

The problem described in this bug report is not limited to the "using" keyword. Also when comments are located within the namespace { ... } not always the proper links are being generated. For the attached example with Doxygen 1.7.2:

Member MyGlobalFunc1 (MyGlobalType a,MyGlobalType b)

  • In the detailed description Doxygen should create a link for MyGlobalType
    (i.e. the one without double colon prefix).
  • In the bug list Doxygen should create a link to MyGlobalType for parameter a.

Member PLAT::MyNSFunc1 (PLAT::MyNSType a, MyNSType b,MyNSType c)

  • In the function overview of the namespace page, Doxygen should not create a
    link from the type of parameter c to PLAT::MyNSType.
  • In the detailed description of the namespace page, Doxygen should create a
    link to PLAT::MyNSType for parameter b.
  • In the function overview of the file reference page, Doxygen should create a
    link to PLAT::MyNSType for parameter b.
  • In the bug list, Doxygen should create a link to PLAT::MyNSType for
    parameter b.

On 2010-11-13 19:20:47 +0000, Dimitri van Heesch wrote:

(In reply to comment # 21)

The last attachments still does not work with 1.7.2. It is a case with 'using
namespace and \code

You are right, there was still an explicit check for an example block in the code. I'll correct this in the next subversion update.

(In reply to comment # 22)
This is really a different issue. Doxygen does not autolink normal words (without # or ::) unless they are class names. If you still think there is an issue, please file a new bug report for it.

On 2010-11-21 19:35:26 +0000, Thomas Grund wrote:

using namespace and \code works fine for our examples with 1.7.2-20101118.
Thank you!

There are some other issues regarding non-empty-constructors and member function linking. But they are not releated to this topic and I will check first at the mailing list ...

(In reply to comment # 21)

The last attachments still does not work with 1.7.2. It is a case with 'using
namespace and \code

On 2011-01-03 19:01:40 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this Jul 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment