Code Comment Generation

Posts   
 
    
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 16-Jul-2006 03:51:45   

On every field that is generated you generate the following XML comments (partial)

/// <summary> The [FieldName] property of the Entity [EntityName]<br/><br/>
/// </summary>
/// <remarks>Mapped on  table field: "[TableName]"."[FieldName]"<br/>

When coding and using Intellisense, it displays the <Summary> as a tooltip on what the property is for and of course if you generated documentation on your generated code, it would show up there.

What I would like to suggest is to be able to generate more specific documentation into the code. What might be nice is to have a place for 'Comment' on each entity and on each field in the designer.

For MSSQL, those descriptions are potentially stored in a custom property (called MS_Description I think) in the metadata - so, could pull from there.

I realize any custom property we input will show up in the XML comment, so ultimately if there was a huge description you wanted to show up in the code/generated docs, you could easily get it there - however, the short one for intellisense might be nice if that could be enhanced from GUI/custom property.

Thoughts?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 16-Jul-2006 10:27:35   

That would mean the remarks with the custom property data should also be part of the summary? (which would mean no extra generated code but would mean more info in intellisense)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 16-Jul-2006 15:17:25   

Yeah - basically some or specific custom property data would go in the summary.

No extra code generated - right - just comment enhancement.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 17-Jul-2006 15:18:02   

Ok. I see your point. This is however a lot of work, so I won't do this right away. I'll add it to the list of things to do within the coming months.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 17-Jul-2006 16:38:32   

Ok - cool. I can see it is alot of work - since you have to change every template!

What if the template to generate the comments was changed to an "include template", making such changes easier in the future....just a thought.

Thanks for adding to your to-do list!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 17-Jul-2006 18:07:53   

There are some elements which could be made include templates, however the # of templates would become quite big. So instead I didn't use include templates for some of the template parts. simple_smile

Frans Bouma | Lead developer LLBLGen Pro