NO

Author Topic: Comments automation addin  (Read 9292 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« on: September 26, 2005, 05:56:36 pm »
This addin is based on the excellent work of CLR, while it is keeping the function and prototypes (lightly improved) it adds the following features:
1) Module comment (creation and editing)
2) Function comment (creation and editing)
3) Win32 help search (with F1)
4) Automatic versioning and build counter with version editing.
5) Element usage (still incomplete)
6) Classic CLR code features

The features of points 1 and 2 are accessed with left mouse botton (the module comment from from anywhere in the file, function comment clicking inside the function).
For feature 3 select the word and press F1 (first declare win32.hlp in setup)
The automatic versioning is enabled creating a macro in the project options named 'VERSION'. The value of this macro is the name of the versioning .c and .h files (before enable versioning feature in the setup). After the first creation include the version.c file in the project.
Element usage for now simply search the next forward occourrence of the selected word in the text.
The classic CLR functions are available as before.
This is a Alpha release. Update will follow.
Enjoy.

Note: please download the updated version below.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2031
    • http://www.smorgasbordet.com
Comments automation addin
« Reply #1 on: September 26, 2005, 07:31:05 pm »
Very nice - thanks!

Just after enabling the version feture, there seem to be "garbage" in the version info. I get "Error: File line too long" when building - until I use the "Edit Version" dialog, and set the version numbers myself. Maybe nice if the default, if possible, was something other than "garbage"?

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« Reply #2 on: September 27, 2005, 05:02:06 pm »
Quote from: "Pelle"
Very nice - thanks!

Just after enabling the version feture, there seem to be "garbage" in the version info. I get "Error: File line too long" when building - until I use the "Edit Version" dialog, and set the version numbers myself. Maybe nice if the default, if possible, was something other than "garbage"?
Pelle


Sorry Pelle, I forget to specify inizialization flag in version file create.
This new revision seems to work correctly.
Moreover I added the feature of autoincluding the version file on the first project building.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2031
    • http://www.smorgasbordet.com
Comments automation addin
« Reply #3 on: September 27, 2005, 06:18:51 pm »
Quote from: "frankie"
Sorry Pelle, I forget to specify inizialization flag in version file create.

No problems! (...and you said it was a Alpha release...)

Quote from: "frankie"

This new revision seems to work correctly.

Yes, works for me too. Thanks!

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« Reply #4 on: September 27, 2005, 06:29:34 pm »
Quote from: "Pelle"

Yes, works for me too. Thanks!
Pelle


Thanks Pelle  :mrgreen:

In the next version I'll try to update directly the versioninfo structure in the resorces, so they are keeped aligned.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2031
    • http://www.smorgasbordet.com
Comments automation addin
« Reply #5 on: September 27, 2005, 08:47:36 pm »
Quote from: "frankie"
In the next version I'll try to update directly the versioninfo structure in the resorces, so the are keeped aligned.

That would be cool!  :D

Pelle
/Pelle

CLR

  • Guest
Comments automation addin
« Reply #6 on: October 01, 2005, 10:09:02 pm »
Hello frankie.

That is really useful. Thanks! !

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« Reply #7 on: October 03, 2005, 09:52:38 pm »
Quote from: "CLR"
Hello frankie.

That is really useful. Thanks! !


Thanks CLR  :D !

Now I have to thank you for your superb code that is substantial to this tool  :wink: !

CLR

  • Guest
Comments automation addin
« Reply #8 on: October 04, 2005, 01:38:12 am »
Quote from: "frankie"
Quote from: "CLR"
Hello frankie.

That is really useful. Thanks! !


Thanks CLR  :D !

Now I have to thank you for your superb code that is substantial to this tool  :wink: !


Hello frankie. Thank you very much!!
I"m very happy!!  :D

Miralex

  • Guest
Comments automation addin
« Reply #9 on: February 14, 2006, 08:26:25 am »
Can I put buttons 'Edit function comment' and 'Edit module comment' to the top panel, like as button 'Function prototypes'?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« Reply #10 on: February 14, 2006, 09:32:00 am »
In the file "faddin.c", function "AddInMain", change the function and module comment sections from:
Code: [Select]
AddCmd.idMenu = AIM_MENU_SOURCE;
to
Code: [Select]
AddCmd.idMenu = AIM_MENU_NOTHING;

Miralex

  • Guest
Comments automation addin
« Reply #11 on: February 14, 2006, 10:00:25 am »
Big Thanks. It Work   :)


And I still have a proposition:
When I'm add a solid function comment  - it add's and cutting on some fixed strings. But it It would be nice if cutting where just sentence ended or finded 'line feed character'.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1757
Comments automation addin
« Reply #12 on: February 14, 2006, 10:17:06 am »
I don't exactly catch what you mean.
Anyway to keep code simple I just get a line at time and if it ends with a space this means that the comment continues on the next line. A comment is closed when the last char in a line is != space.
To make it more flexible I should introduce REGEX to discriminate comments start and end, and this is somwhat complicate at this time.
Anyway your welcome to modify the code as per your preferences and I'll be glad to see your own implementation.

P.S. I'm still planning to add other features, as soon as I will have time, as automatic arguments listing for comment (inside a function comment) and the already promised automatic version resource updating.