Wrox Programmer Forums
|
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2010, 12:06 PM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 2
Thanked 1 Time in 1 Post
Default Automatic Class Header Commenting

Hello,

I want to implement a functionality in VS editor so that when a class is added the header comment in certain format should come automatically. In this regard I followd the below link.

http://jamesewelch.wordpress.com/200...-file-headers/

How ever this links talks about manual intervention. I mean clicking on one meny item will bring the comment in the class that is opened.

I want this to happen when I add a new class. I tried handling the ProjectEvent.ItemCreated Event but could not do it. Can any one help me in this?
 
Old June 15th, 2010, 01:20 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Isn't that a matter of creatimg a simple template? File | Export Template?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 16th, 2010, 01:25 AM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Imar View Post
Isn't that a matter of creatimg a simple template? File | Export Template?

Imar
Imar,
Thanks. Two qusetions on this.
1. In my application I can have forms, Classes etc. So I believe I need to create different templates for different types of items for project (Basically Form and Class). Please let me know if I am taking a wrong approach here.
2. Say in the header section I have one entry like below
'Project Name : CAN THE PROJECT NAME BE READ FROM SOME FILE
In this scenarion can we parameterize the template so that some values can be read from a file.
 
Old June 16th, 2010, 03:05 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

1) Yes, that's corrrect

2) You can use template replacement parameters: http://msdn.microsoft.com/en-us/libr...aa(VS.80).aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
abinashpatra (June 18th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
Commenting Code TritonOps BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 March 1st, 2006 11:02 AM
Datagrid commenting seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 0 November 23rd, 2004 03:12 PM
Commenting large blocks of code goplayoutside VB.NET 2002/2003 Basics 2 April 21st, 2004 04:17 PM
ActionScript Code Commenting Ben Horne Flash (all versions) 1 December 9th, 2003 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.