Author Topic: Doxygen plugin  (Read 162395 times)

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #210 on: September 05, 2010, 11:53:18 pm »

 Hi Olly,

Here is my test on doxygen, which I just right click on the function name and would like to add the block comment

So,
1, I guess the function parameter in multiply lines are not supported.
2, I think we don't need to add the "type" information , so "\param actual" is enough.

any comments?


1. No, it's not, I'm afraid and I was unable to make it work.

2. I don't know what you mean, here.

Cheers.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5109
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Doxygen plugin
« Reply #211 on: September 06, 2010, 01:15:43 am »
2. I don't know what you mean, here.
thanks for the reply and sorry for my bad English.

I mean that

Code: [Select]
/** \brief
         *
         * \param actual const wxString&
         * \param components std::queue<ParserComponent>&
         * \return size_t
         *
         */                                                     
        size_t BreakUpComponents(const wxString& actual, std::queue<ParserComponent>& components);

should be:
Code: [Select]
/** \brief
         *
         * \param actual
         * \param components
         * \return size_t
         *
         */                                                     
        size_t BreakUpComponents(const wxString& actual, std::queue<ParserComponent>& components);
Not type information about the parameter is need. (this is most comment style in codeblocks' source).
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #212 on: September 08, 2010, 09:33:08 pm »

 Hi Guys,

I am happy to report that, at long last, I now have a .cbplugin for 10.5 on Windows. It's available from:

http://wxsmithaddons.sourceforge.net/doxyblocks.html

Many thanks to my main man killerbot for building it. I'm sure it will be appreciated by those who have been waiting for it. I will try and coerce Jens into making one for Linux to complete the set.

Cheers,

 Gary.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #213 on: September 08, 2010, 09:43:57 pm »
2. I don't know what you mean, here.
thanks for the reply and sorry for my bad English.

I mean that

Code: [Select]
/** \brief
         *
         * \param actual const wxString&
         * \param components std::queue<ParserComponent>&
         * \return size_t
         *
         */                                                     
        size_t BreakUpComponents(const wxString& actual, std::queue<ParserComponent>& components);

should be:
Code: [Select]
/** \brief
         *
         * \param actual
         * \param components
         * \return size_t
         *
         */                                                     
        size_t BreakUpComponents(const wxString& actual, std::queue<ParserComponent>& components);
Not type information about the parameter is need. (this is most comment style in codeblocks' source).

OK, got it. Please don't apologise, my brain's getting old. I think that what is "most common" probably depends on experience and other factors. There's no way DoxyBlocks can ever deal with every possible code format or please everyone. I seem to remember getting the existing form from doxyblocks docs but I see that it's different in the current version. Maybe it changed or maybe it came from the original script, I really can't recall. If there was a consensus that a specific format was wanted, we could certainly change it. What you can do is modify your copy to produce the output you want, though. It should be fairly straightforward and I'm happy to help you if required. Just yell.

Gary.



Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5107
Re: Doxygen plugin
« Reply #214 on: September 08, 2010, 09:50:25 pm »
Hi Gary,
to be honest this is the first time is saw that the type information was added.

My feeling is, no need to specify the type information (another thing to change when the parameter would become a different type).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9473
Re: Doxygen plugin
« Reply #215 on: September 09, 2010, 06:14:27 am »
My feeling is, no need to specify the type information (another thing to change when the parameter would become a different type).
I agree here, as usually Doxygen handles that for you anyways. I'd say the variable name is enough.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: Doxygen plugin
« Reply #216 on: November 04, 2010, 01:18:39 pm »
Hi,

its hard to describe ... but is it possible to configure plugin (update source) so that inserting block comment is one unite editor action and can be removed using one "undo"? Now it needs much more undo operations to return to the state before inserting comment, which is especially annoying in case of accidental comment insertion :)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Doxygen plugin
« Reply #217 on: November 04, 2010, 01:48:57 pm »
Hi,

its hard to describe ... but is it possible to configure plugin (update source) so that inserting block comment is one unite editor action and can be removed using one "undo"? Now it needs much more undo operations to return to the state before inserting comment, which is especially annoying in case of accidental comment insertion :)
Yes it's quite easy.

I attach a patch against actual trunk.

@Gary:
can I commit the patch or do you want to review it and update your svn-repo first, if you accept the patch ?

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #218 on: November 06, 2010, 07:26:37 pm »

 Hi Jens,

No, you go ahead. My SF repo. is defunct, now.

Thanks.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Doxygen plugin
« Reply #219 on: November 07, 2010, 08:53:51 am »

 Hi Jens,

No, you go ahead. My SF repo. is defunct, now.

Thanks.

Done in svn r6840 .

NefX

  • Guest
Re: Doxygen plugin
« Reply #220 on: November 08, 2010, 07:24:15 pm »
I agree here, as usually Doxygen handles that for you anyways. I'd say the variable name is enough.
Yeah, you can see type name already so it's not needed.

Two things I would like to see -  code completion displaying doxygen comments and automatic adding e.g. '///' when making new line (inside doxygen comment).  By the way how to change default hotkeys from this plugin?

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Doxygen plugin
« Reply #221 on: November 14, 2010, 11:50:12 am »
First time I use your plugin Cryogen. It's very efficient, good job and thank you !
Kernel Extremist - PedroM power

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #222 on: November 20, 2010, 02:35:40 am »
First time I use your plugin Cryogen. It's very efficient, good job and thank you !

[Admin: Removed non-english content.]

I'm glad you found it useful.

Cheers.
« Last Edit: November 21, 2010, 03:22:49 pm by MortenMacFly »

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: Doxygen plugin
« Reply #223 on: December 20, 2010, 03:44:02 pm »
Hi,

it seems that plugin has problem with commenting multiline function/procedure declarations. It adds block comment, but parameter names (and types) are missing. For example:

Code: [Select]
    /** @brief
     *
     * @param
     * @param
     * @return
     *
     */                             
    void handle_write(const int error,
                      long bytes_transferred)


but I expected this:

Code: [Select]
    /** @brief
     *
     * @param error const int
     * @param bytes_transferred long
     * @return void
     *
     */                             
    void handle_write(const int error, long bytes_transferred)


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #224 on: December 29, 2010, 03:07:39 am »
Hi,

it seems that plugin has problem with commenting multiline function/procedure declarations. It adds block comment, but parameter names (and types) are missing. For example:


Yes, quite right. I could find no way to make it accommodate them. I still can't, unfortunately.

The barely useful work-around is to condense the declaration to one line, generate the comment, then revert it.

Cheers.