Author Topic: doxygen and GenComment from Gary Ash  (Read 12356 times)

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
doxygen and GenComment from Gary Ash
« on: August 30, 2006, 12:32:28 PM »
So I read about how I could kind of boost my doxygen commenting in slick edit by using Gary Ash's GenComment macros.
I downloaded and installed them.
He includes 4 "commands" with his set.
1) separator line
2)box comment
3)comment editor
4)configure comment

I have loaded all of those, and added them to the right click context menu _ext_menu_default... which is the one that opens when you right click in a source file without having selected any text.(same menu that contains search etc).
All the macros work fine (as far as exhibiting some behaviour)... but the Configure comment, I dont understand how this works.
When it is launched, a dialog is opened where you can edit all the different comment types (file header, class, function etc).
What I do not see, is how to then apply these comments to the source file.  As mentioned above, the only 2 comments you can apply directly via menu are separator line and box comment.  I also dont see the point of Comment editor.  It is just a dialog where you can freehand type a comment... why not just do that via the editor itself... hence my post to this forum... I am thinking I am not using it or not setting it up properly.

cheers guys
Aaron


ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: doxygen and GenComment from Gary Ash
« Reply #1 on: August 30, 2006, 02:19:42 PM »
Use the comment editor, it automatically figures out what your are trying to do by where the cursor is. If at the top of the file (I usually have a blank line there) then it will generate a file header. If on the first line of the function it will generate a function header with boiler plate for some of the parameter description.

I am using his 2003 code from the SlickEdit website (he has some newer versions) with SE 10.0.3 and have modified it somewhat. I added a call that sets an auto flag that tells the commenting function to just insert the outline with some dummy comments (Fix me) that allows me to search thru my code and find all the places I need to fix before releasing. I also added lookups for function types and parameter names since LabWindows uses a template for connection to various parts of a GUI with consistent and distinct parameter names. It also looks for a different environment variable for the developer name (we have employee numbers for login names) and exposes another parameter (%org) that it gets from the environment too.

I set up toolbar buttons for generating comments without editing them or with the editor (auto flag set or cleared) and it works pretty well.

I've been working with him some on his newest version and like the additions he's done. It still doesn't have the function prefix lookup (probably not worth it) but he does have the ability to generate automatic comments depending on the type. I'm thinking about asking him to add the same ability but keying on the parameter name instead. It should be reasonably easy, just duplicate the setup and processing for types and add it to the names with a flag to enable/disable it.

The built-in javadoc editor does a pretty good job, I needed to modify my comment style to get it to work with it reasonably well though. I had to move my full description to the top instead of the bottom. I find having the full description at the bottom with a brief description and parameter descriptions first better when editing the code (these are what I usually am using when coding) but it's a minor nit.

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
Re: doxygen and GenComment from Gary Ash
« Reply #2 on: August 30, 2006, 04:28:55 PM »
ah, I didnt realize the comment editor was that smart !
nice going Gary!
I just tried again, and yes, it is working properly now.
kindof...
I did get this error form the slick-c stack(even though it did insert the comment):
Stack trace written to file: /tmp/vsstack.c7730
 Invalid argument
gc_comment.ex 13658 static(-1)   p_window_id: 369   p_object: OI_FORM   p_name:
gc_comment.ex 1380 static()   p_window_id: 369   p_object: OI_FORM   p_name:
gc_comment.ex 994 gc_edit()   p_window_id: 369   p_object: OI_FORM   p_name:

NOTE I use slickedit on unix(solaris 9) v11.01

gary_ash

  • Guest
Re: doxygen and GenComment from Gary Ash
« Reply #3 on: August 30, 2006, 06:58:18 PM »
I'm amazed one little macro package has generated so much traffic, wow

Aaron:

Do you get the stack trace and every time you run gc-edit or once
I have seen on as a one time when the package is first loaded. I use Windows based slickedit so it may be hard for me to debug.

gb

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
Re: doxygen and GenComment from Gary Ash
« Reply #4 on: August 30, 2006, 07:03:58 PM »
every time I run it... but so far, only when I have had the cursor on a function or at the very top of a file
in blank space anywhere else, it generates no trace errors.

yes, very hard to debug on different platforms.

in the case of cursor at top of file, the trace is a little different:
Stack trace written to file: /tmp/vsstack.c7730
 Invalid argument
gc_comment.ex 13264 static(
   1:   
  • =

   1:   [1]=
   1:   [2]=0
   1:   [3]=0
   p_window_id: 369
   p_object: OI_FORM
   p_name:
gc_comment.ex 12646 static(11,
   2:   
  • =

   2:   [1]=
   2:   [2]=1
   2:   [3]=90
   p_window_id: 369
   p_object: OI_FORM
   p_name:
gc_comment.ex 1276 static()   p_window_id: 369   p_object: OI_FORM   p_name:
gc_comment.ex 994 gc_edit()   p_window_id: 369   p_object: OI_FORM   p_name:



gary_ash

  • Guest
Re: doxygen and GenComment from Gary Ash
« Reply #5 on: August 30, 2006, 07:14:21 PM »
do you have gc-edit (the main editor command) bound to a key or do you use a toolbar button or something?
if not, try a key binding please. I use a key binding and a different platform

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
Re: doxygen and GenComment from Gary Ash
« Reply #6 on: August 30, 2006, 07:18:41 PM »
I use a menu item, yes.
Will try it via key binding and post results

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
Re: doxygen and GenComment from Gary Ash
« Reply #7 on: August 30, 2006, 07:21:40 PM »
key binding, same error.