doxygen: nest subpage titles inside section title in treeview - doxygen

I would like to customise the appearance of the navigation tree column to have subpages' title nested inside the section's title they are referenced in. For instance, this simple example
/**
* #mainpage Mainpage
* #section section_1 Section 1
* Description of section 1
*
* #section section_2 Section 2
* Section 2 is composed of the following modules:
* - #subpage module_1_page
* - #subpage module_2_page
*/
/**
* #page module_1_page Module 1
* Module 1 description
*/
/**
* #page module_2_page Module 2
* Module 2 description
*/
results in the following output:
What I would like to achieve is something like this (I manually edited the HTML result):
I had a look at the page Customizing the output of the Doxygen documentation, but I was not able to find anything that seems helpful in this case.
Also, I had a look at grouping as an alternative to pages, but it does not really fit my purposes - I use groups for actual APIs documentation, whereas I'd like to use pages for more "descriptive" documentation.
Is this possible to achieve? For the sake of completeness, I am using doxygen v1.8.13.

Related

Create a custom index in doxygen

I would like create a index of ".h" files in my doxygen-ed project in addition of the default index.
Is there a way to do this automatically ?
I have do this by adding a \addtogroup in every headers like this :
/** \addtogroup Headers
* - oge-mutex.h
* \copybrief oge-mutex.h
*/
This will create a page with a list of all marked headers and her brief description.

Consolidating Documentation Fragments on one page

I would like to consolidate documentation fragments on one page.
My use case is I have two different source modules where I want to put a doxygen fragment. Then in a third source module I want to put a #page that references the fragments.
My hope is that when the doc is generated I will see those 5 fragments consolidated onto one .html page.
The page/subpage system does not work because that just puts links on a page to the documentation fragments. I want the fragments consolidated onto one page.
This is the first .c file:
/*! #setfrag FRAG1
** this is some text for fragment 1
*/
This is a second file:
/*! #setfrag FRAG2
** This is some text for fragment 2.
*/
This is a third file:
/*! #page SOMEPAGE Page demonstrates consolidating fragments.
** #getfrag FRAG1
** #getfrag FRAG2
*/
I'm not sure if I understood your question right, but this should be exactly what grouping does. You can define a "group" using the tag #defgroup groupname description and then add the fragments to the group using the tag #addtogroup groupname.
Then you would define your group in any file (e.g. you could create a seperate file "groups.dox"):
/**
* #defgroup myGroup My Group
* #brief A brief description of \"My Group\"
* #details A more detailed description of \"My Group\".
*/
Them you can add fragments or complete files to this group by adding the following to the files:
/**
* #addtogroup myGroup
* #{
*/
// any contents you want to add to the group
/**
* #}
*/
This results in a tab called "Modules" where each group is listed as a "Module" with its own page. If you want to add the whole file documentation to the group ensure that you also enclose the #file tag with the #{ and #} tags.

Eclipse template for comment not working (cursor positioning)

I have set the template for "Types" to be:
/** $$Id$$
* $$Author$$
* $$Revision$$
*
* ${cursor}
*/
However the ${cursor} isn't working as it ought to, you can see here ( http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Fconcepts%2Fconcept-template-variables.htm - top of the first table) how ${cursor} should work.
When I use this template (by typing /** and then pressing enter) I get the following (where | denotes the cursor position)
/**
* |$Id$
* $Author$
* $Revision$
*
*
*/
How can I fix this, or if I am at fault, how can I get the desired behaviour?
The help does not make it very clear but the variables list you reference only applies to the 'Java > Editor > Templates' templates and not to the 'Java > Code Style > Code Templates'.
There is a much more restricted list for variables for the Code Templates which does not include ${cursor}.
Only the variables shown by the 'Insert Variable...' button of the Edit Template dialog are available.

Do not include custom markdown pages as top-level pages when including them as subpage?

I include markdown files in my groups in doxygen like so:
/**
* #addtogroup foobar "Foo Bar"
* #{
* #subpage doc_foo_bar
*/
And they show up in the module documentation as requested. But anyways, they show up as normal top-level-pages, like so:
project
- foo_bar <-- The "doc_foo_bar" custom markdown page
- modules
- - foobar <-- The module "foobar", which includes a "detailed documentation", which links to the markdown page
How to remove the top-level markdown page if it is already included in the module documentation group?
I hope my explanation is plain.

How can I customise Eclipse function comment block parsing?

If I have a block of code like this:
/**
* function description text here
* with
* other
* stuff
* on
* multiple
* lines
*/
function somefunction() ...
The function description on hovering the function will show the lines with a space in between, eg:
function description here
with
other
...
How can I customise the Eclipse function comment block parser to make it so that there is no extra space? Of course, I'd also like to customise it to do other things, but this seems like a good place to start.
Try and change from the following menu:
Window>Preferences>Java>Code Style>Formatter>Edit >Comments Tab >General Settings