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