IntelliJ IDEA

Most recent IntelliJ versions

In the versions of IntelliJ 10 and above building a Flexmojos project is as simple as opening the Maven project with IntelliJ. IntelliJ is provided with explicit flexmojos support. In contrast to earlier IntelliJ versions, it no longer requires you to configure Flexmojos to generate a configuration report, because as soon as IntelliJ detects a flexmojos module, a special plugin kicks in which generates the configuration report to IntelliJs ".idea" directory. The cool thing about this is that now a Maven clean doesn't disable the Flex support of IntelliJ.

Older IntelliJ versions

Update: Here is a blog posting at JetBrains that shows off what IDEA can do with FlexMojos. Most of the below post will not be relevant once FlexMojos 3.4 goes stable.

IDEA EAP 9 (10762), Flex SDK 10193, and FlexMojos 3.3

A well formed Maven project using FlexMojos works almost perfectly without any additional configuration in the EAP builds of IDEA 9. As of (IDEA) build 10762 it may be necessary to do the following to get proper code (error) highlighting and IDEA compilation / debugging to work.

  • In pom.xml add the following to the configuration section of the FlexMojos plugin:
<configurationReport>true</configurationReport>

The whole plugin section should look similar to this:

<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.3.0</version>
<extensions>true</extensions>

<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flexFrameworkVersion}</version>
<type>pom</type>
</dependency>
</dependencies>

<configuration>
<configurationReport>true</configurationReport>
<targetPlayer>${targetFlashPlayerVersion}</targetPlayer>
</configuration>
</plugin>
  • Compile the project.
  • FlexMojos will generate .../target/...config-report.xml
  • Import your Flexmojos project into IDEA: click Open Project on the File menu and select your pom.xml. If the project was already imported it will reimort automatically when pom.xml changes.
  • In IDEA make sure each Flex facet is set to use the custom compiler config:
  • Go to: File - Project Structure - Facets - Flex - MyFlexProjectModule
  • Make sure Use custom compiler configuration file is checked and pointed to the ...target/...config-report.xml file generated by FlexMojos

Code highlighting / completion should work as expected. Later versions of the IDEA (9) EAP probably won't require non-obvious configuration like this.

Source: http://www.jetbrains.net/devnet/message/5245442