Writing getters, setters, handler functions and even consts takes time. After working for a while I got feeling that this process can be automated. Lately I have discovered Eclipse plugin called Dash (thanks to eokyere). It contains Eclipse Monkey witch s a dynamic scripting tool. Scripts (written in Javascript) can be used to generate Actionscript code directly inside FlexBuilder.
Watch quick demo
Instalation
- Inside FlexBuilder to to Help-> Software Updates-> Find and Install
- Search new features to install
- Add New Remote Site (enter name and url (http://download.eclipse.org/technology/dash/update)
- Click finish to check for updates and install Eclipse Monkey
- Restart Flex Builder
- You should see Script menu
- File -> New -> Other… -> General -> Project
- Enter project name ex. Eclipse Monkey Scripts & click Finish
- Create script folder inside this project and copy scripts
- Now all scripts should be available in Scripts menu - if not select Eclipse Monkey Scripts project and press F5 (or right click on project -> refreash) to refresh it
Scripts
As you have seen on the video I have already created few scripts for Generate Event Handlers, Generate Properties and Generate Consts. I also have two scripts from Konstantin Kovalev blog.
Actionscript Code Generate Scripts (Eclipse Monkey)
Additional Resources
Usage Info
Creating Scripts
Creating a new Eclipse Monkey script
Scripting Eclipse with the Monkey
Documentation
Eclipse Monkey/Javascript Editor doc
Eclipse Platform API Specification (org.eclipse.jface is important)
Other