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

Namespaces lead to long names and graphs stretch off the page. (Origin: bugzilla #661499) #4426

doxygen opened this Issue Jul 2, 2018 · 0 comments


None yet
1 participant

doxygen commented Jul 2, 2018

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

Original attachment names and IDs:

On 2011-10-11 22:05:26 +0000, Greg Kochanski wrote:

Created attachment 198818
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 .

On 2011-10-12 17:37:34 +0000, Dimitri van Heesch wrote:

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?

On 2011-10-12 21:23:12 +0000, Greg Kochanski wrote:

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.

On 2012-03-03 18:49:26 +0000, Dimitri van Heesch wrote:

I'll include a variant of your patch in the next subversion update.

On 2012-05-19 12:26:52 +0000, Dimitri van Heesch wrote:

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.

@doxygen doxygen closed this Jul 2, 2018

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