Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Advanced Search
Rearranging attributes and properties for C#  
Forum Index -> Customizing Code Generation
Author Message
peter_v


Joined: 2007/06/21
Messages: 1

Offline

This article describe how to reorder the attributes and properties that appear in C# code.

Original
${attribute1}
${property1}

${attribute2}
${property2}

...

Updated
${attribute1}
${attribute2}

${property1}
${property2}

...

Changes
Remove the following content from ${vp-suite}/resources/instantgenerator/csharp/attribute.vm


###################### Property Start ######################
#if ($attribute.getProperty())
#set($property = $attribute.getProperty())
#parse("$template-path/property.vm")
#end
###################### Property End ######################
 


Insert the following content to ${vp-suite}/resources/instantgenerator/csharp/class.vm, between Attribute End and Operation Start


###################### Property Start ######################
#if ($class.attributeCount()>0)
#foreach ($attribute in $class.attributeIterator())
#if ($attribute.getProperty())
#set($property = $attribute.getProperty())
#parse("$template-path/property.vm")
#end
#end

#end
###################### Property End ######################
 


Enjoy!

Peter

attribute.vm
 Description Download
 Filesize 766 bytes
 Downloaded:  113 time(s)

class.vm
 Description Download
 Filesize 3 kb
 Downloaded:  109 time(s)

 
 
   Forum Index -> Customizing Code Generation
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil