Using an existing eclipse flash builder project in IntelliJ

We have existing flash builder projects that we currently open with the Flash Builder Eclipse that comes with the Flash Builder download. We are considering switching to IntelliJ so I've downloaded the trial version. I don't fully understand the build, please ask further questions, I am probably missing some critical information.

At the moment I'm just trying to get one project (that does not depend on other projects) to build and I'm getting the following error:


Error:[flex-util]: command line: unable to open '.flexConfig.xml'

I have seen entries for .flexConfig in two files:

  • {$PROJECT_ROOT}/.actionScriptProperties
    additionalCompilerArguments=" -load-config+=../../.flexConfig.xml -include-sources=.,../test+"
  • {$PROJECT_ROOT}/flex-util.iml
     
    <option name="additionalOptions" value=" -load-config+=../../../flexConfig.xml -include-sources=.,../test+" />

It is weird that it's loooking for .flexConfig.xml instead of ../../../flexConfig.xml. That seems to be because I modified those two files as I was trying to get IntelliJ to find ".flexConfig.xml". However, none of the changes applied unless I invalidate caches and restart. If I do so, I get the same error message but now pointing to "../../../.flexConfig.xml"

I need some guidance as to how I can debug this. The .flexConfig.xml file is in the root folder (next to .flex-util.xml). Our existing config seems like it assumes that the current directory will be {$root}/src/main. What is the working directory for the builds? Why do I have to invalidate caches when I make changes to those files?


Thanks,

-Juan Mendes

3 comments
Comment actions Permalink

Avoid manual *.iml file editing especially when the project is open.
Open Project Structure | Modules | [your Flash module] | [your Flash buld configuration subnode] | Compiler Options tab and check Additional compiler options field.
If you really need additional compiler configuration file I suggest to add path to it to the Additional compiler configuration file field instead of Additional compiler options field. What is there in this flexConfig.xml?

0
Comment actions Permalink

Thanks for your response,

My .flexConfig contains the following


<locale>
   <locale-element>ko_KR</locale-element>
   <locale-element>zh_TW</locale-element>
   ... and others...
</locale>

<define>
   <name>config::ENABLE_ASSERTIONS</name>
   <value>true</value>
</define>

<keep-as3-metadata>
   <name>AppEvent</name>
   <name>ArrayElementType</name>
   <name>Bindable</name>
   <name>DefaultProperty</name>
   <and-others />
</keep-as3-metadata>
It was generated during our build process.


However, I was able to work around the problem by creating absolute paths using $MODULE_DIR$ . I should have realized that I shouldn't edit the project file itself and expect it to update, or at least I should be suspicious.

 
<option name="additionalOptions" value=" -load-config+=$MODULE_DIR$/.flexConfig.xml -include-sources=$MODULE_DIR$/src/main,$MODULE_DIR$/src/test" />


The iml does seem pretty simple and we should be able to generate one for all our projects using $MODULE_DIR$.
Thanks
0
Comment actions Permalink

Using $MODULE_DIR$ solved my path problems as explained in my reply

0

Please sign in to leave a comment.