If you are working with Flexmojos Maven projects in IntelliJ IDEA 9, and have imported Flexmojos project as described in this post, and are planning to debug your application and browse through Flex SDK sources, this post is a must-read for you. Inside you will find details on how to configure IntelliJ IDEA so that it properly recognizes SDK sources and their ASdocs.
When IntelliJ IDEA imports a Maven project, it creates a bunch of module libraries that match pom dependencies. For each library it also configures sources and documentation, assuming that they are located in *-source.jar and *-asdoc.zip respectively. Unless you have these files in your local Maven repository, you’ll see them marked with red (see Projects Structure dialog (Ctrl+Alt+Shift+S), Libraries section).
If there is a remote Maven repository containing these files, you can download them via Maven tool window.
For example, standard Flexmojos repository contains *-sources.jar files for the latest Flex SDK distributions (22.214.171.12483 and 126.96.36.19975): http://repository.sonatype.org/content/groups/flexgroup/, which is enough both for debugging code and viewing documentation, because IntelliJ IDEA automatically picks up ASdoc from sources.
If remote repository does not contain Flex SDK sources, you can set them up them manually, but consider that you’ll have to do a lot of routine work yourself — SDK sources should be individually configured for each module library. You may download a standard Flex SDK installation and keep it somewhere on your computer, and then add source folders to Maven libraries according to the following table.
|Flex Library||Source Folder|
Note that AIR-related libraries have similar source structure and locations.