If the mx.swc got removed from the project, that might affect code complete. Also make sure the mx namespace is propertly defined in the MXML.
I don't see an mx.swc file anywhere on my system... so it's not in the broken project, but it's also not in the projects that are working.
The mx namespace is properly defined as far as I can tell. The autocomplete is broken in all the mxml files in this project. But a coworker who is working on the same project is not seeing the problem. So it appears to be something wrong with this one specific project on my machine.
Is this a Flex 3 project? Did you try restarting FlashBuilder and doing a clean and rebuild?
Also, if you create a Spark only project, they would not be available [I think]. If you create a Mobile project, it won't be available either.
If you create an ActionScript only project, the Flex classes will not be available.
However, if the MX files / classes are nowhere on your system, it sounds like you have a corrupted, or modified, install o the Flex SDK.
I'm actually working in Eclipse (the SpringSource Tool Suite) using the Flex Builder 3 plug-in. Restarting didn't help, nor did doing a clean and rebuild.
The project does happen to be a Flex Library but I don't believe it would qualify as a Spark only, ActionScript only or Mobile project.
However, I think I found and solved the problem.
A few weeks ago I had added a source path in Properties->Flex Library Build Path. In the "Source Path" tab I had added the path to the "frameworks" folder of the Flex sdk that I was using in order to be able to easily open Flex source files and set breakpoints inside them (I was debugging a screwy problem with validators).
It seems that having that source path defined in the project was screwing up autocomplete. Removing the source path appears to have fixed the problem. Now all the expected classes are showing up in the autocomplete window.
It still seems odd that even with the Source Path defined the Data Visualization classes were showing up and not really anything else. But maybe that was due to the specific directory I had pointed to in the "Source Path"???
1 person found this helpful
In Flex 3, datavisualization code is not shipped so it wouldn’t be there to screw up autocomplete. In Flex 4, it is shipped but in a different project.
You shouldn’t need to point the source-path to Flex code. Doing so could significantly slow down the compiler. My trick for opening a file in Flash Builder is simply to type the full name of the class and use Command-click (or whatever it is on Windows) to turn it into a link and jump to it.
I like the command-click thing (I'm on a Mac so have no idea what the equivalent is on Win). I didn't know about that. Thanks for the tip.
Builds are definitely slow for this project... I'll have to see if removing the source path helps that too (I'm not currently at work).
The abililty to browse to the sources after adding the source path was "nice to have" I guess... but the primary reason I thought I needed to add the source path was to get breakpoints in the Flex source to work. Before adding the source path I could navigate to, open the source files and set breakpoints but they wouldn't be recognized when I actually ran my app. So the debugger would never stop at the breakpoints. Adding the source path allowed breakpoints to work.
Maybe there's another better way to make breakpoints work? Or maybe it's related to the fact that this is a Library and it's actually another project that I execute prior to debugging?