Configuring Eclipse

If you want to use Eclipse as your IDE for developing Flex, you'll need to do a bit of configuration to get it to work.

One time: XML Editor

In order to view your MXML files with syntax highlighting, you'll need to download an XML editor.

  1. Go to the 'Help' menu, then click on 'Install New Software...'
  2. Paste the URL into the 'Work with' text box.
  3. Click Next, then Next, then agree to the terms. Then click Finish.
  4. Restart Eclipse to finish the installation.

One time: File Associations

Following these instructions will help Eclipse associate your Flex files with the appropriate editors.

  1. Go to the 'Window' menu on a Windows machine, or the 'Eclipse' menu on a Mac. Click on 'Preferences'
  2. Expand the 'General' node in the preferences tree pane, then expand 'Editors'. Click on 'File Associations'
  3. From here you'll be able to create file associations for the file types you'll use. For each of the following pairs, complete steps 4-5.
    1. File type: *.as - Editor: Java Editor
    2. File type: *.mxml - Editor: Rinzo XML Editor
    3. File type: *.swf - Editor: Go to 'External editors' and pick your browser of choice
  4. Click the 'Add...' button next to the 'File types' list. Copy the file type into the text box and click OK
  5. Click the 'Add...' button next to the 'Associated editors' list. Choose the matching editor and click OK

Each New Project: Configure Flex Builder

I'll provide starter Eclipse project files for each assignment which will provide most of the configuration you need; however, you will need to adjust the provided Flex builder so that it can find your Flex SDK. If you're creating your own new project, you can start with this code.

  1. Right-click on the project you're editing and select 'Properties'
  2. Choose 'Builders' in the left pane if it is not already selected. Then choose the builder 'MyFlexBuilder' and click 'Edit...'
  3. The text box under 'Location:' will be empty. Click the button 'Browse File System...' under it and navigate to your downloaded copy of the Flex 4.6 SDK. From there, go into the 'bin' folder, then select 'mxmlc.exe' if you're on a Windows machine, or 'mxmlc' if you're using a Mac
  4. Click the 'Apply' button at the bottom of the screen, then 'OK', then 'OK again
  5. To make sure your configured builder works, go to the 'Project' menu and select 'Build All'. There should be no errors in your Console, and a .swf file should appear in your bin folder.

Thanks to Sean Smith's guide for providing the implementation we use here!