7 Replies Latest reply on Sep 22, 2011 12:28 PM by hermasj

    Classes missing from autocomplete

    hermasj

      I'm using Eclipse with the Flex Plug-in. One of the Flex projects in my workspace suddenly no longer displays everything that should appear when the autocomplete window pops up.

       

      For example if I want to add a VBox into an mxml file and I type the "<mx:" the autocomplete window opens but does not contain VBox. In fact most of the "standard" classes are missing. Classes such as AdvancedDataGrid and related classes and the various charting classes show up, so it appears that maybe only the Data Visualization classes are available in autocomplete for some reason.

       

      Two other Flex projects in this same workspace do not have this problem. All the classes show up in autocomplete as expected.

       

      I'm not sure exactly when this started. I  recently installed the Flex 3.6 SDK and reconfigured the projects to build with that (instead of 3.5 which they were previously pointed to). It may have started then, but I'm not sure. And it seems odd that it only affects one of the three projects.

       

      Any ideas?

       

      Steve

        • 1. Re: Classes missing from autocomplete
          Flex harUI Adobe Employee

          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.

          • 2. Re: Classes missing from autocomplete
            hermasj Level 1

            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.

            • 3. Re: Classes missing from autocomplete
              Flex harUI Adobe Employee

              Is this a Flex 3 project?  Did you try restarting FlashBuilder and doing a clean and rebuild?

              • 4. Re: Classes missing from autocomplete
                JeffryHouser Level 4

                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.

                • 5. Re: Classes missing from autocomplete
                  hermasj Level 1

                  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"???

                  • 6. Re: Classes missing from autocomplete
                    Flex harUI Adobe Employee

                    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.

                    1 person found this helpful
                    • 7. Re: Classes missing from autocomplete
                      hermasj Level 1

                      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?