Paul Robertson's words, punctuated

Thoughts on development, user-centered design, code, etc. by Paul Robertson

Flash Builder 4.5 tip: Share code templates

Last fall when the Flash Builder “Burrito” beta was released at MAX, I shared several templates that I created.

It’s easy to share templates with others, which is great for teams or just for helping others so they don’t have to re-invent the wheel. Templates (like other settings) are not persisted between workspaces by default, so if you use multiple workspaces in Flash Builder, this is a way you can get your templates in your workspaces too.

Importing templates

To add a template to Flash Builder 4.5 (such as one of the ones I’ve shared):

  1. open Flash Builder preferences
  2. expand the Flash Builder > Editors > Code Templates section
  3. choose the category for the templates you’re importing (ActionScript, CSS, Flash Builder, or MXML)

  4. Click the “Import” button and browse to the file containing the templates you want to import (an XML file).
  5. Choose “Open” and the templates are imported into Flash Builder.

Exporting templates

To share your own templates with others:

  1. open Flash Builder preferences
  2. expand the Flash Builder > Editors > Code Templates section
  3. choose the category for the templates you’re importing (ActionScript, CSS, Flash Builder, or MXML)
  4. select the template(s) you want to export. (If you select more than one, they are exported into a single XML file.)
  5. Click the “Export” button and browse to the location where you want to save the template XML file.
  6. Choose “Save” and the template XML file is saved.

Comments