Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323562

Summary: Doxygen auto-comment does not work for plain C function declaration
Product: [Tools] CDT Reporter: Segaja <webmaster>
Component: cdt-editorAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: aegges, malaperle, webmaster
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Generate documention for IASTFunctionDeclarator aleherb+eclipse: iplog+

Description Segaja CLA 2010-08-25 02:40:02 EDT
Build Identifier: M20090917-0800

Hi,

I have enabled Doxygen integration for my current project.
When I now go in a C file over a function and start a comment block with

/**

and then hit enter I get an doxygen template comment with @param lines for each parameter of the function.

I would like to have the same behaviour in a .h file.

It works in .c, .cpp and .hpp files, but not in .h files.

Example file: http://pastie.org/private/plf6wni6qfvctllb9cea

Reproducible: Always

Steps to Reproduce:
1. Write a normal function in a C Header file
2. Write a /** in the line above the function and hit enter.
3. Now the @param and @return tags should appear but don't.
Comment 1 Axel Mueller CLA 2010-08-25 03:01:06 EDT
It should be noted that it works for a C++ project but not for a C project (see discussion here http://www.eclipse.org/forums/index.php?t=msg&th=173666&start=0&S=c508e61617454b3af08a04450444c616 )
Comment 2 Marc-André Laperle CLA 2010-08-26 01:28:09 EDT
Created attachment 177489 [details]
Generate documention for IASTFunctionDeclarator

The documentation was generated only for ICPPASTFunctionDeclarator.
Comment 3 Anton Leherbauer CLA 2010-08-26 04:22:58 EDT
Thanks for the patch.  Looks reasonable.
Comment 4 Anton Leherbauer CLA 2010-08-26 04:49:36 EDT
Committed to HEAD and cdt_7_0.
Comment 5 CDT Genie CLA 2010-08-26 05:23:02 EDT
*** cdt cvs genie on behalf of aleherbau ***
Bug 323562 - Doxygen auto-comment does not work for plain C function declaration
Patch from  Marc-Andre Laperle

[*] DoxygenMultilineAutoEditStrategy.java 1.9.6.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java?root=Tools_Project&r1=1.9.6.1&r2=1.9.6.2

[*] DoxygenMultilineAutoEditStrategy.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java?root=Tools_Project&r1=1.10&r2=1.11