@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 » Wed Mar 18, 2009 1:22 pm

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: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif » Wed Mar 18, 2009 2:06 pm

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 » Wed Mar 18, 2009 3:03 pm

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: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif » Wed Mar 18, 2009 3:58 pm

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: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: @return keyword on doxygen comment

Post by eranif » Wed Mar 18, 2009 4:59 pm

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 » Wed Mar 18, 2009 5:20 pm

Hi Eran,

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

denk_mal

Post Reply