Flex Builder “Alternative Comment Blocks”

Posted on Monday 6 August 2007


This one has bugged me for ages (not in a real ranting type way, more in a WTF? way :p). The deal is if you have an ActionScript file open in Flex Builder and you use ALT+CMD+C* you get the old style ActionScript 1.0 / 2.0 style comment block (/* \*/). If you then try ALT+CMD+D you get what is affectionately referred to as “JavaDoc” style comments(/** */) It’s these comments that you add the @ parameters to which in turn are used when generating ASDoc documentation. Pretty cool so far…


However if you are in an MXML file and use an <mx:Script/> tag the ALT+CMD+D command inserts a <![CDATA[  ]]> tag instead. This I find rather frustrating. There are very few incidents where you’d need to insert an additional CDATA tag in a script block - beyond those automatically added as part of the tag, or if you were hard coding a massive block of text for some purpose of testing XML perhaps. Where is the consistency? I mean I’m using the same context, same perspective, different editor granted, but the code I am creating is exactly the same language inside the tags…

Come on guys please add a bit of common sense to the short cut keys. If you want to keep CDATA on ALT+CMD+D then why not use the JavaDoc short cut for the ASDoc comment short cut? ALT+CMD+J for those interested. It’s not a biggy, but I use the short cut keys quite a lot and in the middle of doing some commenting of an ItemRenderer I always seem to get caught out :p

\*All the short cuts are Mac ones as I don’t think there is any value in indicating both as it doesn’t add any further clarity to the post.

License

This work is published under a CC-GNU LGPL.



1 Comment for 'Flex Builder “Alternative Comment Blocks”'

  1.  
    August 6, 2007 | 4:47 pm
     

    I second that.



Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.

Comments are moderated so please only submit once


RSS feed for comments on this post |