howto specify actionscript dependencies

Hi all, new to Intellij IDEA!

I've got a few actionscript projects that depend on a folder which contains both .swc and .as files. Lets call it libs-folder.

I'm able to go File -> Project Structure -> Project Settings -> Libraries -> Add -> Attach Sources

to get the project aware of libs-folder without errors. However, when I do

File -> Project Structure -> Project Settings -> Modules -> Dependencies -> Add -> libs-folder -> OK

I still have a slew of unresolved types etc in my project.

I've googled around all of yesterday before posting my question, hope someone can point me in the right direction. Thanks!

1 comment
Comment actions Permalink

Let's look at 'Configure Library' dialog. (Library can be of any level: Module, Project or Global, it doesn't matter)

Attach Classes:
   - Individual SWC files can be added. They will be used both for code highlighting and during compilation.
   - Folder with uncompiled *.as files can be selected (subfolders are respected as well of course). Highlighting will be performed as if these fileas are part of your own source files. But they will be ignored during compilation. Historically it was made by design. But many developers asked to compile against 3rd party libraries distributed in sources without including these library sources in IDEA project sources, so one day we'll do as requested. Tracked as

Attach Jar Directories:
   - First of all sorry for incorrect label. In case of ActionScript/Flex project it should be 'Attach SWC directories'.
   - This option is used to attach all SWC files from specified folder without addinig them one by one using 'Attach classes' option. Subfolders are not respected. Raw *.as source files are not respected as well.

Attach Sources:
   - Folder or ZIP with SWC sources can be attached. These sources do not affect code highlighting or compilation. They are used only for convenience: it is possible to navigate to compiled library source, to see ASDoc generated from sources etc. Attaching sources without attaching respective SWC doesn't make sense.

When you click Add Single-Entry Module Library it means the same as 'Attach Classes'. So you should select individual SWC files. You can select folder with raw *.as sources and you'll get highlighting against these sources, but compilation will fail. As already mentioned, details are here


Please sign in to leave a comment.