IntelliJ IDEA 11.1 Web Help

8.0+
Some features described here are available in Ultimate edition only.

To prepare for ActionScript or Flex application development:

  1. Make sure that the Flash/Flex Support plugin is enabled.
  2. Download and install a Flex SDK on your computer.
  3. Register the Flex SDK in IntelliJ IDEA.

    Note

    You can postpone this step until a later time. You will be able to specify the Flex SDK when creating a Flash module.

  4. Check general Flex compiler settings and, if necessary, adjust them to your needs.
  5. Create a new project with a Flash module, or add a Flash module to an existing project. See Creating a Flash module.

    Note that you can create a project or a module by importing Adobe Flash Builder projects.

  6. Check the initial module configuration and make the necessary adjustments. These may include configuring the module contents, adding libraries, modifying the existing build configuration and creating additional ones, etc.

    All these tasks, however, may be performed at a later time, when needed, in parallel with developing your source code.

Registering a Flex SDK in IntelliJ IDEA
  1. Open the Project Structure dialog.
  2. Under Platform Settings, click SDKs.
  3. Click Add New SDK add on the toolbar, and then click flex Flex SDK in the Add New SDK list.
  4. In the Select Path dialog, select the directory in which the Flex SDK is installed and click OK.

    As a result, the SDK configuration is shown on the Flex SDK page in the right-hand part of the Project Structure dialog.

  5. Generally, you don't need to make any changes on the Classpath and Sourcepath tabs because all the necessary libraries and sources are already there. However, you may want to add external online documentation to be able to access additional reference information when writing your code.

    There are two ways of adding the necessary documentation:

    • On the Documentation Paths tab, click icon_doc_url (Alt+SAlt S). In the dialog that opens, just click OK. (The URL suggested by IntelliJ IDEA is the one that you want.)
    • Download the Flex documentation set from the Flex Documentation page. Then, on the Documentation Paths tab, click add (Alt+InsertControl N ) and select the downloaded archive in the Select Path dialog.
  6. Click OK in the Project Structure dialog.
Configuring general Flex compiler settings
  1. Open the Settings dialog (Ctrl+Alt+SCommand Comma, File | Settings, or settings on the toolbar).
  2. In the left-hand part of the dialog, under Project Settings, open the Compiler node and click Flex Compiler.
  3. On the Compiler > Flex Compiler page, configure the settings as required.
Creating a Flash module
  1. Do one of the following:
    • If you are going to create a new project, choose File | New Project.
    • If you are going to add a Flash module to an existing project, open the project of interest and choose File | New Module.
  2. On the first page of the New Project or the Add Module wizard, select Create project from scratch or Create module from scratch, and click Next.
  3. On the next page of the wizard, select Flash Module and click Next. For information on other settings available on this page, see New Project from Scratch. Project Name, Location and Format.

    select_flex_module_type

  4. On the next page of the wizard, select the necessary module options and click Finish. For information on the available options, see New Project from Scratch. Flash Page.

As a result, the module structure looking similar to this is generated (the contents may be different depending on the module options that you have selected):

flex_module_structure

In this structure:

  • html-template is a folder with files that constitute an HTML wrapper template.
  • src is a folder for your application source files (.as and, possibly, .mxml).

In addition to the module itself, IntelliJ IDEA has created the following:

  • One build configuration.
  • One run/debug configuration. If when creating the module you have selected to create a sample application, you can use this configuration to run the application straight away. To do that, click run on the toolbar (Shift+F10Shift F10).
Configuring module contents

The module contents are configured by adding and removing the module content roots as well as by assigning individual folders (within the content roots) to source folders, test source folders and also by excluding the folders.

For a Flash module, generally, these task are performed on the Module page of the Project Structure dialog.

To access this page:

  1. Open the Project Structure dialog.
  2. Under Project Settings, select Modules.
  3. In the area under project_structure_toolbar_2_modules, select the necessary Flash module.

See Also

Procedures:

Language and Framework-Specific Guidelines:

Reference:

External Links:

Web Resources: