/ eclipse
Thursday, May 21
Permalink

Using Code Snippets in Flex Builder

posted 1 year ago

Kyle turned me on to this idea today for using code snippets in flex builder, it took me a while to figure out the exact procedure so I will outline it here.

1. start up flex builder and navigate yourself to Help>Software Updates>Find and Install
2. search for new updates to install
3. now your gonna wanna add a new remote site, with the url http://www.cfeclipse.org/update and click finish.
4. after you install cfeclipse your flex builder will restart
5. go to Flex Builder>Preferences>General>Keys
6. in the filter text search for snippets and click on “Insert Snippet” and you will change the “When” variable to “Editing Text”

Snippets are now setup.

To add a snippet you can now go into your windows and “snippet tree view” and setup a code snippet. When adding a snippet keep in mind that the trigger text is like a shortcut so you can type in something like “psf” hit command + J on a mac and have it be replaced with Private Static Function. This really help out if you have code blocks you often type out and need to reuse.