I've updated the CFC Stub Generator RIAForge Project with a few new items:

  • A few bugs and typos were fixed.
  • Added an option from Nat Papovich regarding the documentation tab from Poseidon. Any text included in the Poseidon 'documentation' tab for that method will either be inserted into the 'hint' attribute of the CFFUNCTION tag, OR be placed into the body of the CFFUNCTION tag set as a CFML comment. This option is set on the Stub Generator configuration screen.
  • Strip HTML from Documenation: This option can be turned off or on in the Configuration Options screen. Since the Poseidon documentation tab is a rich text editor, HTML markup can end up in your generated hints or CFML comments. Some people like to have HTML in their hints to make viewing it in the Component Browsers more readable so I left this in as an option.
  • Getter and Setter Generation: This option can be turned off or on in the Configuration Options screen. If a method starts with "get", the generator will add in code to return an instance variable with the name of the method. i.e., if you have a UML method called "getName", the generator will add the code

    <cfreturn variables.instance.name />
    		

    Along the same line, if a method starts with "set" and has one argument, the generator will add in code to set the variable. i.e., if you have a UML method called "setName" with a single argument called "name", the generator will add the code

    <cfset variables.instance.name = arguments.name />
    		

    I realize this won't always be correct, but I figured it wouldn't hurt much since it does eliminate a lot of mundane typing and if it incorrectly adds code for a method that you didn't really mean to be a getter or setter, it's very easy to delete that code. This option can be turned off or on in the Configuration Options screen.

  • Composition and Aggregation: The tool does detect aggregation or composition between components and inserts a custom attribute to the CFCOMPONENT tag called "aggregates" and lists aggregated components in a comma-delimited list. This isn't used by ColdFusion, but in the event that I create a tool that can read CFCs and generate the UML diagram, this attribute would allow the UML to be aware of composition and aggregation in your CFCs. This option can be turned off or on in the Configuration Options screen.
  • Readme updated

Comments Comments (3) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 7015 Views

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

  • # Posted By Ilya Fedotov | 6/26/07 10:56 AM

    Brian, this didn't work on Win for me right the way. I noticed you added the function to get OS path delimiter but didn't use it. When I replaced '/' with call to that method it seemed to work

  • # Posted By Brian | 6/26/07 10:59 AM

    Ilya, do you have a line number? If so please post it. Otherwise I'll try to dig through and see where I missed this. Thanks.

  • # Posted By Ilya Fedotov | 6/28/07 10:43 AM

    Brian, lines 109(2 times) and 126 in CFCStubGenerator.cfc.
    I replaced '/' with getOSPathDelimeter()

    I haven't tested XMI yet, but am excited to try it. I have a Umbrello UML tool on my Ubuntu laptop so I am going to try it on that.