AlecMcE.com

Coding on the Flash Platform

Finding Methods without JavaDoc comments in AS3

View Comments

If you need to find methods in a project that don’t have JavaDoc comments in them, Java developers can use checkstyle. Unfortunately, it doesn’t appear to work with AS3 files. (At least, in the limited amount of time I’ve had to look at it, I can’t make it work. If you know how to, please let me know!)

Instead, if you want to find uncommented methods in an AS3 project, you can use the following regular expression. It looks for alpha-numeric characters between the end of a variable definition or method and the start of a method, and as such it is not infallible. However, it works for me using Eclipse, and I thought it might be useful for others:

(?s)(}|;)([^\w\}\;]+?)((override |)(private|public|protected)( override|) function)

If you have a superior mechanism for finding uncommented AS3 methods (particularly if it is integrated into Eclipse), please let me know!

Written by alec

August 21st, 2009 at 11:42 am

Posted in as3,tools

Tagged with

  • http://twitter.com/alecmce alecmce

    Finding uncommented methods in AS3 using Eclipse is a pain. My solution: http://bit.ly/b0Kz8. There must be a better solution?
    This comment was originally posted on Twitter

blog comments powered by Disqus