Trouble with Flex 4 code completion / error highlighting.
Hi,
I'm having some trouble with Flex code completion and error highlighting using IDEA v9.0.1 (93.94). I stripped a Flex module down to almost nothing and took the attached screenshot. IDEA code completion suggests s:Box and other options that aren't valid. If I choose (for example) s:Box from the code completion drop down, the editor will show 'all green' (no errors). I then have to re-import all Maven modules before it will correctly hightlight s:Box as an error.
I'm using Flex 4 (build 13555) and Flexmojos 3.4. Here is a POM snippet of dependencies in case it's useful:
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<type>swc</type>
<classifier>${playerGlobalClassifier}</classifier>
</dependency>
</dependencies>
I'm also having trouble with fx:Script tags inside of s:Application. See the second screenshot I've attached to see what I mean.
Attachment(s):
FlexInspectionProblem2.png
FlexInspectionProblem.png
Please sign in to leave a comment.
Please make sure that /target/...-config-report.xml file exists and /target/classes/config-4.0.0.13555/ folder exists and contains a bunch of config files. These files are copied there during compilation by maven. If that's ok, then closing/opening IDEA's project may help.
Thanks for the reply. I have both of those. The config directory is actually /target/classes/config-4.0.0.13555/ which I assume is correct. I think I'm experiencing 2 different problems. First, I have two profiles that I toggle between to build my project using either BlazeDS or GraniteDS. Both build my artifacts with classifiers which IDEA seems to ignore. My POM uses:
Artifacts and my configuration report files are something like:
However, the facets in my project are trying to use:
Besides that IDEA actually deals with my profiles amazingly well (including adding / removing modules when I toggle between profiles).
Second, I'm having tons of problems with flex-framework 4.0.0.13555. My .mxml files declare namespaces like this:
As soon as I try to use anything in the mx: namespace my project fails to compile (so it's not a problem with IDEA). For code completion IDEA acts as if all the components are dumped into the s: namespace. Going back to flex-framework 4.0.0.12575 fixes all my issues except the fx:Script highlighting which I'm certain is a result of the first problem I described in this reply.
Below is a complete POM that uses the same structure as all of my Flex modules, but without any classifiers. It's the POM I used to test between flex-framework versions (just in case it's useful to anyone that wants to try different versions of flex-framework):
1. As for classifier for -config-report.xml file - this will be fixed in next IDEA EAP
2. Halo namespace is no more used in Flex 4. It was changed to library://ns.adobe.com/flex/mx . See http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix