Class Documentation
I like to add documentation to the top of every class I write. Is there a way to modify or create a template that would automatically add the lines below to the top of the class? I primarily use Studio IDE but would like to be able to do this using VS Code as well.
/// Version 1.0
/// Author/Co-author:
/// Project:
/// Date:
/// Description:
/// Change Log:
/// Notes:
Thanks.
Comments
Phil, I'm not sure about VS Code, but you can do this in studio by creating a new CSP page with the following contents:
<csp:StudioSimpleTemplate name="CustomCommentHead" type="CLS" mode="new"> /// Organization: /// Version 1.0 /// Author/Co-author: /// Project: /// Date: /// Description: /// Change Log: /// Notes:
Then save and compile that file. It doesn't matter where. Then when you click File, New, Custom, you'll see your CustomCommentHead template. If you choose it, you'll get a .cls file with those lines already inserted.
Thanks David, that worked.
just discovered that it will always create the new class in the USER namespace and I can't change the name of the new class. Is there a way to resolve this?
In VS Code, you can use snippets for that.