Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Flash Builder generates the following code whenever it tries to generate a function. I want this fixed.
public function functionName():void
public function functionName():void {

Ry7n commented Oct 19, 2010

A six pack of beer to the person who shows me how to fix this.


Ry7n commented Jan 15, 2011

At AdobeMAX 2010, one of the presenters showed off Flex Formatter, which can do this automatically. It's not perfect—it doesn't handle object literals well—but it does the job.

Go to Window->Preferences then drill down to FlashBuilder->Editors->CodeTemplates->Actionscript . Look for functions in the list, select it and click edit, move the curly brace and then click Apply. Though adobe uses Java style curly braces on seperate lines for all of their sample code, so making that a default might be contentious on a group project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment