Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323562 - Doxygen auto-comment does not work for plain C function declaration
Summary: Doxygen auto-comment does not work for plain C function declaration
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 02:40 EDT by Segaja CLA
Modified: 2010-08-26 05:23 EDT (History)
3 users (show)

See Also:


Attachments
Generate documention for IASTFunctionDeclarator (2.20 KB, patch)
2010-08-26 01:28 EDT, Marc-André Laperle CLA
aleherb+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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