Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Feature: Support for header comments AFTER member
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ycc
New Member

8 Posts

Posted - Aug 18 2010 :  9:33:28 PM  Show Profile  Reply with Quote
Hi, Visual Assist has a feature to show documentation comments of a member/function when using it, which is very helpful, but it doesn't support comments after members. In Doxygen, we can document members by usually special comment blocks that look like this:

/// This is a random function
void blah();

But it's also possible to document after the member:

void blah();
///< This is a random function

Visual Assist doesn't seem to be able to recognize this and would instead use the comments above it. This leads to situation like this:





I know this is a slippery slope to parsing any kinds of generic comment structure, but seems like this is a matter of being able to parse comments before or after a member. If we really want to be generic and not having to be doxygen specific maybe an option field for us to fill in what the beginning tag for "comments after memebers" would look like? I can just manually fill in the "///<" and related tags manually.

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Aug 21 2010 :  10:33:42 AM  Show Profile  Reply with Quote
We are trying to avoid getting into parsing comments, since they are free text.

Out of interest is there some reason why you are putting the comments after the members? I have never seen this done before, and it seems like a rather confusing thing to do.

zen is the art of being at one with the two'ness
Go to Top of Page

hfrmobile
Ketchup Master

Austria
79 Posts

Posted - Aug 23 2010 :  06:18:06 AM  Show Profile  Reply with Quote
I have seen that some times but it is confusing when the comments appear after members in new line.

On the same line it is is OK of course:
int nMyInt; // some comment (OK)

int nMyInt;
// some comment (confusing)

Visual Assist X for C/C++ and ReSharper, FxCop and StyleCop for C#, Eclipse Ganymede for Java
Go to Top of Page

ycc
New Member

8 Posts

Posted - Sep 01 2010 :  2:35:09 PM  Show Profile  Reply with Quote
So the justification for this style is that it's easier to read (once you get used to it) as it flows better. Usually when we read a function we first care about the function name/signature, then the description of what it does. When we have a long description it sometimes devolves to this:

/// RandomFuncName
///
/// This is a random description
void RandomFuncName(int a, int b);


Instead of this we can just have the following:

void RandomFuncName(int a, int b);
///< This is a random description


The real reason is that our lead engineer likes this style and a lot of our core code is written like that...

I'm not really hoping for any special parsing, but it would be nice to be able to specify what kind of comment prefix (in this case "///<") would mean it's documenting the function above instead of below.

I do agree it's relatively uncommon even though doxygen supports it.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Sep 10 2010 :  11:57:03 AM  Show Profile  Reply with Quote
Unfortunately this is not something we are going to try and support. Working out how to match comments to variables / functions is already tricky, and this would add quite a lot of complexity for very little benefit.

Doxygen gets to make certain assumptions about the comments, assumptions that VA cannot make.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000