Author Topic: Doxygen plugin  (Read 285641 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Doxygen plugin
« Reply #15 on: February 25, 2010, 09:50:47 pm »
Quote
codeblocks: relocation error: /usr/lib/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8.2 not defined in file libwx_baseu-2.8.so.0 with link time reference

This is a problem with the wxWidgets in Ubuntu 9.10, that is not binary compatible with the version of wxWidgets.org .
There are several posts about this, to fix the problem.

Nevertheless, I will see what I can do to build and run your plugin on linux .

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Doxygen plugin
« Reply #16 on: February 25, 2010, 10:39:32 pm »
Hello Cryo/Gary,
I am not surprised that you got frustrated. There is a lot to know about CB, wxWidgets and the various releases of the different platforms that is hard to come by as it is lost in a huge amount of discussion on the forums. Documentation is definitely not crash hot. We need Doxygen!
Only long-time developers can navigate through this maze with some ease, and they may not fully understand the frustrations of a newcomer.
However do not bang your head against the wall for 16 hours again. Ask for help here. Your project is really useful and as you can see from the replies from jens and MMF, those long-timers are very willing to help a worthwhile cause.
I, for one am very grateful to you for trying so hard. I'll try building your new version on my Windows system.
Many thanks for this and for publishing the docs.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #17 on: February 25, 2010, 11:23:08 pm »

 Hi Codeur,

Quote
Thanks for trying to guess why I am having this issue. I do not myself have time to investigate this, so I am not asking for help on this.

No probs.  8)

Quote
Just to answer your question, The error I get when installing the .cbplugin is:
...
One or more plugin were not loaded.
This usually happen when a plugin is built for a different version
of the Code::Block SDK. Check the application log for more info.
...
Obviously this does not tell us much new. (Except that it is an answer to your question: A plugin built from a recent svn is very unklikely to run in CB 8.02.)

Yes, you may have hit the nail on the head, there. If I'm lucky the imminent release will update whatever is required and this problem will go away. I love "if"s.  :lol:

Quote
It also tells me that upgrading my version would indeed probably fix the issue. I'll do that sometime, but don't hold your breath as this is an installation common to about 200 people. I do not change it just to install a new plugin, even one as useful as Doxygen.

Yup, I understand. That's a big group you have there!

Cheers.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #18 on: February 25, 2010, 11:42:38 pm »

 Hi Morten,

Quote
I gave it a try and it looks quite good.

Oh, that's good. It's nice to know that someone has been able to run it.

Quote
Hence I have some suggestions to make:
1.) It was hard to me to find out how I actually use this. Until I found the toolbar which gives access to the functions. An extra "doxygen" menu would be fine.

Fair comment. Funny what we assume, isn't it? Do you think that it would be best as a sub-menu in the Plugins menu or is it worthy of a new menu to itself?

Quote
2.) In addition some of the options should go into the editors context menu, too (like "add doxygen comment at current editor position) for convenience.

Sounds like a good idea.

Quote
3.) The "DOT_PATH" is written twice if you setup the DOT executable. You just need to remove the additional line:
Code:

 Thanks, I'll look into that and fix it.

Quote
4.) Having the possibility to view the HTML file in the internal HTML viewer of C::B would be really convenient, too. You can have a look how it's done in the build log.

I hadn't thought of that as I don't use it but it sounds useful. What do you mean by "in the build log"?

Quote
5.) The project file needs some clean up as there are absolute path's included that make installation fail. You should consider to put all path's relative to the "contrib" plugin folder. That's what most people expect I'd say.

Done, as described in a previous post. If it can improve further, let me know.

Quote
6.) The setup dialog is quite huge and although I personally don't really care I think users with small screen resolutions will complain sooner or later.

It's interesting that you say that because I have taken care NOT to enlarge the editor prefs window. Something may have slipped recently. I did some reorganising today, as well. I may split the doxyfile prefs across two tabs. I think that'll have to happen if I include any more default options, anyway.

Quote
Besides this I just started using it and having fun.

Cool, ta.

Thanks for the useful suggestions. Keep 'em coming. I want this to be useful to the community at large so I'm open to change.

Cheers.


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #19 on: February 25, 2010, 11:53:47 pm »
Quote
Hello Cryo/Gary,

Gary's fine. I don't use the tag, as such, it's just that my name and initials are never available when I have to register for things.

Quote
I am not surprised that you got frustrated. There is a lot to know about CB, wxWidgets and the various releases of the different platforms that is hard to come by as it is lost in a huge amount of discussion on the forums. Documentation is definitely not crash hot. We need Doxygen!

Yeeeees, the forums and good ol' Google are very useful but they don't always get you all of the way.

Quote
Only long-time developers can navigate through this maze with some ease, and they may not fully understand the frustrations of a newcomer.

That's pretty normal and it's why folks like me have jobs.  8)

Quote
However do not bang your head against the wall for 16 hours again. Ask for help here. Your project is really useful and as you can see from the replies from jens and MMF, those long-timers are very willing to help a worthwhile cause.

Yes, I know and appreciate that but I have two fundamental flaws. The first is that I am a stubborn git and determined to work things out. The second is that I'm impatient and dislike sitting around twiddling my thumbs waiting for forum responses (said with due deference to folks here, you can't expect rapid responses at times that suit you). I usually wait until I can't find anything else to try and have no choice before I do that, which is where I am now.  :lol:

Quote
I, for one am very grateful to you for trying so hard. I'll try building your new version on my Windows system.
Many thanks for this and for publishing the docs.

Thanks, jolly decent of you to say so and you're welcome. We'll get there between us, I have no doubt, but see flaw 2 above.  :P

Cheers,

  Gary.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #20 on: February 26, 2010, 12:04:16 am »

 Hi Jens,

Quote
This is a problem with the wxWidgets in Ubuntu 9.10, that is not binary compatible with the version of wxWidgets.org .
There are several posts about this, to fix the problem.

Yes, I have tried them all, including your pages. :-)

Quote
Nevertheless, I will see what I can do to build and run your plugin on linux .

Thanks, that would be wonderful. If you can suggest how I should proceed on Ubuntu Karmic that would also be great.

Cheers.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Doxygen plugin
« Reply #21 on: February 26, 2010, 07:28:15 am »
Thanks, that would be wonderful. If you can suggest how I should proceed on Ubuntu Karmic that would also be great.
Compiling on linux was no problem, I attach the project-file that works for me.
I did not (yet) test the functionality.

To use C::B on Karmic, you have to either remove all wxwidgets 2.8.10 packages shipped with ubuntu and use the ones from apt.wxwidgets.org (in this case you can use my repo), or remove all packages from apt.wxwidgets.org and use the packages shipped with Karmic.

In the second case you have to build C::B yourself with automake system or use the repo provided by pasgui (he provides a special version for Karmic) : http://forums.codeblocks.org/index.php/topic,11875.msg80825.html#msg80825 .

[attachment deleted by admin]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Doxygen plugin
« Reply #22 on: February 26, 2010, 08:12:40 am »
Fair comment. Funny what we assume, isn't it? Do you think that it would be best as a sub-menu in the Plugins menu or is it worthy of a new menu to itself?
Do an own one. (That's just my opinion.)

I hadn't thought of that as I don't use it but it sounds useful. What do you mean by "in the build log"?
If you write a HTML log file then in the build log a message (link) to the HTML log file appears which you can click. This opens the internal HMTL viewer of C::B. I meant have a look at the code how it's done.

I think that'll have to happen if I include any more default options, anyway.
Mmmh... I was under the impression that the stand-alone config dialog was that big... probably it was the container - I'll have another look

Keep 'em coming. I want this to be useful to the community at large so I'm open to change.
Hehe... I'll give you one more: When choosing to add a doxygen comment at the current cursor position you could parse the following code for a function signature and pre-process the lines added accordingly. Meaning: If I choose to add the comment before a line like:
Code
int MyFunc(double par1, int par2);
...it could add the params and the return value automatically. like:
Code
/**
 * \brief MyFunc
 * \param par1
 * \param par2
 * \return
 */
...whereas for:
Code
void MyFunc();
...it would just add:
Code
/**
 * \brief MyFunc
 */
Surely this is a bit complicated but would save some time typing. :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #23 on: February 26, 2010, 07:41:58 pm »

 Hi,

Quote
If you write a HTML log file then in the build log a message (link) to the HTML log file appears which you can click. This opens the internal HMTL viewer of C::B. I meant have a look at the code how it's done.

Aah, is that what that is for. I've clicked on some and nothing happens. I just tried again after running HTML docs, which produces said link, still nothing. I couldn't find any HTML viewer in the menus but then I saw that the man viewer's title bar actually says "Man/HTML". Is that it? Either way it doesn't work for me in SVN 6130. Or I haven't found it.  :)

Quote
Mmmh... I was under the impression that the stand-alone config dialog was that big... probably it was the container - I'll have another look

I checked too with and without the plug-in installed. It has slipped a bit and become larger. I think I can restore it to the original size by splitting across tabs.

Quote
Hehe... I'll give you one more: When choosing to add a doxygen comment at the current cursor position you could parse the following code for a function signature and pre-process the lines added accordingly.

In fact I hope to go one step further than that. I'd like it to be able to document the project automatically. I've seen code around that does that. I think it will require some dabbling in regexes, which I'm no expert with but, if I can get that working, this would be a logical contraction of that. Thanks.

Cheers.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #24 on: February 26, 2010, 08:22:21 pm »
Thanks, that would be wonderful. If you can suggest how I should proceed on Ubuntu Karmic that would also be great.
Compiling on linux was no problem, I attach the project-file that works for me.
I did not (yet) test the functionality.

 Yeah, I can build it, too. I just can't run it in any way. Thanks for that I'll compare it with mine and see what shows up.

Quote
To use C::B on Karmic, you have to either remove all wxwidgets 2.8.10 packages shipped with ubuntu and use the ones from apt.wxwidgets.org (in this case you can use my repo), or remove all packages from apt.wxwidgets.org and use the packages shipped with Karmic.

Yes, I did that. Something may have been out of place so I'll give it another go and report progress.

Quote
In the second case you have to build C::B yourself with automake system or use the repo provided by pasgui (he provides a special version for Karmic) : http://forums.codeblocks.org/index.php/topic,11875.msg80825.html#msg80825 .

My build hangs as described. Reason unknown. pasgui's repo didn't work either. As I said I tried eeeeeeeeverything. :?
However, there's every chance I screwed things up. I can get around on Linux without trouble but I don't have the same depth of knowledge that I do with Winblows systems. For example, is the installation order critical? Is there anything I need to ensure happens a certain way at some stage?

Cheers.
« Last Edit: February 26, 2010, 08:25:38 pm by Cryogen »

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #25 on: March 01, 2010, 02:41:09 am »
Quote
To use C::B on Karmic, you have to either remove all wxwidgets 2.8.10 packages shipped with ubuntu and use the ones from apt.wxwidgets.org (in this case you can use my repo), or remove all packages from apt.wxwidgets.org and use the packages shipped with Karmic.

Yes, I did that. Something may have been out of place so I'll give it another go and report progress.


OK, I spent several more hours going through this. I had some things set up wrong. I rebuilt wx as a monolithic lib and downloaded the latest SVN, 6182, and built it manually via make, make install, etc. It now runs BUT, the plug-in doesn't. I built the plug-in from within the contrib dir. It won't install and suggests that this happens when a plug-in is built for a different version of the sdk. No, I don't think so. I guess that this might be because it wants to run with a version that is running in the same src tree, although I can't see why. So, I run C::B and then build it with C::B to generate src/devel/... I then run "update"  to generate src/ouput/... and the run scripts, etc. However, when I try to run either the debug or release versions that I built, they stop at:

Code
gary@ubuntu:~/Projects/CodeBlocks/src/output$ ./run.sh 
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading toolbar...
DoxyBlocks: loaded
AutoVersioning: loaded
BYOGames: loaded
cbDragScroll: loaded
DoxyBlocks plugin activated
AutoVersioning plugin activated
BYO Games plugin activated
DragScroll plugin activated
Initializing plugins...

The same thing happens if DoxyBlocks isn't present so it seems to be something other than my plug-in, which is a nice change at least, but what? They should all be using the same wx libraries so I can't see where the difference could be. I'm frankly stumped as to how one is supposed to get to the stage where this can work. How can I have my dev. installation in parallel with the make-generated and -installed version? Is that even how things should be? The build doc is unclear and documentation in general is scarce. I've spent hours in the forums and elsewhere and still can't make a simple plug-in run here. I have everything working well on Windows, so I have a good idea of what's required but this is just driving me nuts.

Now I'm going to have a bitch. While I greatly appreciate the work that goes into it and accept that I'm no guru on Ubuntu, ain't no-one going to to persist as long as I have to try and get this thing to work. It needs to be sorted out, and quickly, so that the average joe that comes along and wants to build it can do so. Otherwise we're all wasting our time, aren't we? Someone who can deal with these problems needs to provide some canonical methodology to get it to work. For everyone. Ubuntu is the most popular distribution around so we have to have it working smoothly there or we're going to lose a lot of users to the myriad other options that are available these days. And what's going to happen if I want to upgrade to Lucid? There's no sense in trying to use a cross-platform system if the IDE you need to run to do so won't run as required across platforms. I'm happy to be part of the solution but can someone who knows what required PLEASE supply some detailed steps to allow me to run my own plug-in in my own build of C::B before I go insane? Having done all of the legwork just to get it to build and run anything I build should just run and this should be trivial, really, but it's not.

My failing sanity thanks you in advance.

I'm off to therapy. Back soon.  :shock:

« Last Edit: March 01, 2010, 02:57:17 am by Cryogen »

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #26 on: March 01, 2010, 02:53:35 am »

 Hi Guys,

I'm back from therapy, now.  8)

I have uploaded version 0.3.287.

-Fixed: DOT_PATH was written twice due to some extraneous code.
-Added: New menu which mirrors toolbar functionality.
-Added: Context-sensitive menu.
-Added: Translation catalogue.
-Cleaned: Some general code tidying.
-Added: Resource file and Windows version info.

There is now a linux .cbplugin for you to try. As you have probably gathered by now, I can't run it on Linux. If you can please let me know.

 Gary.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #27 on: March 03, 2010, 08:11:15 am »

 Hi Guys,

Released version 0.5.457 of DoxyBlocks

     Change log:
        -Added: BusyInfo when running doxygen.
        -Added: Ability to run HTML after compilation.
        -Added: Ability to run HTML in the internal viewer.
        -Updated: Header blocks for all files.
        -Added: Now parses the selected line when inserting block comments and pre-fills the \param and \return values.
        -Added: Option to use "@" in comments rather than "\".

Cheers.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #28 on: March 03, 2010, 08:45:57 am »

 Hi Morten,

Quote
Hence I have some suggestions to make:
1.) It was hard to me to find out how I actually use this. Until I found the toolbar which gives access to the functions. An extra "doxygen" menu would be fine.

This is now done.

Quote
2.) In addition some of the options should go into the editors context menu, too (like "add doxygen comment at current editor position) for convenience.

As is this.

Quote
3.) The "DOT_PATH" is written twice if you setup the DOT executable. You just need to remove the additional line:

Fixed.

Quote
4.) Having the possibility to view the HTML file in the internal HTML viewer of C::B would be really convenient, too. You can have a look how it's done in the build log.

This is now implemented. The internal viewer isn't capable enough to show all of the features that doxygen provides. The file list frame doesn't work, some links don't work, presumably for lack of JavaScript, and it doesn't support CSS, however I think it does enough to allow a reasonable preview of the compiled docs and avoid running a full browser, or just for a quick preview.


Quote
6.) The setup dialog is quite huge and although I personally don't really care I think users with small screen resolutions will complain sooner or later.

I spent some time reworking things to bring it back to the size that exists when DoxyBlocks isn't installed.

Quote
Hehe... I'll give you one more: When choosing to add a doxygen comment at the current cursor position you could parse the following code for a function signature and pre-process the lines added accordingly.

This is done, too. I spent quite some time researching the possibilities and looking at regexes. It seems that there is no way to reliably parse every possible code signature that might exist in C\C++ code. So far, I have done enough to allow it to scan the selected line when entering a block comment and pre-fill the params and return value. It makes some decisions regarding what to insert, based on what it finds. It is aware of enum, typedef, struct, class and functions with and without return values and with and without a class name prefix. It is, however, not yet coping with more than one return value keyword, such as "static char", or functions with parameters on separate lines, and there are other limitations. It seems to work fairly reliably with the standard range of function signatures. More can be done, in time, but this gives us a good starting platform. If it can't identify a particular signature it provides a default comment block. I will do some more wrestling with the regexes some time soon.

I will probably look at automating it across entire files. I'm not confident that it will work well enough, yet, or ever, to parse a whole document without making significant errors. A run that creates a lot of incorrect comment blocks would be worse, I think, than having to enter them separately. I intentionally haven't provided a means to enter a \brief entry by inserting something trivial such as the class or function name. I've seen other similar plugins that do this but, frankly, I find that meaningless. You would be much better off simply enabling EXTRACT_ALL and letting it pull out something meaningful rather than inserting text such as "myfunction" as the brief description for a function called "myfunction". Doing that just duplicates what already exists and describes nothing. The description should be just that, or left blank, I think. Anyway, we'll see what transpires.

Thanks for the input, I hope you like the results.

Cheers.


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Doxygen plugin
« Reply #29 on: March 05, 2010, 09:28:52 pm »

 Hi,

I have uploaded V0.7.636 to the SVN repository.

Change log:
-Added: Added the ability to use the AutoVersion plug-in's version string as doxygen's project number value.
-Fixed: The function parser was creating comments with the parameter type and name in the wrong order.
-Fixed: Bug in regex pattern matching that allowed multiple matches.
-Added: Inserted comments blocks are now indented to match the code that they're commenting.

Cheers.