3 Replies Latest reply on Jun 5, 2009 6:56 PM by Michael Borbor

    auto complete needed imports

    d:n:k

      I thought I saw how to do this, but I am not sure if i remember correctly...

       

      Lets say I use an ArrayCollection somewhere in my code, is there a way to get flex builder (I use the plugin) to autocomplete the needed imports? I seem to have a hard time remembering what packages things are in....

       

      Any handy commands for either getting Flexbuilder to put it in, or find out what package something is in? I usually just google it, but i am lazy... :-)

        • 1. Re: auto complete needed imports
          SteveDepp

          I don't know about the plug-in but with Flex Builder you just type the colon (:) after the variable name and then start typing arr... and then select ArrayCollection from the popup. If the current piece of code needs to import that class then it will put the import statement in for you.

          1 person found this helpful
          • 2. Re: auto complete needed imports
            d:n:k Level 1

            Well that does in fact happen with an ArrayCollection....

             

            Now I guess this is what threw me off... for example if I was adding something like:

             

            var myDate:Date = new Date();
            

            I assumed it would do the same when I typed the "myDate:Date" - but it did not. But there was no import created for the Date class. So that threw me off. Then I realized that in this case I guess the Date class doesn't need an import, just like String, etc does not either.

             

            So moving forward, I assume that if Flex builder needs to import for it's own classes, it will do so, and ignore for the ones it doesn't actually need the import.

             

            D

            • 3. Re: auto complete needed imports
              Michael Borbor Level 4

              Flex didn't make an import for Date because it's a top level class, these

              top level classes are availble everywhere without the need for an import.