@return keyword on doxygen comment

General questions regarding the usage of CodeLite
denk_mal
CodeLite Enthusiast
Posts: 16
Joined: Mon Oct 13, 2008 6:20 pm
Contact:

@return keyword on doxygen comment

Post by denk_mal »

Hi Eran,

i have tried to add the @return keyword to the doxygen function prefix but the result is not really what i want because
it stays above the @param keywords.

Can I change this in the settings or must this be done in the code?
(If so I will fill out a feature request of course)

it would also be nice if the @return keyword will only inserted if the function returns void

thanks
denk_mal
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif »

Hi,

You dont need to modify the 'function prefix' since it will be added automatically by codelite.

here is an example of how it works:

Code: Select all

class MyClass
{
private:
	/**
	 * @brief
	 * @return
	 */
	bool isSomething();
	/**
	 * @brief
	 */
	void no_op();

	/**
	 * @brief
	 * @param name
	 */
	void with_param(wxString name);
	/**
	 * @brief
	 * @param name
	 * @return
	 */
	std::vector<int> return_with_param(wxString name);
};
The above comments were generated by codelite - and it seems that it does what you need
If it does not work like this for you, please send/paste here a code snippet and how to reproduce it

Thanks,
Eran
Make sure you have read the HOW TO POST thread
denk_mal
CodeLite Enthusiast
Posts: 16
Joined: Mon Oct 13, 2008 6:20 pm
Contact:

Re: @return keyword on doxygen comment

Post by denk_mal »

Hi Eran,

I have tried it in the source file (*.cpp) and got the following:

Code: Select all

/**
 * @brief
 */
long customer_service::GetAllCustomers() const
{
...
}
after I saw your example I have tried in the headerfile and there it works as expected.

I have searched a little bit in the source of codelite and found out that the variables name and type in cpp_comment_creator.cpp line 80 are both empty (and therefore the @return keyword won't print out)
Does it came from the class prefix (customer_service::) in the source file ?

hth
denk_mal
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif »

Ok, this seems like a bug, I will try to debug this example.

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif »

I committed a fix for this in SVN trunk.

Eran
Make sure you have read the HOW TO POST thread
denk_mal
CodeLite Enthusiast
Posts: 16
Joined: Mon Oct 13, 2008 6:20 pm
Contact:

Re: @return keyword on doxygen comment

Post by denk_mal »

Hi Eran,

thanks for the bugfix. I have tried it and it works (of couse ;) )

denk_mal
Post Reply