After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661499 - Namespaces lead to long names and graphs stretch off the page.
Namespaces lead to long names and graphs stretch off the page.
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.3
Other Linux
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-10-11 22:05 UTC by Greg Kochanski
Modified: 2012-05-19 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A diff -U 2 patch. (2.46 KB, patch)
2011-10-11 22:05 UTC, Greg Kochanski
none Details | Review

Description Greg Kochanski 2011-10-11 22:05:26 UTC
Created attachment 198818 [details] [review]
A diff -U 2 patch.

Big C++ projects require the use of namespaces.    While that helps keep code organized, it leads to very long names when you write things out in full.   Doxygen's graphs include the full names of things, and one can get names like dingleblatter::learning::logpopper::prepareToDoWork as the label of a node.     Doxygen's nice diagrams that show class inheritance and function calls get warped by these names.   The boxes become highly elongated, and they don't fit well onto a page or a screen.

So, this patch folds long names.  It adds a function to src/dot.cpp .
Comment 1 Dimitri van Heesch 2011-10-12 17:37:34 UTC
Hi Greg,

I like the idea, but I do not understand the magic computations you do with foldlength. Can you explain? Is it there to prevent that a single or small number of characters end up alone on the last line?
Comment 2 Greg Kochanski 2011-10-12 21:23:12 UTC
The basic idea there is to try to keep the lengths of the lines (after folding) similar.   For instance, assume foldlength starts at 17, but the first good spot to fold is (hypothetically) 35 characters in.  In that case, your box is going to be 35 characters long, so it would be silly to continue with a relatively short foldlength of 17.   You might as well increase it to allow the second line to be about the same length as the first.

Ideally, all the lines would be nearly the same length.   One could write some fancy code to optimize it, but this does a reasonable approximation.

Or, do you mean the "e-p > foldlength/3" ?    That's there to ensure that we don't split of a tiny short section onto the final line.
Comment 3 Dimitri van Heesch 2012-03-03 18:49:26 UTC
I'll include a variant of your patch in the next subversion update.
Comment 4 Dimitri van Heesch 2012-05-19 12:26:52 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.1. 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.